Linux性能优化大师(基准测试)
2019-02-28 本文已影响30人
SkTj
1、cpu benchmark:nbench
wget http://www.math.utah.edu/~mayer/linux/nbench-byte-2.2.3.tar.gz
tar zxvf nbench-byte-2.2.3.tar.gz
cd nbench-byte-2.2.3
yum install glibc-static -y
make
./nbench
2、内存测试工具:stream
wget http://www.nersc.gov/assets/Trinity--NERSC-8-RFP/Benchmarks/Jan9/stream.tar
tar xvf stream.tar
gcc -o stream stream.c
./stream
3、网络性能测试工具:netperf
git clone https://github.com/HewlettPackard/netperf.git
bash autogen.sh
yum install -y gcc gcc++ texinfo
./configure&&make&&make install
netserver
netperf -H 127.0.0.1 -t TCP_STREAM -l 30
netperf -H 127.0.0.1 -t UDP_STREAM -l 30
netperf -H 127.0.0.1 -t TCP_RR -l 30
netperf -H 127.0.0.1 -t UDP_RR -l 30
4、IO性能测试:iozone
rpm -ivh http://www.iozone.org/src/current/iozone-3-487.src.rpm
cd /root/rpmbuild/SOURCES/
tar xvf iozone3_487.tar
cd iozone3_487/src/current
make && make linux
/root/rpmbuild/SOURCES/iozone3_487/src/current/iozone –a –g 1G –i0 –i1 –Rb ioperf.xls