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

Re: Swap space not used



On 04/05/12 04:54, Bret Busby wrote:
> On Thu, 3 May 2012, Scott Ferguson wrote:
> 
>> 
>> On 02/05/12 17:48, Bret Busby wrote:
> 
> 
> <snip>
>> 
>>> 
>>> Why is this so?
>> 
>> JSM is that you? :-)
>> 
> 
> Nope
> 
> :)
> 
> Is he still around?

No (only in spirit). His son is though - and does excellent medical
documentaries. Different hairstyle though.

> 
> 
>> 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.

That sounds correct.

> 
> 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.


32MB - back then.
All that is correct, especially then. Now RAM is cheaper and so it's
used in preference to disk (swap).  Some apps, notably
Firefox/Iceweasel, will use all the RAM they can get - and be called
hogs, whereas they're just trying to be efficient and will release
memory when another app calls for it.

> 
> Now, while I realise that Linux is not UNIX,

Because no-one wants to pay for the privilege. UNIX is a tag that comes
at a cost. Like Heart Foundation endorsement.

> it is classed, I believe, as "UNIX-like", and som I believe, uses or
> imitates, some of the principles of UNIX.

Yes. Call it a clean room implementation (blindly cloned) that achieves
a high POSIX.

> 
> 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.

No. And yes. :-)
It depends very much on how much RAM you have, and what you are running.

For the main desktops with default apps on a system with 1GB of RAM then
I'd suggest 2GB of swap. The same system with 2GB of RAM would probably
only need 1GB of swap (and never fully use it).

The rule I use is total "memory" should be >3GB for a "home desktop".
Aside from that there is no rule - you need to examine the system
requirements (size of files being worked with, disk size and
arrangement, etc) and do some basic testing to determine the optimal
arrangement.

The "swappiness" determines how the system will try and use swap -
testing will show you the best amount of swap. Too much use of swap
slows the system, likewise not enough.

In your case you are barely using swap - and then only a small
percentage of what you have available.


> 
> 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,

Yes. But - you're using Debian so those excuses don't apply to *you*. ;-p
You *can* turn off the dancing bears and remove the eye-bling. Other
distros leave less choice.

Squeeze KDE will happily run in 512MB of RAM - so that leaves you with
7.5GB of RAM. Dunno about GNOME or the other, lighter desktops.

Modern computers are like modern SUVs - the power requirements are
minimal once you turn off the unnecessary "extras" (airconditioning,
coffee cup heaters, power steering, seat heaters, electric seats and
windows, runnning lights etc.).

> 
> -- Bret Busby Armadale 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 
> ....................................................
> 
> 


Kind regards


-- 
Iceweasel/Firefox/Chrome/Chromium/Iceape/IE extensions for finding
answers to questions about Debian:-
https://addons.mozilla.org/en-US/firefox/collections/Scott_Ferguson/debian/


Reply to: