Kernel "memory leak" ? [2.4.16]

Kernel "memory leak" ? [2.4.16]

Post by jo.. » Wed, 16 Jan 2002 10:53:26

Hi, I have a 2.4.16 based SUSE system, which is running the
default SUSE 2.4.16 SMP-64GB kernel build, with:
        -756M Phy RAM
        - SMP (2x PIII)
        -Oracle 9.0.1
        -Oracle I/O mostly through raw partitions on IDE drv.
        -Oracle config'ed to buffer heavily.

Every night, an Oracle job runs for about two hours that hammers
the drives and memory quite thoroughly.  Oracle finishes and the
box mostly quiesces at that point.

For the last several nights, I've noticed the swap usage steadily
go up.  Hmm, thinking that Oracle was just holding buffers open,
I'd cycle all Oracle processes, but it still did not fix.  Actually,
from top and ps, there really wasn't anything very memory intensive
on the box, and about 250M of non-buffer, non-cache memory was being
used by processes.  What I mean by this figure is used memory -
buffers - cache, i.e. 111,176KB in the report below:

             total       used       free     shared    buffers     cached
Mem:        772920     660940     111980          0       6972     542792
-/+ buffers/cache:     111176     661744
Swap:       774640          0     774640

(In this report I see a lot of cache being used; I'm fine with that, I
just did a lot of file I/O).

So I got on my serial console, did an "init 1", which shut off all user
processes except for a single bash.  I also shut off swap.  I did a "free",
and hmm, i see the "used" figure (used - buffers - cache) is still over
200MB but the box ain't doing a darn thing!  I wish I cut&paste that report.
The box was up about 10 days at this point. There was several 100MB used
for cache, but that doesn't bother me as much as the massive usage of
memory to run next to nothing.

Is this abnormal?

Well, went back to init 5, and rebuilt my kernel with the same config,
except I turned off 64GB support (PAE), as I don't need it with only
756M.  Installed the new kernel, and rebooted...

Just to experiment, I rebooted into run level 1, and observed the
"used - buffer - cache" to be about 9MB.  Nice and lean, sounds good.
I then bounced over to run level 5, built a kernel and hammered at
Oracle, then went back to run level 1, to observer the "used - buffer -
cache" figure climb several MB.  Repeated sequences of the above steps
caused several MB increments in that figure, even though only one
shell was running.

Is the kernel somehow leaking memory?  I understand using the buffer
cache aggressively as a policy decision, but reporting memory used
when in fact it can't be accounted for seems wrong.

is this a known prob or a prob with my understanding of what is going on



Kernel "memory leak" ? [2.4.16]

Post by Pete Zaitc » Wed, 16 Jan 2002 15:20:49

> Hi, I have a 2.4.16 based SUSE system, which is running the
> default SUSE 2.4.16 SMP-64GB kernel build, with:
> Is the kernel somehow leaking memory? [...]

A leak in the VM is possible, though unlikely, IMHO. It is my
understanding that struct page array is scanned by index in
places, so... However, the kernel may be leaking kmalloc somewhere
quite easily. Look at evolution of your /proc/slabinfo,
dump it into /tmp/xxx.

If slab is not leaking, bug SuSE people. Andrea works for them
and he ought to be available to look at the problem, if you have
a convincing case. Heck knows what patches they may be using.

-- Pete


1. Upgrade to 2.4.16 produces "Kernel panic: No init found"

Hello kernel gurus,

I have searched the list archives and google'd myself silly, but I
can't seem to find a solution to my problem.

I am trying to update my 2.4.3 kernel (Mandrake 8.0 distro) to 2.4.16.
I did a 'make oldconfig' with my old .config file and added ext3 kernel
support in addition to ext2.  My root fs is ext2 (as are all my fs).
The new kernel boots but panics when it tries to mount the root fs.
Here is the error:
Mounting /proc filesystem
Creating root device
Mounting root filesystem
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
Freeing unused kernel memory: 216k freed
Kernel panic: No init found.  Try passing init= option to kernel.

There are no other errors displayed.  I upgraded a number of packages,
but I might have missed something.  My current versions are:

gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
GNU ld version (with BFD
glibc 2.2.4-13
insmod version 2.4.6
mkinitrd 3.2.6-1

My system is a dual PII (300 mhz) with 512mb and AIC-7880 scsi.
Kernel options SMP and 686 have been selected.

Does the 2.4.16 kernel require an ext3 root fs if ext3 support is
compiled in?  I don't want to risk upgrading my root fs to ext3
because then my old kernel will not boot.

Any ideas?

Bob Poortinga
Technology Service Corp.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at
Please read the FAQ at

2. Problem with Redirection in C

3. 2.4.16: "Address family not supported" on RH IBM T23

4. New disk : Drive not ready

5. 2.4.16: scsi "PCI error Interrupt"?!

6. MKsysB - error code 512-005

7. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

8. Linux Expert Needed! Kernel Compile Error.

9. Large Amount of Kernel Memory on 2.4.16 Consumed by Kiobufs

10. GETSERVBYNAME()????????????????????"""""""""""""

11. 2.2.1x kernel memory "leaks"

12. Debian Dist - 2.4.3 Kernel to 2.4.16 Kernel

13. the differents between "memory mapping" with "kernel buffering" in file I/O?