Memory allocation performance

Bruce Evans brde at
Sun Feb 3 18:40:44 PST 2008

On Mon, 4 Feb 2008, Alexander Motin wrote:

> Kris Kennaway wrote:
>> You can look at the raw output from pmcstat, which is a collection of 
>> instruction pointers that you can feed to e.g. addr2line to find out 
>> exactly where in those functions the events are occurring.  This will often 
>> help to track down the precise causes.
> Thanks to the hint, it was interesting hunting, but it shown nothing. It hits 
> into very simple lines like:
> bucket = cache->uc_freebucket;
> cache->uc_allocs++;
> if (zone->uz_ctor != NULL) {
> cache->uc_frees++;
> and so on.
> There is no loops, there is no inlines or macroses. Nothing! And the only 
> hint about it is a huge number of "p4-resource-stall"s in those lines. I have 
> no idea what exactly does it means, why does it happens mostly here and how 
> to fight it.

Try profiling it one another type of CPU, to get different performance
counters but hopefully not very different stalls.  If the other CPU doesn't
stall at all, put another black mark against P4 and delete your copies of
it :-).


More information about the freebsd-performance mailing list