Re: [PATCH] procfs: provide slub's /proc/slabinfo

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Matt Mackall <mpm@...>
Cc: Christoph Lameter <clameter@...>, Ingo Molnar <mingo@...>, Linus Torvalds <torvalds@...>, Hugh Dickins <hugh@...>, Andi Kleen <andi@...>, Peter Zijlstra <a.p.zijlstra@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Monday, January 7, 2008 - 2:06 pm

Hi Matt,

On Sun, 6 Jan 2008, Matt Mackall wrote:

Sorry, I once again have bad news ;-). I did some testing with

  lguest --block=<rootfile> 32 /boot/vmlinuz-2.6.24-rc6 root=/dev/vda init=doit

where rootfile is

  http://uml.nagafix.co.uk/BusyBox-1.5.0/BusyBox-1.5.0-x86-root_fs.bz2

and the "doit" script in the guest passed as init= is just

  #!/bin/sh
  mount -t proc proc /proc
  cat /proc/meminfo | grep MemTotal
  cat /proc/meminfo | grep MemFree
  cat /proc/meminfo | grep Slab

and the results are:

[ the minimum, maximum, and average are of captured from 10 individual runs ]

                                 Free (kB)             Used (kB)
                    Total (kB)   min   max   average   min  max  average
  SLUB (no debug)   26536        23868 23892 23877.6   2644 2668 2658.4
  SLOB              26548        23472 23640 23579.6   2908 3076 2968.4
  SLAB (no debug)   26544        23316 23364 23343.2   3180 3228 3200.8
  SLUB (with debug) 26484        23120 23136 23127.2   3348 3364 3356.8

So it seems that on average SLUB uses 300 kilobytes *less memory* (!) (which is
roughly 1% of total memory available) after boot than SLOB for my
configuration.

One possible explanation is that the high internal fragmentation (space
allocated but not used) of SLUB kmalloc() only affects short-lived allocations
and thus does not show up in the more permanent memory footprint.  Likewise, it
could be that SLOB has higher external fragmentation (small blocks that are
unavailable for allocation) of which SLUB does not suffer from.  Dunno, haven't
investigated as my results are contradictory to yours.

I am beginning to think this is highly dependent on .config so would you mind
sending me one you're using for testing, Matt?

			Pekka
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] procfs: provide slub's /proc/slabinfo, Hugh Dickins, (Wed Jan 2, 2:43 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Pekka Enberg, (Wed Jan 2, 3:09 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Linus Torvalds, (Wed Jan 2, 3:35 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Matt Mackall, (Wed Jan 2, 6:50 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Ingo Molnar, (Thu Jan 3, 4:52 am)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Christoph Lameter, (Thu Jan 3, 4:31 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Matt Mackall, (Thu Jan 3, 12:46 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Christoph Lameter, (Thu Jan 3, 10:21 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Matt Mackall, (Fri Jan 4, 12:11 am)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Pekka J Enberg, (Sat Jan 5, 12:21 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Matt Mackall, (Sun Jan 6, 1:51 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Pekka J Enberg, (Mon Jan 7, 2:06 pm)
[RFC PATCH] greatly reduce SLOB external fragmentation, Matt Mackall, (Wed Jan 9, 3:15 pm)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Pekka J Enberg, (Thu Jan 10, 6:03 am)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Pekka J Enberg, (Thu Jan 10, 6:02 am)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Pekka J Enberg, (Thu Jan 10, 6:54 am)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Linus Torvalds, (Thu Jan 10, 12:13 pm)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Pekka J Enberg, (Wed Jul 30, 5:51 pm)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Linus Torvalds, (Wed Jul 30, 6:00 pm)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Christoph Lameter, (Thu Jul 31, 10:26 am)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Christoph Lameter, (Thu Jul 31, 11:42 am)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Christoph Lameter, (Thu Jul 31, 11:25 am)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Christoph Lameter, (Thu Jul 31, 12:05 pm)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Linus Torvalds, (Wed Jul 30, 6:35 pm)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Christoph Lameter, (Thu Jan 10, 3:16 pm)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Christoph Lameter, (Thu Jan 10, 3:31 pm)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Linus Torvalds, (Thu Jan 10, 2:28 pm)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Linus Torvalds, (Thu Jan 10, 3:41 pm)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Christoph Lameter, (Thu Jan 10, 3:52 pm)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Christoph Lameter, (Thu Jan 10, 3:46 pm)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Christoph Lameter, (Thu Jan 10, 3:24 pm)
Re: [RFC PATCH] greatly reduce SLOB external fragmentation, Christoph Lameter, (Thu Jan 10, 3:51 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Matt Mackall, (Mon Jan 7, 3:03 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Pekka J Enberg, (Thu Jan 10, 6:04 am)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Pekka J Enberg, (Mon Jan 7, 4:44 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Pekka J Enberg, (Mon Jan 7, 3:53 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Christoph Lameter, (Sat Jan 5, 4:05 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Pekka J Enberg, (Mon Jan 7, 4:12 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Andi Kleen, (Sat Jan 5, 1:14 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Christoph Lameter, (Fri Jan 4, 4:34 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Matt Mackall, (Fri Jan 4, 4:55 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Christoph Lameter, (Fri Jan 4, 5:36 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Matt Mackall, (Fri Jan 4, 6:30 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Christoph Lameter, (Sat Jan 5, 4:16 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Andi Kleen, (Thu Jan 3, 10:45 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Peter Zijlstra, (Fri Jan 4, 5:17 am)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Christoph Lameter, (Fri Jan 4, 4:37 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Matt Mackall, (Fri Jan 4, 12:34 am)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Pekka Enberg, (Wed Jan 2, 3:49 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Linus Torvalds, (Wed Jan 2, 3:45 pm)
Re: [PATCH] procfs: provide slub's /proc/slabinfo, Christoph Lameter, (Wed Jan 2, 2:53 pm)