Re: [Slightly OT] Releasing swap space?



On 14/08/11 14:35, Ivan Shmakov wrote:
AG<computing.account@xxxxxxxxxxxxxx> writes:
> Just a quick query about releasing swap space. On occasion according to
> Conky (system monitoring app), the swap space (set at 3Gb) sometimes
> gets used to up to 15% especially if using something like Pan for
> usenet.

> Is there any value/ harm in releasing this space using something like:

> swapoff -a&& swapon -a [1]

Without the context, I see neither harm nor value in doing that.

However, if there was some task which used a lot of virtual
memory, thus forcing the other tasks' pages to be moved to swap,
doing that will bring those pages back to RAM, which may improve
the future responsiveness of the system. (Up to the time when
such a memory-hungry task is run again; say, a Web browser with
a few dozens of graphically-rich pages in the tabs.)

> Thanks for your opinions.

> [1] found on the web, but not AFAIK Debian specific


Thank you for that, Ivan.

I have recently switched to Xfce4 on Stable from Gnome because the latter was quite a memory hog and seemed to retain pages in swap until I logged/ rebooted. Xfce4 fortunately doesn't do this, but I did notice that after using Swiftfox I was finding that 3% usage of swap didn't clear when I closed the app. This set me to wondering how much control I could exert and even should exert over swap's content.

Are you able to confirm whether the code given previously is accurate *and* safe should I want to pursue clearing swap on the fly?

Cheers

AG


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/4E47DC93.10903@xxxxxxxxx



Relevant Pages

  • Re: whats making executables so large?
    ... each shared library mapped to a separate memory page and memory page ... Swap space, VM, and shared memory usage a _complicated_ swamp. ... 'virtual memory' is more than the disk size of the executable ... The situation is 'sort of' like shared libraries. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Heaps and Foreigners
    ... >> can ask for the memory and get a pointer to it. ... cause unfathomable deaths when swap space gets low or is exhausted. ... It's probably because there is some reserve memory to print out errors ... of RAM and disk space) and virtual swap (which is just a number managed ...
    (comp.lang.lisp)
  • Re: [PATCH] io-controller: Add io group reference handling for request
    ... Find the io group bio belongs to. ... anonymous pages (swap) you still need the page tracking functionality ... so fair to charge the current task for the whole activity. ... is some other memory hungry application which is forcing these swap outs. ...
    (Linux-Kernel)
  • Re: Is Greenspun enough?
    ... Most OSes memory map executables directly from the file system so code doesn't pollute the file cache or swap space. ...
    (comp.lang.lisp)
  • Re: Where is the memory
    ... memory and not releasing it. ... and only in some few cases had to swap out. ... - Marcelo Souza ... |> To unsubscribe, ...
    (freebsd-questions)