# 调优

## 调优的目的：

1. 根据不同的角色调优的方法是不一样的
2. 找到性能瓶颈以及缓解这个瓶颈（CPU，内存，IO调度、网络、使用的应用程序）
3. 通常做两种调优：

   &#x20;response time:  Web服务器，用户感受度好

   &#x20;throughput:     文件服务器，拷贝的速度

## 性能调优的效率问题：

### 业务级调优

尽量在业务级调，效果最明显

例如： 网站一定要使用Apache吗? 例如：将原有的调度器由LVS换成F5-BigIP 例如：能否禁用一些不必要的服务如蓝牙、smart card，makewathis, updatadb

### 应用级调优

NFS，Samba，Apache、Nginx、MySQL、Oracle、LVS本身调优\
对于日志的处理： 只要有日志产生，就会存盘fsync()，可以调整记录的日志等级或延后日志写，从而避免大量的I/O操作 kernel级调优 最后的希望，kernel调优具有普遍性

自上往下，效果越来越不明显


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.clay-wangzhi.com/23-wei-fen-lei/tiao-you.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
