Fengguang Wu | 23 Jun 2012 17:07
Picon
Favicon

Re: rpcauth_lookup_credcache() lock contentions

On Sat, Jun 23, 2012 at 08:26:04PM +0800, Fengguang Wu wrote:
> Hi,
> 
> When doing parallel kernel builds on an NFSROOT system with 32 logical
> CPUs, I see half CPU time spent in kernel:
> 
> top - 20:08:28 up  5:01,  8 users,  load average: 62.97, 55.82, 54.56
> Tasks: 751 total,  80 running, 671 sleeping,   0 stopped,   0 zombie
> Cpu(s):  0.1%us, 53.5%sy, 46.4%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.1%si,  0.0%st
> Mem:  65401132k total, 36455604k used, 28945528k free,        0k buffers
> Swap:        0k total,        0k used,        0k free, 31858244k cached
> 
> The attached lock_stat shows that rpcauth_lookup_credcache() has the
> outstanding contentions.

Aha, I got some progress: 20% kernel time can be saved when increasing
the hash bits from 4 to 10 with sunrpc.auth_hashtable_size=10:

Cpu(s):  0.0%us, 38.3%sy, 61.6%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.1%si,  0.0%st

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                              class name    con-bounces    contentions   waittime-min   waittime-max waittime-total    acq-bounces  
acquisitions   holdtime-min   holdtime-max holdtime-total
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

               &(&dentry->d_lock)->rlock:     268601736      276206929           0.07       26627.70   496747630.48     2001328443     5557869248          
0.06       37208.89  1755583747.41
               -------------------------
               &(&dentry->d_lock)->rlock       24861581          [<ffffffff8116de34>] unlazy_walk+0x8a/0x1bb
               &(&dentry->d_lock)->rlock      148863110          [<ffffffff81177f50>] dput+0x46/0x17c
(Continue reading)


Gmane