内存之压力测试

linux下内存测试方法:
第一步:
free查看系统

/ # free
              total         used         free       shared      buffers
  Mem:      7688848      1477184      6211664            0            0
 Swap:            0            0            0
Total:      7688848      1477184      6211664

上面free下面即为可用内存,单位byte;
第二步:
执行压力测试程序 ./stressapptest -s 多少秒 -M 多少M内存 &后台执行

/ # ./stressapptest -s 43200 -M 900 &
/ # Log: Commandline - ./stressapptest -s 43200 -M 900
Stats: SAT revision 1.0.1_autoconf, 32 bit binary
Log: root @ RAYS-0bedc0f6 on Sun Mar 14 18:59:09 UTC 2010 from open source release
Log: 1 nodes, 2 cpus.
Log: Defaulting to 2 copy threads
Log: Flooring memory allocation to multiple of 4: 900MB
Log: Using memaligned allocation at 0x3e7ed000.
Stats: Starting SAT, 900M, 43200 seconds
/ # 
/ # Log: Seconds remaining: 41320

注意:1.如果执行程序失败,执行chmod 777 stressapptest ;2.所跑内存不要超过free后查看的可用内存; 3.如果内存比较大,跑多个900,加上剩余内存; 4.stressapptest压力测试程序为32位多线程内存测试程序,单个可执行程序可跑内存范围为0~1500开区间; 5.执行时间一般选12小时,执行完毕会有内存测试结果

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

打工人1379号

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值