欢迎访问我的个人网站获取更佳排版体验: https://pengrl.com/p/42434/ (stress - 系统压力模拟工具 | yoko blog)
前言
stress
是一个故意制造系统压力的工具。它提供了一系列的参数用于配置如何制造CPU,内存,IO操作,磁盘压力。
安装
# centos平台
$yum install epel-release
$yum install stress
参数说明
-c, --cpu N
spawn N workers spinning on sqrt()
启动n个worker循环执行sqrt计算,用于模拟cpu型进程
-i, --io N
spawn N workers spinning on sync()
循环执行sync,模拟io型进程
-m, --vm N
spawn N workers spinning on malloc()/free()
循环调用malloc和free申请和释放内存
--vm-bytes B
malloc B byt