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

Re: Swap space not used

On Thu, 3 May 2012, Scott Ferguson wrote:

On 02/05/12 17:48, Bret Busby wrote:


Why is this so?

JSM is that you?



Is he still around?

fact there is *no* swap "rule".

Swap is not "required". Enable it if you wish - but it's not mandatory,
and it's usefulness is determined by your needs.

For a "desktop" that does a lot of graphic editing you'd normally want
1GB of RAM and >512MB of swap, more swap than that will usually result
in slower performance. But it will vary considerably from one individual
to another. The bigger the pond the more fish you can stock - the
smaller the pond the easier it is to catch a given fish.

ie. for netbooks using solid state drives I normally provide *no* swap,
if they've 2GB of RAM and don't use suspend (the usual build).

The system's use of swap is determined by the chosen applications and
the "swappiness" settings:-
$ cat /proc/sys/vm/swappiness

Default for a "desktop" that's used for development and graphic editing
is 60.

I get 60 when I run the command.

Out of interest, with you saying that swapping is not mandatory, from memory, about 20-odd years ago, when I started learning (formally) about operating systems, we were told that UNIX has a memory requirement of about 32GB (or, it may have been 32MB - I am not sure - it was many, many, years ago, and thus, UNIX requires memory paging to work, and this is why UNIX has had such (relatively) good memory handling, because it used memory paging; paging out to hard disk, and, without the paging, UNIX could not have operated.

Now, while I realise that Linux is not UNIX, it is classed, I believe, as "UNIX-like", and som I believe, uses or imitates, some of the principles of UNIX.

In that, I believe that Linux requires memory paging, that we rname swapping, and, I understand that the rule used to be to provide swap space of at least twice the amount of RAM.

While this computer has 8GB of RAM, which is far greater than the total hard drive capacities of most hard drives from twenty years ago, most of the operating systems (including Linux) and the applications, have become increasingly bl;oated, and the applications become increasingly poorly designed, so that memory may not be freed, when an application is closed, and, some web sityes that use the dreaded Javascript, keep using increasing amounts of RAM, to the extent that I have found it not safe to a web browser open, that allows javascvript. I use different web browsers for different uses, and the ones that I tend to leave open, are Javascript-disabled, for the sake of (relative) system stability.

Bret Busby
West Australia

"So once you do know what the question actually is,
 you'll know what the answer means."
- Deep Thought,
  Chapter 28 of Book 1 of
  "The Hitchhiker's Guide to the Galaxy:
  A Trilogy In Four Parts",
  written by Douglas Adams,
  published by Pan Books, 1992

Reply to: