Benchmark

From LQWiki
(Redirected from Benchmarking)
Jump to navigation Jump to search

A benchmark is everything that gives you an idea about performance. For your Linux, you can use the following benchmarks:

Disk I/O

Best, use

hdparm -tT

or use a file system benchmark on the same file system to compare disks. You can also use dd, but read Background: How Caches work first.

File system

Network

For network, you have to take into consideration Bandwidth, latency and throughput. Use ethtool to find out if your NIC is set to 10, 100 or 1000 Mb/s.

Throughput

Use netcat, for example on the receiver:

netcat -l -p 8000 >/dev/null

and on the sender in the bash:

dd if=test bs=1024K count=512 > /dev/tcp/192.168.0.9/8000 

a result can be:

4887552 bytes (4.9 MB) copied, 4.3689 s, 1.1 MB/s

An interesting thing is that if you forget the >/dev/null you will come to a pretty constant value which is useless because it tells you how quickly the shell can write nulls.

Latency

Use ping.

Web server

Use ab.

Graphic card

Watching a video feels sluggish on one computer, but on the other it is okay ? Test your graphics card with glxgears like this:

$ glxgears
359 frames in 5.1 seconds = 70.397 FPS
320 frames in 5.1 seconds = 62.590 FPS
320 frames in 5.3 seconds = 60.201 FPS
320 frames in 5.1 seconds = 63.046 FPS
300 frames in 5.4 seconds = 55.305 FPS
340 frames in 5.4 seconds = 62.724 FPS
300 frames in 5.2 seconds = 57.543 FPS
340 frames in 5.4 seconds = 62.483 FPS
320 frames in 5.1 seconds = 62.149 FPS
320 frames in 5.2 seconds = 61.365 FPS
300 frames in 5.1 seconds = 59.275 FPS
320 frames in 5.5 seconds = 58.109 FPS
320 frames in 5.1 seconds = 62.149 FPS

See also