iostat, from the excellent sysstat suite of utilities, is the go-to tool for evaluating IO performance on Linux. It's obvious why that's the case: sysstat is very useful, solid, and widely installed. System administrators can go a lot worse than taki
1.如何判断CPU.内存.磁盘的瓶颈? CPU瓶颈1) 查看CPU利用率.建议CPU指标如下 a) User Time:65%-70% b) System Time:30%-35% c) Idle:0%-5% 如果us,sy高于这个指标可以判断CPU有瓶颈 使用top查看 查看运行队列 每个CPU都会维持一个运行队列,理想情况下,调度器会不断让队列中的进程运行.进程不是处在sleep状态就是run able状态.如果CPU过载,就会出现调度器跟不上系统的要求,导致可运行的进程会填满队列.队列愈大
1.如何判断CPU.内存.磁盘的瓶颈? CPU瓶颈1) 查看CPU利用率.建议CPU指标如下 a) User Time:65%-70% b) System Time:30%-35% c) Idle:0%-5% 如果us,sy高于这个指标可以判断CPU有瓶颈 使用top查看 查看运行队列 每个CPU都会维持一个运行队列,理想情况下,调度器会不断让队列中的进程运行.进程不是处在sleep状态就是run able状态.如果CPU过载,就会出现调度器跟不上系统的要求,导致可运行的进程会填满队列.队列愈大
笔者历史文章: https://github.com/CarlJi/words 关于磁盘的使用,实际生产中以下问题会较为常见: No space left on device - 空间不足 Disk utilization 100% - 磁盘I/O过载 Too many open files - 文件句柄过多 Input/output error - 读写错误 而掌握常见的分析套路会事半功倍. Disk usage 第一时间明确磁盘容量及使用情况总是没错的,这时候df -h 命令就比较方便: $