[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Slightly OT] Releasing swap space?



On 14/08/11 14:35, Ivan Shmakov wrote:
AG<computing.account@googlemail.com>  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


Reply to: