大网数据广告活动
服务器运维问答

How can I variably stress test a server with Ubuntu?

· 52CE 我爱测

I need to stress test a group of servers but is there a way to stress test a normal Ubuntu instance that doesn't just whack the CPU percentage up to 100%. Something that holds the CPU at 60% for example or does variable stress te…

问题原文

原帖链接 · Erdss4 · CC BY-SA 4.0

I need to stress test a group of servers but is there a way to stress test a normal Ubuntu instance that doesn't just whack the CPU percentage up to 100%. Something that holds the CPU at 60% for example or does variable stress tests that keep the CPU fluctuating? I just want something simple that doesn't just whack the CPU up to 100% right away.

已采纳解答

原帖链接 · Fsoc · CC BY-SA 4.0

For specifying the load on cpu You could use stress-ng. It has an option to so that one can specify 0 for the number of stressor processes to match the number of on-line CPUs, so to load each cpu at say 40% You can do:

stress-ng -c 0 -l 40

As for testing a group of server there are various solutions for example You could use Siege.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-01-06)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。