Linux stress / speed test

From vpsget wiki
Jump to: navigation, search


test disk I/O

time sh -c "dd if=/dev/zero of=ddfile bs=8k count=250000 && sync"; rm ddfile

test with hdparm direct read:

hdparm -t /dev/sda2

test with hdparm cached read :

hdparm -T /dev/sda2

Stress test memory [fill memory up to 90%]:

stress --vm-bytes $(awk '/MemFree/{printf "%d\n", $2 * 0.9;}' < /proc/meminfo)k --vm-keep -m 1

Stress test cpu/io/vm:

stress --cpu 8 --io 16 --vm 32 --vm-bytes 256M --timeout 100000000s

Stres swith hdd

stress --cpu 12 --io 8 --vm 2 --vm-bytes 512M --hdd 1 --hdd-bytes 1024K --timeout 100000000s

You can also use cpuburn utility for cpu stress test

load 1 CPU core:

 dd if=/dev/zero of=/dev/null

Load more cpu cores:

fulload() { dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null & }; fulload; read; killall dd

Stress test ALL RAM (99%),CPU,VM,IO: //example may be varied on difer systems , decrease/increase hdd, cpu, io values up to your system load; monitor with tools like atop, also suggested to run in screen for 24h

 stress --vm-bytes $(awk '/MemFree/{printf "%d\n", $2 * 0.99;}' < /proc/meminfo)k --vm-keep -m 1 --cpu 16 --io 8 --hdd 32 --hdd-bytes 1024k --timeout 900000000s 

Test storage with bonnie++ and use all memory, assuming we have server with 96GB RAM:

bonnie++ -u root  -d /vz/ -r 96000 

ssd HW raid-10 test:

[root@node1 ~]# time sh -c "dd if=/dev/zero of=ddfile bs=512k count=250000 && sync"; rm ddfile
dd: writing `ddfile': No space left on device
95899+0 records in
95898+0 records out
50278379520 bytes (50 GB) copied, 54.3888 s, 924 MB/s

Also use FIO for complete IOPS test:;_centos