SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
You won't be needing TOO much, so I generally go by the rule of either having a swap partition either the same size as your RAM, or double. I usually go for double my RAM, so in your case your swap would be 512MB, but I tend to go slightly over the top!
They say one should give at least the amount of memory, so 512 MB is a minimum, but does the policy of "more the marrier" apply?
Not as long as you have more than ~400Mb of ram... I don't know the reasons for that rule, and i certainly don't know why its still being used nowadays.
RAM is cheap.. if you have more than 512 then you shouldn't worry about your swap. I had 1G of ram on my old laptop, with a swap of 128Mb, and it never used that swap space, to my knowledge...
As for this laptop, it has 512Mb, with swap of 256, and the only time it ever uses it is when i get memory leaks.. (i stress test alot)
Ofcourse it all depends on what you're doing on the system.. If its running X (ram hogger), apache, mysql, samba, etc... Then make sure you have 512 RAM and above (with a low swap of ... 256M max). The swap will be just for failsafe purposes.
Rule is becoming quickly outdated with modern computers. With most machines shipping with 512 MB now, and the price of RAM so low, it is becoming less and less likely that a modern desktop machine will ever swap out.
Personally, the most I do anymore (assuming the machines has enough RAM) is swap=RAM. Even then, this is usually overkill, and I don't know of any time my current desktop machine has ever accessed the swap.
But, as habits tend to do, this one is dieing hard. Many people still stick to the RAMx2 rule simply out of habit.
Wel, just for a quick swap piece of info. I loaded linux with UMDOS and with only 512K swapfile, and it was snailslow. I figured I'd test it out gave it a 1 Gig swapfile. It speeded up by more than three times (thereabouts).
With all the mess it's doing with the VFAT filesystem, I'm sure there is a whole bunch of swapping going around.
Swap is only used when the load placed on RAM pushes it past capacity, and the system is forced to write memory pages out to disk. Back in the days where 32Mg or 64Mg of RAM was considered hot stuff, it was not difficult to overload RAM, but these days, where 512Mg is the standard for a new PC, the chances that you'd consume >100% of RAM are increasingly remote. In the old days, it was recommended that "Swap = 2xRAM', but these days, if you follow that rule pretty much the only thing you'd be doing would be to waste disk space by allocating a huge swap partition. Personally, I'd recommend setting up a 256 Mg swap space, regardless of how much RAM you have.
While we're on the topic, let's not overlook the fact that the more your system uses swap, the worse your overall performance will be. Why? Because accessing data that's already in RAM is measured in nanoseconds, while accessing data that's been written out to disk is measured in milliseconds -- that's several orders of magnitude slower. Not good - it's far better to keep your swap usage as close to zero as possible. Again, if you've got a 256Mg swap space, I'd say you'll be good no matter how much RAM you've got -- J.W.