linux测试ram速度程序,在linux / arm下对RAM(无ECC)进行基准测试的最佳方法是什么?...

这是我有时测试ram的方式:首先挂载两个tmpfs(默认情况下,tmpfs是ram的一半):

# mount -t tmpfs /mnt/test1 /mnt/test1

# mount -t tmpfs /mnt/test2 /mnt/test2

检查空闲内存和可用空间:

# free

total used free shared buffers cached

Mem: 252076 234760 17316 0 75856 62328

-/+ buffers/cache: 96576 155500

Swap: 1048820 332 1048488

# df -h -t tmpfs

Sys. de fich. Tail. Occ. Disp. %Occ. Monté sur

tmpfs 124M 0 124M 0% /lib/init/rw

udev 10M 104K 9,9M 2% /dev

tmpfs 124M 0 124M 0% /dev/shm

/mnt/test1 124M 0 124M 0% /mnt/test1

/mnt/test2 124M 0 124M 0% /mnt/test2

现在用dd填充tmpfs:

# dd if=/dev/zero of=/mnt/test1/test bs=1M

dd: écriture de `/mnt/test1/test': Aucun espace disponible sur le périphérique

123+0 enregistrements lus

122+0 enregistrements écrits

128802816 octets (129 MB) copiés, 1,81943 seconde, 70,8 MB/s

# dd if=/dev/zero of=/mnt/test2/test bs=1M

dd: écriture de `/mnt/test2/test': Aucun espace disponible sur le périphérique

123+0 enregistrements lus

122+0 enregistrements écrits

128802816 octets (129 MB) copiés, 5,78563 seconde, 22,3 MB/s

你可以检查你的记忆是否真的很满:

# free

total used free shared buffers cached

Mem: 252076 248824 3252 0 1156 226380

-/+ buffers/cache: 21288 230788

Swap: 1048820 50020 998800

现在您可以运行各种测试,例如检查两个临时文件是否相同,直接或运行md5sum,sha1sum等:

# time cmp /mnt/test1/test /mnt/test2/test

real 0m4.328s

user 0m0.041s

sys 0m1.117s

关于温度监控,我只知道lm-sensors.我不知道它是否管理你的特定硬件,但你可能还是试试看.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值