2005-04-15 04:48:29

by Michael Deegan

[permalink] [raw]
Subject: 2.6.12-rc2: >100% memory usage

Hi folks,

I noticed something unusual on my home desktop machine (K6II, 448M RAM, runs
KDE, samba, nfsd. 2.6.12-rc2 on Debian sarge). The machine seems to feel
slightly sluggish; it seems to swap a fair bit more than it did under
2.6.11, but at the same time it's not actually using more swap that it used
to. The large numbers are slowly growing larger too. The biggest spamd was
only 156% of memory yesterday. Normally it's only my xserver (and
occasionally konqueror) that manages to grab more than 10% of memory...

Cutting and pasting from top:

top - 12:20:17 up 3 days, 17:00, 6 users, load average: 0.91, 1.25, 1.35
Tasks: 162 total, 3 running, 158 sleeping, 1 stopped, 0 zombie
Cpu(s): 13.9% us, 11.1% sy, 37.0% ni, 27.8% id, 0.0% wa, 0.0% hi, 10.2% si
Mem: 450340k total, 443452k used, 6888k free, 1740k buffers
Swap: 2000020k total, 384300k used, 1615720k free, 22248k cached

PID USER NI VIRT RES SWAP SHR S %CPU %MEM TIME+ CODE DATA COMMAND
2489 root 0 40088 1.0g 4.0 999m S 0.0 232.7 5:15.94 996 35m spamd child
2485 root 0 38336 954m 4.0 933m S 0.0 217.0 5:03.79 996 33m spamd child
2488 root 0 38528 949m 4.0 932m S 0.0 216.0 4:42.07 996 33m spamd child
2486 root 0 38436 932m 4.0 912m S 0.0 212.1 5:15.02 996 33m spamd child
2487 root 0 38660 914m 4.0 900m S 0.0 207.9 4:15.34 996 33m spamd child
6741 root 0 128m 476m 4.0 470m R 14.6 108.3 790:48.57 1512 43m /usr/X11R6/bin/X -nolisten tcp -auth /var/run/xauth/A:0-W1z1fb vt7
6867 michael 0 71600 369m 4.0 361m S 4.6 84.1 227:17.70 40 20m konqueror [kdeinit] konqueror -session 11c0a8012a00011044035570000

/proc/meminfo:

MemTotal: 450340 kB
MemFree: 5128 kB
Buffers: 568 kB
Cached: 21932 kB
SwapCached: 120448 kB
Active: 153944 kB
Inactive: 2384 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 450340 kB
LowFree: 5128 kB
SwapTotal: 2000020 kB
SwapFree: 1616164 kB
Dirty: 48 kB
Writeback: 0 kB
Mapped: 152972 kB
Slab: 273160 kB
CommitLimit: 2225188 kB
Committed_AS: 918036 kB
PageTables: 3180 kB
VmallocTotal: 581612 kB
VmallocUsed: 22692 kB
VmallocChunk: 555496 kB

/proc/2489/status:

Name: spamd
State: S (sleeping)
SleepAVG: 78%
Tgid: 2489
Pid: 2489
PPid: 1775
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
FDSize: 256
Groups: 1000
VmSize: 40104 kB
VmLck: 0 kB
VmRSS: 1033176 kB
VmData: 35772 kB
VmStk: 88 kB
VmExe: 996 kB
VmLib: 3060 kB
VmPTE: 52 kB
Threads: 1
SigQ: 0/3584
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000000087
SigCgt: 0000000080000000
CapInh: 0000000000000000
CapPrm: 00000000fffffeff
CapEff: 00000000fffffeff

pmap output seems normal too (total ~40M).

Any ideas on what's happening? Or is everything actually normal and I've
just made an incorrect assumption somewhere? (in which case I'd like to know
what definition of 'resident' I'm supposed to be using :P)

Thanks,

-MD

--
-------------------------------------------------------------------------------
Michael Deegan Hugaholic http://wibble.darktech.org/gallery/
------------------------- Nyy Tybel Gb Gur Ulcabgbnq! -------------------------


2005-04-15 04:59:17

by Nick Piggin

[permalink] [raw]
Subject: Re: 2.6.12-rc2: >100% memory usage

On Fri, 2005-04-15 at 12:48 +0800, Michael Deegan wrote:
> Hi folks,
>
> I noticed something unusual on my home desktop machine (K6II, 448M RAM, runs
> KDE, samba, nfsd. 2.6.12-rc2 on Debian sarge). The machine seems to feel
> slightly sluggish; it seems to swap a fair bit more than it did under
> 2.6.11, but at the same time it's not actually using more swap that it used
> to. The large numbers are slowly growing larger too. The biggest spamd was
> only 156% of memory yesterday. Normally it's only my xserver (and
> occasionally konqueror) that manages to grab more than 10% of memory...

FWIW, me too :P

I think there is a memory leak in recent 2.6.12 kernels.
At least on my desktop there is (although it has some of
my own patches and I've been too lazy to do more work on
it so I haven't reported it).

It seems to be leaking `size-4096` slabs somewhere.

--
SUSE Labs, Novell Inc.


2005-04-15 05:20:45

by Randy.Dunlap

[permalink] [raw]
Subject: Re: 2.6.12-rc2: >100% memory usage

On Fri, 15 Apr 2005 14:59:05 +1000 Nick Piggin wrote:

| On Fri, 2005-04-15 at 12:48 +0800, Michael Deegan wrote:
| > Hi folks,
| >
| > I noticed something unusual on my home desktop machine (K6II, 448M RAM, runs
| > KDE, samba, nfsd. 2.6.12-rc2 on Debian sarge). The machine seems to feel
| > slightly sluggish; it seems to swap a fair bit more than it did under
| > 2.6.11, but at the same time it's not actually using more swap that it used
| > to. The large numbers are slowly growing larger too. The biggest spamd was
| > only 156% of memory yesterday. Normally it's only my xserver (and
| > occasionally konqueror) that manages to grab more than 10% of memory...
|
| FWIW, me too :P
|
| I think there is a memory leak in recent 2.6.12 kernels.
| At least on my desktop there is (although it has some of
| my own patches and I've been too lazy to do more work on
| it so I haven't reported it).
|
| It seems to be leaking `size-4096` slabs somewhere.

This one or yet another one?
http://marc.theaimsgroup.com/?l=linux-kernel&m=111264601928365&w=2


---
~Randy

2005-04-15 05:23:50

by Nick Piggin

[permalink] [raw]
Subject: Re: 2.6.12-rc2: >100% memory usage

On Thu, 2005-04-14 at 22:20 -0700, Randy.Dunlap wrote:
> On Fri, 15 Apr 2005 14:59:05 +1000 Nick Piggin wrote:
>
> | On Fri, 2005-04-15 at 12:48 +0800, Michael Deegan wrote:
> | > Hi folks,
> | >
> | > I noticed something unusual on my home desktop machine (K6II, 448M RAM, runs
> | > KDE, samba, nfsd. 2.6.12-rc2 on Debian sarge). The machine seems to feel
> | > slightly sluggish; it seems to swap a fair bit more than it did under
> | > 2.6.11, but at the same time it's not actually using more swap that it used
> | > to. The large numbers are slowly growing larger too. The biggest spamd was
> | > only 156% of memory yesterday. Normally it's only my xserver (and
> | > occasionally konqueror) that manages to grab more than 10% of memory...
> |
> | FWIW, me too :P
> |
> | I think there is a memory leak in recent 2.6.12 kernels.
> | At least on my desktop there is (although it has some of
> | my own patches and I've been too lazy to do more work on
> | it so I haven't reported it).
> |
> | It seems to be leaking `size-4096` slabs somewhere.
>
> This one or yet another one?
> http://marc.theaimsgroup.com/?l=linux-kernel&m=111264601928365&w=2
>
>

No, another one. Much faster. A few kernel compiles and I have
to reboot (only 256MB RAM, though).

But as I said, not quite a vanilla kernel. I'll have to get
motivated and compile a plain one and try to work it out. I
was hoping someone else would do it ;)