Benchmarking

From Gentoo Wiki
Jump to:navigation Jump to:search

This article describes various methods of system benchmarking on Linux. It covers CPUs, power usage, RAM, and graphics.

Power usage

sys-power/powertop can guess the computer's current power usage in watts.

root #powertop -d | grep usage
Power usage (ACPI estimate): 15.7W (0.5 hours)

CPU

time

root #time emerge -1 coreutils
real	2m33.483s
user	2m6.310s
sys	0m55.257s

RAM

ramspeed

app-benchmarks/ramspeed can measure the computer's ram speed.

user $ramspeed -b1 -m4 | grep 4096 && ramspeed -b2 -m4 | grep 4096
INTEGER & WRITING      4096 Kb block: 1948.94 MB/s
INTEGER & READING      4096 Kb block: 5208.66 MB/s

Hard drive

hdparm

root #hdparm -tT /dev/sda
/dev/sda:
 Timing cached reads:   1076 MB in  2.00 seconds = 538.08 MB/sec
 Timing buffered disk reads: 242 MB in  3.01 seconds =  80.32 MB/sec

time

user $time bzip2 -c patch-3.3 > patch-3.3.bz2
real	0m13.272s
user	0m7.606s
sys	0m0.054s
user $time eix search
<snip>

real	0m0.363s
user	0m0.066s
sys	0m0.008s

OpenGL

Nexuiz

Install

root #emerge --ask games-fps/nexuiz

Reset default options

If you have played nexuiz you should reset to default options for canonical benchmark results.

user $rm -r ~/.nexuiz/

Benchmark

user $nexuiz-glx -benchmark demos/demo1 -nosound 2>&1 | egrep -e '[0-9]+ frames'
1910 frames 42.0330749 seconds 45.4404063 fps, one-second fps min/avg/max: 35 46 63 (90 seconds)

Xonotic

Install

root #emerge --ask games-fps/xonotic

Reset

If you have played Xonotic you should reset to default options for canonical benchmark results.

user $rm -r ~/.xonotic/

Benchmark

user $xonotic-glx -benchmark demos/the-big-keybench 2>&1 | egrep -e '[0-9]+ frames'
12568 frames 556.0637400 seconds 22.6017255 fps, one-second fps min/avg/max: 19 23 27 (207 seconds)

glxgears

Note
glxgears is a very basic OpenGL support test, it is not a real benchmark tool!

Obtain glxgears by emerging x11-apps/mesa-progs.

user $vblank_mode=0 glxgears & sleep 15 ; killall glxgears
5762 frames in 5.0 seconds = 1152.369 FPS
5806 frames in 5.0 seconds = 1161.017 FPS

See also

  • PowerTOP — a Linux utility that can monitor and display a system's electrical power usage.

External resources