FreeBSD SMP - kernel compilation bench


I made something like an application level benchmark to bench the performance of the FreeBSD SMP (Symmetric Multi Processing) kernel against the normal one.

My application was compiling my FreeBSD custom kernel. I tried several -j options for make to find out optimal values for that kind of equipment und to make best use out of FreeBSD-SMP.

I got interesting results by doing that under a normal FreeBSD-current kernel environment, a SMP kernel running only one CPU and doing that on a SMP kernel and using the two CPU's.

You can see this kind of tests already in PC magazines like C't, where they bench the compile time for a Linux kernel.

All test were performed in single user mode using FreeBSD-current's kernel sources of May, 1st 1997.

My test equipment

FreeBSD-current uni-processor kernel
jobs (make -j) time real [s] time user [s] time sys [s]
1 262.09 189.47 15.21
2 215.58 191.09 16.24
4 213.17 191.39 19.49
8 213.24 191.91 19.40
16 215.19 192.10 19.31

FreeBSD-current custom SMP kernel 1 CPU
jobs (make -j) time real [s] time user [s] time sys [s]
1 269.95 189.22 23.39
2 222.68 191.38 23.03
4 218.24 192.00 23.47
8 217.93 191.35 24.29
16 220.15 191.58 24.26

FreeBSD-current custom SMP kernel 2 CPUs
jobs (make -j) time real [s] time user [s] time sys [s]
1 252.35 144.69 75.06
2 137.06 169.23 56.46
4 119.95 176.02 53.25
8 119.08 175.47 54.97
16 120.03 178.42 53.32

Some performance figures


Figure 1: real time in seconds

This figure shows two things:


Figure 2: user time in seconds

Although the SMP kernel with one CPU is a little slower, you see, that user time is about the same !


Figure 3: sys time (kernel mode) in seconds


Andreas Klemm
Last modified: Thu May 1 18:53:11 CEST 1997