linux 性能分析
相关工具
压测工具
- stress: A tool to put given subsystems under a specified load
性能监控工具
- sysstat: Collection of performance monitoring tools for Linux
- mpstat : Report processors related statistics.
- pidstat : Report statistics for Linux tasks.
- iostat : Report Central Processing Unit (CPU) statistics and input/output statistics for devices and partitions.
- sar : Collect, report, or save system activity information.
rpm -ql sysstat grep bin
cpu 信息
us - Time spent in user space sy - Time spent in kernel space ni - Time spent running niced user processes (User defined priority) id - Time spent in idle operations wa - Time spent on waiting on IO peripherals (eg. disk) hi - Time spent handling hardware interrupt routines. (Whenever a peripheral unit want attention form the CPU, it literally pulls a line, to signal the CPU to service it) si - Time spent handling software interrupt routines. (a piece of code, calls an interrupt routine…) st - Time spent on involuntary waits by virtual cpu while hypervisor is servicing another processor (stolen from a virtual machine)
- vmstat : Report virtual memory statistics
processes, memory, paging, block IO, traps, disks and cpu activity
- cgroup
- cfs_period/quota
- cpu shares
- Cpusets
-
cfs/rt
- cpu utility
Memory
- 大页内存
- 代码段
- RO data
- RW data
GPU/FPGA/TPU/ASIC
Burst feature
Gcc & Clang/LLVM
Storage
- Buffer –> Disk
- Cache –> File System
Creating and organizing cgroups
I’ll Do It Later: Softirqs, Tasklets, Bottom Halves, Task Queues, Work Queues and Timers