Difference between revisions of "Linux stress / speed test"

From vpsget wiki
Jump to: navigation, search
(Created page with "DRAFT! 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 cach...")
 
Line 2: Line 2:
  
 
test disk I/O
 
test disk I/O
 
 
  time sh -c "dd if=/dev/zero of=ddfile bs=8k count=250000 && sync"; rm ddfile
 
  time sh -c "dd if=/dev/zero of=ddfile bs=8k count=250000 && sync"; rm ddfile
  
Line 10: Line 9:
 
test with hdparm cached read :
 
test with hdparm cached read :
 
  hdparm -T /dev/sda2
 
  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
 +
 +
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

Revision as of 13:12, 10 April 2015

DRAFT!

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

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