1 The following is a demonstration of the cpuwalk.d script,
4 cpuwalk.d is not that useful on a single CPU server,
7 Sampling... Hit Ctrl-C to end.
12 value ------------- Distribution ------------- count
14 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 30
17 PID: 8079 CMD: mozilla-bin
19 value ------------- Distribution ------------- count
21 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 10
24 The output above shows that PID 18843, "bash", was sampled on CPU 0 a total
25 of 30 times (we sample at 1000 hz).
29 The following is a demonstration of running cpuwalk.d with a 5 second
30 duration. This is on a 4 CPU server running a multithreaded CPU bound
31 application called "cputhread",
38 value ------------- Distribution ------------- count
40 2 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 30
43 PID: 12186 CMD: cputhread
45 value ------------- Distribution ------------- count
53 As we are sampling at 1000 hz, the application cputhread is indeed running
54 concurrently across all available CPUs. We measured the applicaiton on
55 CPU 0 a total of 4900 times, on CPU 1 a total of 4900 times, etc. As there
56 are around 5000 samples per CPU available in this 5 second 1000 hz sample,
57 the application is using almost all the CPU capacity in this server well.
61 The following is a similar demonstration, this time running a multithreaded
62 CPU bound application called "cpuserial" that has a poor use of locking
63 such that the threads "serialise",
69 PID: 12194 CMD: cpuserial
71 value ------------- Distribution ------------- count
75 2 |@@@@@@@@@@@@@@@@@@@@@@@@@ 3840
79 In the above, we can see that this CPU bound application is not making
80 efficient use of the CPU resources available, only reaching 3840 samples
81 on CPU 2 out of a potential 5000. This problem was caused by a poor use