编辑推荐: |
本文来自于csdn,本文主要从性能指标、耗时分析、配置调优几方面进行数据分析。 |
|
TPS:每秒处理事务数。一般用于衡量服务器的处理能力,或者说服务器的吞吐率

1.场景:测试场景
2.系统资源:主要是CPU、内存、IO
3.成功率:超时、业务失败
4.耗时:业务处理时间
性能指标-vmstat
vmstat 命令报告关于内核线程、虚拟内存、磁盘、陷阱和 CPU 活动的统计信息

一般来说,id + us + sy = 100,一般认为id是空闲CPU使用率,us是用户CPU使用率,sy是系统CPU使用率

性能指标-CPU
使用命令top查看

性能指标-磁盘IO

使用命令iostat -t 1 -x查看:

性能指标-网络IO
使用命令dstat查看

使用命令ifconfig 查看

性能指标-内存
使用命令free -m 查看

1.Memory = free memory + buffers +
cached
2.Total 内存总数
3.Used 已经使用的内存数
4.Free 空闲的内存数
5.Shared 多个线程共享的内存总额
6.Buffers buffer Cache 和 cached page
cache 磁盘缓存的大小
使用命令top -d 1 查看

1.VIRI 是虚拟内存
2.RES是物理内存
耗时分析

对于单模块的系统,关注业务逻辑处理耗时,DB耗时
对于多模块的系统,关注接口耗时
配置调优


1.根据配置重要性,列出影响系统性能的列表
2.先测试影响最大的参数,参数之间一般不会相互影响
3.调整参数值,得出处理能力变化曲线 |