DDR压力测试--stressapptest开源工具编译

一、介绍

Stressful Application Test(或stressapptest)试图最大化处理器和I/O到内存的随机流量,目的是创建一个现实的高负载情况。

stressapptest可以用于各种目的:

  • 压力测试
  • 硬件鉴定和调试。
  • 内存接口测试。
  • 磁盘测试

二、移植

下载:

https://github.com/stressapptest/stressapptest

或者

https://gitcode.net/mirrors/stressapptest/stressapptest?utm_source=csdn_github_accelerator

编译:

ubuntu下编译:

#1、添加交叉编译工具链到环境变量:XXX是你交叉编译工具链路径
export PATH=/XXX/usr/bin:$PATH
#注意:这样添加的环境变量只在当前窗口可用。
#2、编译
cd stressapptest-master/
./configure --host=XXX
#注意:XXX是你的目标主机。也就是你交叉编译工具链gnu前缀。比如你的交叉编译工具链是:aarch64-linux-gnu-gcc,那XXX就是aarch64-linux-gnu
make

测试:

编译生成的工具在src目录下的stressapptest,push到开发板上进行测试:

要执行,典型的命令是:

./stressapptest -s 20 -M 256 -m 8 -W    # Test 256MB, running 8 "warm copy" threads. Exit after 20 seconds.
./stressapptest --help                  # list the available arguments.

常见参数:

  • -M mbytes : megabytes of ram to test (auto-detect all memory available)
  • -s seconds : number of seconds to run (20)
  • -m threads : number of memory copy threads to run (auto-detect to number of CPUs)
  • -W : Use more CPU-stressful memory copy (false)
  • -n ipaddr : add a network thread connecting to system at 'ipaddr'. (none)
  • --listen : run a thread to listen for and respond to network threads. (0)
  • -f filename : add a disk thread with tempfile 'filename' (none)
  • -F : don't result check each transaction, use libc memcpy instead. (false)

错误处理:

  • -l logfile : log output to file 'logfile' (none)
  • -v level : verbosity (0-20) (default: 8)
./stressapptest -s 20 -M 256 -m 8 -C 8 -W # Allocate 256MB of memory and run 8 "warm copy" threads, and 8 cpu load threads. Exit after 20 seconds.
./stressapptest -f /tmp/file1 -f /tmp/file2 # Run 2 file IO threads, and autodetect memory size and core count to select allocated memory and memory copy threads.

结果: 

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值