Tuesday, June 24, 2008

Current CPU usage

Where's the CPU going?

Here's an oprofile output from a very naive custom polygraph workload, ~ 1000 requests a second, ~14kbyte objects. MemPools are disabled; Zero buffers are off so the majority of the allocations aren't zero'ed.


Note that somehow, memPoolAlloc takes 4% of CPU even with memory pools switched off. The allocations still go via the pool code but deallocations aren't "cached". What the hell is taking the 4% of CPU time?



CPU: AMD64 processors, speed 2613.43 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 100000
samples % image name symbol name
176014 6.7039 libc-2.6.1.so _int_malloc
160779 6.1236 libc-2.6.1.so memcpy
128371 4.8893 libc-2.6.1.so malloc_consolidate
123734 4.7127 squid memPoolAlloc
101514 3.8664 libc-2.6.1.so free
76772 2.9240 libc-2.6.1.so _int_free
55696 2.1213 libc-2.6.1.so malloc
55681 2.1207 libc-2.6.1.so vfprintf
50245 1.9137 libc-2.6.1.so calloc
48095 1.8318 squid httpHeaderIdByName
41172 1.5681 libm-2.6.1.so floor
37573 1.4310 libc-2.6.1.so re_search_internal
37434 1.4258 libc-2.6.1.so memchr
36536 1.3916 squid xfree
30646 1.1672 libc-2.6.1.so memset
30576 1.1646 squid memPoolFree
30108 1.1467 squid headersEnd
28626 1.0903 squid httpHeaderGetEntry
26668 1.0157 squid storeKeyHashCmp
...

No comments:

Post a Comment