Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1472182
| From | Aruna Ramakrishna <aruna.ramakrishna@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 resend] mm/slab: Improve performance of gathering slabinfo stats |
| Date | 2016-08-30 02:50 +0200 |
| Message-ID | <sbFpw-62D-5@gated-at.bofh.it> (permalink) |
| References | <sbFpw-62D-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 08/29/2016 05:44 PM, Aruna Ramakrishna wrote: > On large systems, when some slab caches grow to millions of objects (and > many gigabytes), running 'cat /proc/slabinfo' can take up to 1-2 seconds. > During this time, interrupts are disabled while walking the slab lists > (slabs_full, slabs_partial, and slabs_free) for each node, and this > sometimes causes timeouts in other drivers (for instance, Infiniband). > > This patch optimizes 'cat /proc/slabinfo' by maintaining a counter for > total number of allocated slabs per node, per cache. This counter is > updated when a slab is created or destroyed. This enables us to skip > traversing the slabs_full list while gathering slabinfo statistics, and > since slabs_full tends to be the biggest list when the cache is large, it > results in a dramatic performance improvement. Getting slabinfo statistics > now only requires walking the slabs_free and slabs_partial lists, and > those lists are usually much smaller than slabs_full. We tested this after > growing the dentry cache to 70GB, and the performance improved from 2s to > 5ms. > > Signed-off-by: Aruna Ramakrishna <aruna.ramakrishna@oracle.com> > Cc: Mike Kravetz <mike.kravetz@oracle.com> > Cc: Christoph Lameter <cl@linux.com> > Cc: Pekka Enberg <penberg@kernel.org> > Cc: David Rientjes <rientjes@google.com> > Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> > Cc: Andrew Morton <akpm@linux-foundation.org> > --- > Note: this has been tested only on x86_64. > This patch has spawned off a very interesting discussion in a older thread, and I guess the latest incarnation of this patch got buried. I'm resending it for review/approval. Thanks, Aruna
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 resend] mm/slab: Improve performance of gathering slabinfo stats Aruna Ramakrishna <aruna.ramakrishna@oracle.com> - 2016-08-30 02:50 +0200 Re: [PATCH v4 resend] mm/slab: Improve performance of gathering slabinfo stats Aruna Ramakrishna <aruna.ramakrishna@oracle.com> - 2016-08-30 02:50 +0200 Re: [PATCH v4 resend] mm/slab: Improve performance of gathering slabinfo stats Joe Perches <joe@perches.com> - 2016-08-30 03:10 +0200
csiph-web