Benchmark Programs

From eLinux.org
Revision as of 11:34, 7 June 2007 by Tim Bird (talk | contribs) (offset benchmark warning, and fix wording)
Jump to: navigation, search

Here are some different programs for performing benchmarking.

Note: It is important to recognize that benchmarks between systems may be misleading. Benchmarks should primarily be used to determine differences in performance for different software configurations on the same hardware system.

Unix Bench

FYI, the URL to the UnixBench is as follows;

http://www.tux.org/pub/tux/benchmarks/System/unixbench/

UnixBench contains 9 kinds of tests:

  1. Dhrystone 2 using register variables
  2. Double-Precision Whetstone
  3. Execl Throughput
  4. File Copy
  5. Pipe Throughput
  6. Pipe-based Context Switching
  7. Process Creation
  8. Shell Script
  9. System Call Overhead

UnixBench is preferred over lmbench since (according to reports) lmbench cannot be easily cross-compiled.

I have cross-compiled lmbench - it's not too hard. My target didn't have "make" or a compiler, but it did have bash.

Here is my recipe:

  1. Obtain lmbench. Make sure to get it from sourceforge (I used 3.0-a4), not bitmover, because the bitmover package is slightly tangled with a bitkeeper file "bk.ver". It's
  2. relatively easy to debug and disentangle it, but someone's already done that and put it up on sourceforge.
  3. Unpack lmbench in your build system.
  4. cd to lmbench-3.0-a4/src. Note that this is not the top level, which does have a Makefile.
  5. do "make OS=armv5EJl-linux-gnu CC=arm-linux-gcc" (or whatever your os and cross-compiler are)
  6. After everything is compiled, transport the whole directory tree to the target.
  7. cd to lmbench-3.0-a4/scripts
  8. Do ./config.run and answer some questions. This creates a config file that you can reuse.
  9. Do ./results
  10. Inside lmbench-3.0-a4/results will be a folder named armv5EJl-linux-gnu or something similar; inside that folder is a text file named imx21_199.0 or something similar.
  11. This is the raw lmbench results. Transport it back to civilization.
  12. When lmbench tries to save the results, it increments the last part ".0" until it finds an unused name. Therefore, you can rerun lmbench many times with a simple one-line
  13. bash script "for i in {1..100}; do ./results; done", and the result files will not overlap.
  14. You can get various kinds of summary postprocessing from lmbench. The "getsummary" script was sufficient for my purposes.
  15. To figure out which binary is generating which measurement, it may be useful to read the "lmbench" shell script in parallel with the raw results file.

lmbench

The LMBench home page is at: http://www.bitmover.com/lmbench/ The sourceforge project page is at: http://sourceforge.net/projects/lmbench