Re: meminfo shows swap in use, but less than 100% of physical mem in use?



On 2006-09-13, Dave Hammond <dh1760@xxxxxxxxx> wrote:

Hi All,

I'm curious why /proc/meminfo (as well as 'top') would show a
significant amount of swap in use, when all of physical memory is not
in use? More to the point, I believe this is a case of having required
the swap at a certain point (we're debugging an application with a
serious memory leak), but the swap never having been released (or the
statistics never having been updated).

Some possibilities I can think of:

Other applications that are still running, that got swapped out to
allow your bog program to run, that have not had to swap those pages
in.

Do you use tmpfs? If so this goes into swap when needed.

Wasn't there talk of pre-emptive swapping out at some point for Linux?
So pages are written to disk ahead of time in case they need to be
swapped out quickly later. A similar thing would be keeping pages on
disk that have been swapped in but not changed so they can be swapped
out quickly later if needed.

- Richard

--
_/_/_/ _/_/_/ _/_/_/ Richard Corfield <Richard.Corfield@xxxxxxxxx>
_/ _/ _/ _/
_/_/ _/ _/ Time is a one way street, .
_/ _/ _/_/ _/_/_/ except in the Twighlight Zone 3^
.



Relevant Pages

  • Memory/Swap config question
    ... I have a homegrown Java app that needs access to a large amount of ... We tried storing everything to disk but we end-up building an IO ... available to tmpfs (I currenlty have 4GB ram, 8GB swap but I could ... What I would like to do is have say 25% of the physical memory ...
    (SunManagers)
  • SUMMARY: quick swap question -- which processes are swapped?
    ... many processes have chunks in physical memory ... and paged out to swap, ... even though the graphs *look* nasty. ...
    (SunManagers)
  • Re: Windows 2000 virtual memory allocation
    ... as the computer's physical memory, with the ability to expand the swap ... Is there any reason why I shouldn't set the default swap file size to ... None at all if you can spare the disk space. ...
    (uk.comp.homebuilt)
  • Re: 32GB limit per swap device?
    ... overflow in the swap radix-tree code which had to be fixed to be able ... The main physical memory use is not the radix tree bitmap ... operators used in the radix tree code that I didn't want to make more ...
    (freebsd-stable)
  • speeding up swapoff
    ... I've spent some time trying to understand why swapoff is such a slow ... My experiments show that when there is not much free physical memory, ... purging swap at about 20mb/sec. ...
    (Linux-Kernel)