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.
If you want to hibernate, set up a swap partition. That's the most common reason to have one. On the other hand, if you hit the memory limit and you don't have swap, some process will crash or be killed.
It doesn't hurt to have swap, unless you're short of disk space. Risks? If swap gets used, anything stored in the memory in unencrypted form may get written on the swap partition, but honestly I don't know of any cases where somebody stole sensitive information this way. Still, there's a workaround for that, for example I'm using LUKS encryption on my /home, /tmp and swap partitions.
Benefits: Suspend to disk ability, emergency space for unforeseen RAM shortages...
I have 2 gigs of ram and prefer the kde3.5 desktop.
I tried running with no swap at one time just to see.
Everything ran fine but was noticeably slower, especially the boot process.
How 4 gigs of ram would run with no swap, dunno but would probably be fine as long as you're not hibernating or using some really graphics intensive builders or programs.
AFAIK, while I still make them out of habit, there are virtually no advantages to a swap partition. As others have mentioned, you can benefit from having swap if you hibernate or if you have something go wild and need to go into swap to avoid resource starvation, but you can just make a swapfile for that. The big knock against swapfiles was that they were slower but, as I understand it, things have changed such that the performance difference is negligible. The only thing is you can just separate your swap from your actual fs and forget about it. A swapfile might get in the way. But a swapfile, with most any filesystem, is going to be more flexible. Repartitioning is a pain and resizing, where possible, isn't much better.
So if you don't hibernate and think your system won't go haywire and you don't want swap, you can try going without. If anything Bad Happens, you can create a swapfile to prevent that happening again. Or you can just be safe and conservative and keep making swap partitions that never get used for anything.
If I'm wrong in any of this, particularly regarding the efficiency of modern swap files, someone please correct me.
I haven't used a swap partition on my personal computer in the last 4 years. I use my 2 GB ram to run fluxbox as a window manager and KDE control programs. I have had no speed issues or issues in general. Then again, I don't hibernate.
I suppose you might come across an issue in video or image editing where the image is too big.
Here's probably the best option for you, and it's what I do now. Just don't make a swap partition and run the system without any swap. If you have problems, you can quickly and easily make a swap file and use it as swap. Then later on, if you realize you do not need it, you can just turn off swap, delete the file and that's it.
That's a sweet solution (already suggested by slakmagik), a least cost "suck-it-and-see" approach.
I'm going to go for the swap partition for hibernation, even though it's not for a laptop. It appeals for environmental reasons -- I'd forgotten about hibernation 'cos it never worked on ubuntu but hopefully it "just works" on Slackware and the penguins will benefit from the reduced polution.