Tuning and optimizer

本文介绍了系统级性能调优的基本步骤,包括监控操作系统计数器、调整磁盘和网络I/O子系统、SQL级别调优及数据库设计层面的优化等。通过这些措施可以有效提升应用程序的整体性能。

Operating system level tuning. 

 

System-level tuning involves the following steps:

  • Monitoring the operating system counters using a tool such as top, gtop, and GKrellM or the VTune analyzer’s counter monitor data collector for applications running on Windows.
  • Interpreting the counter data to locate system-level performance bottlenecks and opportunities for improving the way your application interacts with the system.
SQL-level tuning.
  • Tuning disk and network I/O subsystem to optimize the I/O time, network packet size and dispatching frequency is called the server kernel optimization.
  • Distribution of data can be studied by the optimizer by collecting and storing optimizer statistics. This enables intelligent execution plans.
  • Choice of db_block_size, db_cache_size, and OS parameters (db_file_multiblock_read_count, cpu_count, &c), can influence SQL performance.
  • Tuning SQL Access workload with physical indexes and materialized views.
Database design level tuning

The steps involved in database design level tuning are:

  • Determination of the data needed by an application (what relations are important, their attributes and structuring the data to best meet the performance goals)
  • Analysis of data followed by normalization to eliminate data redundancy.
  • Avoiding data contention.
  • Localizing access to the data to the partition, process and instance levels.
  • Using synchronization points in Oracle Parallel Server.
  • Implementation of 8i enhancements that can help avoid contention are:
    Consideration on partitioning the data
    Consideration over using local or global indexes.
Explain rule-based optimizer and cost-based optimizer.

 

Oracle decides how to retrieve the necessary data whenever a valid SQL statement is processed.

This decision can be made using one of two methods:

Rule Based Optimizer

If the server has no internal statistics relating to the objects referenced by the statement then the RBO method is used.
This method will be deprecated in the future releases of oracle.

Cost Based Optimizer

The CBO method is used if internal statistics are present.
The CBO checks several possible execution plans and selects the one with the lowest cost based on the system resources.

 

 

“Quality tuning” 一般可以理解为质量调优,在不同的 IT 领域有不同的含义和应用。 在机器学习领域,尤其是模型训练方面,质量调优通常涉及调整模型的参数、优化训练过程,以提高模型的性能和输出质量。例如在翻译质量评价(Quality Estimation, QE)项目中,在 BERT 模型后面加上 Bi - LSTM 进行 fine - tuning(微调),这其实就是一种质量调优的过程,通过这种微调使得模型在句子级别的翻译质量评价任务上表现更好,能够更准确地评估翻译质量。该项目针对 Sentence - level QE,在 BERT 模型后面加上 Bi - LSTM 进行 fine - tuning,代码参考了 https://github.com/huggingface/pytorch - pretrained - BERT,并且仅在 wmt17 - qe 数据集上进行实验 [^2]。 在推荐系统领域,也存在质量调优的情况。如基于可解释质量奖励的微调大型语言模型解释性推荐系统,通过可解释质量奖励来对大型语言模型进行微调,从而提高推荐系统的质量和可解释性 [^1]。 以下是一个简单的伪代码示例,模拟在机器学习中进行质量调优的过程: ```python # 假设这是一个简单的模型训练和调优过程 def train_and_tune_model(model, data, epochs, learning_rate): for epoch in range(epochs): # 前向传播 output = model(data) # 计算损失 loss = calculate_loss(output, target) # 反向传播 loss.backward() # 更新参数 optimizer = Optimizer(model.parameters(), lr=learning_rate) optimizer.step() # 这里可以添加一些调优策略,如调整学习率等 if epoch % 10 == 0: learning_rate = learning_rate * 0.9 return model ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值