Skip to content

Instantly share code, notes, and snippets.

@lxxstc
Last active December 14, 2015 23:49
Show Gist options
  • Save lxxstc/5168097 to your computer and use it in GitHub Desktop.
Save lxxstc/5168097 to your computer and use it in GitHub Desktop.
系统性能测试
time echo "scale=5000; a(1)*4" | bc -l > /dev/null
time dd bs=1M count=5000 if=/dev/zero of=/tmp/dd.test
time dd bs=1M count=5000 if=/tmp/dd.test of=/dev/null
rm -f /tmp/dd.test
# ramspeed http://alasir.com/software/ramspeed/
# 还有个SMP版的,可以学习源代码
wget www.alasir.com/software/ramspeed/ramspeed-2.6.0.tar.gz
tar zxf ramspeed-2.6.0.tar.gz
cd ramspeed-2.6.0
gcc -Wall -O2 -Wl,-O2 -Wl,-s ramspeed.c intmem.c intmark.c fltmark.c fltmem.c -o ramspeed
./ramspeed
# Server
nc -v -l 2222 > /dev/null
# Client
time dd if=/dev/zero bs=1M count=1000 | nc SERVER_HOST_NAME 2222 -v
tune2fs
blockdev
mount
umount
@lxxstc
Copy link
Author

lxxstc commented Mar 19, 2013

the scale is the total number of decimal digits after the decimal point. 保留小数点后几位
a (x) The arctangent of x, arctangent returns radians.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment