mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* swap never cleaned up
@ 2003-02-14 23:54 Siim Vahtre
  2003-02-15  0:39 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Siim Vahtre @ 2003-02-14 23:54 UTC (permalink / raw)
  To: linux-kernel

Hi.

Since moving from 2.5.59 to 2.5.60 I've noticed some strange
behaviour with swap managment. For some unknown reason the
swapspace starts to fill up but it will NEVER get freed.
Hence, it is first time in my life when I actually see swap
used more than 20M on this computer!

Anyway, after some time I am in situation where swap is 100% used
and I can't do anything (fork: Cannot allocate memory) although
I have practically no programs running at all.

Making more swapspace is useless, because new swap will eventually
be bloated aswell. The only solution I found was to use "swapoff",
which makes some heavy i/o and sometimes kills few random processes
(bash, screen) but frees the swap. After using "swapon", it starts to
be filled up again. Using "swapoff" also mysteriously frees about 50M
of RAM from nowhere. Otherwise the memory managment seems to be OK.

Swap that I use (according to "file") is "Linux/i386 swap file
(new style) 1 (4K pages) size 15623 pages (64M)". Note that it
doesn't matter if the swap is in /dev/hda2 or in /swapfile, either
way it is never cleaned up.

I don't know if it matters but I've got 128M of RAM (which is more
than enough for me) and have tmpfs mounted.

I would be glad to test this oddness further if you wish.
Just tell me what to do.



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

* Re: swap never cleaned up
  2003-02-14 23:54 swap never cleaned up Siim Vahtre
@ 2003-02-15  0:39 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2003-02-15  0:39 UTC (permalink / raw)
  To: Siim Vahtre; +Cc: linux-kernel

Siim Vahtre <siim@pld.ttu.ee> wrote:
>
> Hi.
> 
> Since moving from 2.5.59 to 2.5.60 I've noticed some strange
> behaviour with swap managment. For some unknown reason the
> swapspace starts to fill up but it will NEVER get freed.
> Hence, it is first time in my life when I actually see swap
> used more than 20M on this computer!

Everything seems OK here, from a quick swap and tmpfs test.

Is it possible that some application is leaking memory, and that
swapoff causes it to be oom-killed?

Take a careful look at the process listing, see if some process is using a
lot of memory.  Also the contents of /proc/meminfo.  And see if you can work
out what operation is causing this.

Thanks.

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

end of thread, other threads:[~2003-02-15  0:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-14 23:54 swap never cleaned up Siim Vahtre
2003-02-15  0:39 ` Andrew Morton

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

all inboxes | Powered by JetHome®