Lmbench micro benchmark

Collect data on the target

# opkg install lmbench

Note: netstat -i is not supported by busybox. It is not used for the benchmarks, only to describe the machine

Make sure to stop all other tasks

# /etc/init.d/runit.sh stop
# lmbench-run

Switch kernel with you want to compare, then run again

Configuration

Configuration is created once stored in /usr/share/lmbench/scripts

FSDIR must not be /tmp which is stored in RAM

mkdir /home/root/lmbench-tmp

dSSE:

MULTIPLE COPIES [default 1]: 1
Job placement selection [default 1]: 1
MB [default 512]: 512
SUBSET (ALL|HARWARE|OS|DEVELOPMENT) [default all]: all # TODO
FASTMEM [default no]: no # TODO, might take log
SLOWFS [default no]: no
DISKS [default none]: /dev/mmcblk0p5
/dev/mmcblk0p5 is a: emmc
REMOTE [default none]: none
FSDIR [default /var/tmp] : /home/root/lmbench-tmp
Status output file [default /dev/tty] : /dev/tty # log to console
Mail results [default yes]: no

Compare results

You need perl/groff to evaluate the results, copy them to your host and evaluate there

http://lmbench.sourceforge.net/

$ apt-get source lmbench

Copy the results from the target to you host

$ mkdir results/targetXX
$ scp -r root@192.168.13.137:/usr/share/lmbench/results/armv7l-linux-gnu/'*' results/dSSE/

See results/Makefile, what aggregation can be done on the raw reslts

$ cd results
$ make summary
$ make stats

Example

To evaluate if new kernel performs similar to old kernel, compare sections.

- Local Communication latencies in microseconds
- File & VM system latencies in microseconds

These reflect changes in OS, basic int/float are bound to physical chip

File & VM system latencies in microseconds - smaller is better
-------------------------------------------------------------------------------
Host                 OS   0K File      10K File     Mmap    Prot   Page   100fd
                        Create Delete Create Delete Latency Fault  Fault  selct
--------- ------------- ------ ------ ------ ------ ------- ----- ------- -----
0-legacy  Linux 3.0.35-   40.3   38.4  252.5   85.9   13.8K       2.79540 6.283 // legacy kernel
8-737465b Linux 4.1.19-   46.6   38.2  246.9  104.2   17.4K       1.31400 6.756 // dropped CONFIG_PROVE_LOCKING..
9-eeccc0c Linux 4.1.19-  156.3  134.2  755.3  314.7   63.2K       3.03090  15.8 // kernel with CONFIG_PROVE_LOCKING
*Local* Communication latencies in microseconds - smaller is better
---------------------------------------------------------------------
Host                 OS 2p/0K  Pipe AF     UDP  RPC/   TCP  RPC/ TCP
                        ctxsw       UNIX         UDP         TCP conn
--------- ------------- ----- ----- ---- ----- ----- ----- ----- ----
0-legacy  Linux 3.0.35-  13.6  81.1 56.8  91.4       157.4       168.
8-737465b Linux 4.1.19- 6.790  16.5 27.9  53.9        80.2       293.
9-eeccc0c Linux 4.1.19- 0.390  87.0 106. 187.9       263.8       950.