public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* How to find slab\'s usage?
@ 2007-10-12  7:01 Tetsuo Handa
  2007-10-13  7:43 ` Pekka Enberg
  0 siblings, 1 reply; 7+ messages in thread
From: Tetsuo Handa @ 2007-10-12  7:01 UTC (permalink / raw)
  To: linux-kernel

Hello.

I was compiling Ubuntu 7.10's kernel and I encountered OOM-killer.

I saw /proc/meminfo and it seems to me that slab is leaking memory.
But /usr/bin/slabtop claims /proc/slabinfo is missing.

I couldn't continue the compilation before reboot.
I could continue the compilation after reboot.
So, I think this is a memory leak.
How can I find slab that uses so much memory?

Regards.



# cat /proc/version
Linux version 2.6.22-14-server (buildd@vernadsky) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Wed Oct 10 06:35:59 GMT 2007

# cat /proc/meminfo
MemTotal:       515756 kB
MemFree:         24628 kB
Buffers:          1372 kB
Cached:          15324 kB
SwapCached:          0 kB
Active:          15140 kB
Inactive:         5936 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       515756 kB
LowFree:         24628 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:              12 kB
Writeback:           8 kB
AnonPages:        4396 kB
Mapped:           1076 kB
Slab:           311236 kB
SReclaimable:    11268 kB
SUnreclaim:     299968 kB
PageTables:        264 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:    257876 kB
Committed_AS:     7780 kB
VmallocTotal:   511992 kB
VmallocUsed:      2204 kB
VmallocChunk:   509364 kB

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to find slab\'s usage?
  2007-10-12  7:01 How to find slab\'s usage? Tetsuo Handa
@ 2007-10-13  7:43 ` Pekka Enberg
  2007-10-13  8:02   ` Tetsuo Handa
  0 siblings, 1 reply; 7+ messages in thread
From: Pekka Enberg @ 2007-10-13  7:43 UTC (permalink / raw)
  To: Tetsuo Handa; +Cc: linux-kernel

Hi,

On 10/12/07, Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote:
> I saw /proc/meminfo and it seems to me that slab is leaking memory.
> But /usr/bin/slabtop claims /proc/slabinfo is missing.

Do you have CONFIG_SLUB enabled? Try looking into /sys/slab/.

                                      Pekka

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to find slab\'s usage?
  2007-10-13  7:43 ` Pekka Enberg
@ 2007-10-13  8:02   ` Tetsuo Handa
  2007-10-13  8:10     ` Pekka Enberg
  2007-10-13  8:10     ` Eric Dumazet
  0 siblings, 2 replies; 7+ messages in thread
From: Tetsuo Handa @ 2007-10-13  8:02 UTC (permalink / raw)
  To: penberg; +Cc: linux-kernel

Hello.

Pekka Enberg wrote:
> > I saw /proc/meminfo and it seems to me that slab is leaking memory.
> > But /usr/bin/slabtop claims /proc/slabinfo is missing.
> 
> Do you have CONFIG_SLUB enabled? Try looking into /sys/slab/.

Yes. There is /sys/slab/ .
But are there any tools for browsing like /usr/bin/slabtop ?
Is
  cd /sys/slab/; for i in *; do echo -n $i " "; cat $i/slabs; done
the only way currently available?

Thank you.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to find slab\'s usage?
  2007-10-13  8:02   ` Tetsuo Handa
@ 2007-10-13  8:10     ` Pekka Enberg
  2007-10-15 18:51       ` Christoph Lameter
  2007-10-13  8:10     ` Eric Dumazet
  1 sibling, 1 reply; 7+ messages in thread
From: Pekka Enberg @ 2007-10-13  8:10 UTC (permalink / raw)
  To: Tetsuo Handa; +Cc: linux-kernel, Christoph Lameter, Albert Cahalan

Hi,

On 10/12/07, Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote:
> > > I saw /proc/meminfo and it seems to me that slab is leaking memory.
> > > But /usr/bin/slabtop claims /proc/slabinfo is missing.

At some point in time, I wrote:
> > Do you have CONFIG_SLUB enabled? Try looking into /sys/slab/.

On 10/13/07, Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote:
> Yes. There is /sys/slab/ .
> But are there any tools for browsing like /usr/bin/slabtop ?
> Is
>   cd /sys/slab/; for i in *; do echo -n $i " "; cat $i/slabs; done
> the only way currently available?

I don't think slabtop in procps has been updated to support slub. Christoph?

                            Pekka

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to find slab\'s usage?
  2007-10-13  8:02   ` Tetsuo Handa
  2007-10-13  8:10     ` Pekka Enberg
@ 2007-10-13  8:10     ` Eric Dumazet
  2007-10-15 11:41       ` Tetsuo Handa
  1 sibling, 1 reply; 7+ messages in thread
From: Eric Dumazet @ 2007-10-13  8:10 UTC (permalink / raw)
  To: Tetsuo Handa; +Cc: penberg, linux-kernel

Tetsuo Handa a écrit :
> Hello.
> 
> Pekka Enberg wrote:
>>> I saw /proc/meminfo and it seems to me that slab is leaking memory.
>>> But /usr/bin/slabtop claims /proc/slabinfo is missing.
>> Do you have CONFIG_SLUB enabled? Try looking into /sys/slab/.
> 
> Yes. There is /sys/slab/ .
> But are there any tools for browsing like /usr/bin/slabtop ?
> Is
>   cd /sys/slab/; for i in *; do echo -n $i " "; cat $i/slabs; done
> the only way currently available?

Grab kernel sources, you'll find inside : Documentation/vm/slabinfo.c

gcc -o slabinfo Documentation/vm/slabinfo.c


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to find slab\'s usage?
  2007-10-13  8:10     ` Eric Dumazet
@ 2007-10-15 11:41       ` Tetsuo Handa
  0 siblings, 0 replies; 7+ messages in thread
From: Tetsuo Handa @ 2007-10-15 11:41 UTC (permalink / raw)
  To: dada1; +Cc: linux-kernel

Hello.

Eric Dumazet wrote:
> > Yes. There is /sys/slab/ .
> > But are there any tools for browsing like /usr/bin/slabtop ?
> > Is
> >   cd /sys/slab/; for i in *; do echo -n $i " "; cat $i/slabs; done
> > the only way currently available?
> 
> Grab kernel sources, you'll find inside : Documentation/vm/slabinfo.c
> 
> gcc -o slabinfo Documentation/vm/slabinfo.c
> 
Oh, nice. Thank you.

I recompiled the kernel using the same kernel today.
However, I couldn't reproduce slab's leak today.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to find slab\'s usage?
  2007-10-13  8:10     ` Pekka Enberg
@ 2007-10-15 18:51       ` Christoph Lameter
  0 siblings, 0 replies; 7+ messages in thread
From: Christoph Lameter @ 2007-10-15 18:51 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: Tetsuo Handa, linux-kernel, Albert Cahalan

On Sat, 13 Oct 2007, Pekka Enberg wrote:

> Hi,
> 
> On 10/12/07, Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote:
> > > > I saw /proc/meminfo and it seems to me that slab is leaking memory.
> > > > But /usr/bin/slabtop claims /proc/slabinfo is missing.
> 
> At some point in time, I wrote:
> > > Do you have CONFIG_SLUB enabled? Try looking into /sys/slab/.
> 
> On 10/13/07, Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote:
> > Yes. There is /sys/slab/ .
> > But are there any tools for browsing like /usr/bin/slabtop ?
> > Is
> >   cd /sys/slab/; for i in *; do echo -n $i " "; cat $i/slabs; done
> > the only way currently available?

There is a tool in Documentation/vm/slabinfo.c. Just compile that.

> I don't think slabtop in procps has been updated to support slub. Christoph?

slabinfo can probably do much of what slabtop does.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-10-15 18:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-12  7:01 How to find slab\'s usage? Tetsuo Handa
2007-10-13  7:43 ` Pekka Enberg
2007-10-13  8:02   ` Tetsuo Handa
2007-10-13  8:10     ` Pekka Enberg
2007-10-15 18:51       ` Christoph Lameter
2007-10-13  8:10     ` Eric Dumazet
2007-10-15 11:41       ` Tetsuo Handa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox