lkml.org 
[lkml]   [1996]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: swap problem: not freeing pages ?!
Hi,

On Sat, 15 Jun 1996 18:11:42 +0200 (MET DST),
koenig@tat.physik.uni-tuebingen.de (Harald Koenig) said:

> running Linux-2.0.0 on ALPHA I found a problem with swapping which
> also shows up (but not that severe?) for i386 (also 2.0.0):

> trying to allocate as much memory (real ram) as possible and using
> it by writing to every page over and over again I found that a lot
> of memory doesn't get swapped out ...

> I'm not able to get more than 25MB memory without running into
> continous swapping. summing up all the "RSS" fields in "ps axm" output
> I only get 26MB.

Summing the RSS doesn't work. RSS includes shared pages, so that (for
example) if you have two instances of bash then a large amount of the
RSS can be accounted for by that. If you eliminate a single large
process from memory then you will expect the summed RSS to rise, since
the memory hog will have an unusually low percentage of shared pages.

I've just tried on the 24MB multia here, and I can get a 19MB eatmem
running without any swapping at all. At 20MB, I get swapping, but all
the diagnostics look fine.

Suspending the eatmem with ^Z gives me `free`:

[linux@quark] ~ $ free
total used free shared buffers cached
Mem: 22336 21928 408 1456 88 1384
-/+ buffers: 20456 1880
Swap: 19128 14272 4856

The summed RSS comes to 20056MB. Adding "cached" and "buffers", and
accounting for multiply-counted pages by subtracting "shared", that
accounts for 20072MB. This leaves a discrepancy of only 1856K between
the memory visibly accounted for, and the total used memory. That
1856K includes all kernel kmallocs, kernel stacks, networking memory,
swap-space memory maps, driver buffers and so on.

Time to recompile with the debugging-kmalloc enabled to see if we can
pin down the remaining memory, perhaps; 1856K for dynamic kernel data
is still a bit high.

Cheers,
Stephen.
--
Stephen Tweedie <sct@dcs.ed.ac.uk>
Department of Computer Science, Edinburgh University, Scotland.


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.048 / U:1.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site