You are not logged in.
I have noticed that since I have used Linux since 2003, I have never ever utilized Swap partitions. Maybe I am dead wrong and I have not realized I was but whenever I view system resources, I never see anything utilzing all my system RAM to the point I need to dump data into Swap. Is this an force of habit back from when 16MB's of RAM was available? Now that most people can pick up 4 + GB's on a laptop or low end PC, do we still need to create useless partitions for Swap? Perhaps I am being ignorant in thinking most modern (2001+) systems don't need to use Swap but I myself just have never seen Swap being utilized or found a need to create this partition.
./
Offline
Yeah, if you have enough RAM you don't need a Swap-Partition. Or should i say better seldom, if i remember correct, things like suspend needs the swap-partition.
Offline
With a modern system, you shouldn't need a swap partition. I use mine for suspend-to-disk, but this thread has motivated me to try suspend-to-file. Other than hibernation, I've never seen my swap used, with my 4GB of ram.
Offline
Is it possible to do a fresh installation of Arch or most common Linux distros for that matter and omit Swap from the partitioning schema?
./
Offline
Is it possible to do a fresh installation of Arch or most common Linux distros for that matter and omit Swap from the partitioning schema?
Yes, I haven't encountered a distro that required a swap partition. They will usually set one up if you use default partitioning though.
Offline
OK so I guess Linux doesn't require a Swap partition. Thanks!
./
Offline
I have about 50 times more hard drive space than I need for my setup so I always make a swap partition just in case it should be needed by the system at some point. That said, the partition never actually gets utilized. HD space is cheap and I have an abundance of it so I routinely go ahead and create the swap partition.
oz
Offline
I understand but when you have 3+ drives and need to make RAID partitions, you try to make everything as equal as possible and swap really becomes an annoyance at that point, especially for something I have never see utilised since my Linux days...
./
Offline
What would happen if there is no swap and all physical ram is used? Shouldn't the effect be the same (write to disk)?
My system is nearly unusable if i'm running out of ram and swap becomes involved.
Offline
VirtualRider: If there is no swap and all physical ram is used, the linux OOM killer will begin to kill processes until there is enough free memory. This is why swap is a good idea on systems with less memory. If swapping is a performance problem for you, you can try to adjust vm.swappiness in /etc/sysctl.conf (0-100, lower value means less swappy, whatever that means).
Offline
It's not really a problem (6gb ram here), but can happen while i'm coding. I guess the processes to kill are choosen more or less randomly? Killing the process that's using the most ram would be good in that situation, otherwise not that good.
Offline
Not randomly; they're prioritised by memory use first, then a few other factors like niceness, time running, and privilege.
Offline
Sounds like there is a good chance that the right process will be killed and nothing else. Maybe i won't create a swap partition next time, thank you.
Offline
I always leave some swap. I have had large servers become unusable without swap. The swap _barely_ gets used. Usually you will see a few K in it, but without that, things tend to behave a bit oddly in my experience.
There was some mysql thread about it somewhere I ran across once too. *shrug*
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
I have about 50 times more hard drive space than I need for my setup so I always make a swap partition just in case it should be needed by the system at some point. That said, the partition never actually gets utilized. HD space is cheap and I have an abundance of it so I routinely go ahead and create the swap partition.
What he said.
The human being created civilization not because of willingness but of a need to be assimilated into higher orders of structure and meaning.
Offline
I agree with ozar. I always use a swap partition and normally make it the same size as my ram capacity. Force of habit. I don't use suspend to ram. I once had to add swap to a machine as the oracle dbms complained about it when I was trying to install it. I created a swap file and used that to suplement my swap partition. It worked fine, though I still use a swap partition on new systems even with the kernel's support for swap files.
Offline
I observed considerable amount of swap usage during:
1. Virtualization.
2. Using firefox + playing music + burning software all at the same time.
3. Openoffice.
I always keep 2gigs swap space and I also use suspend to disk. So, swap is very important to me.
Offline
If you have never seen any swap used in years of use then i would say you could probably get rid of it, I left swap support out of my custom kernel with no ill effects, suspend to ram still works fine
Offline
Have 2GB of RAM and if I ever had a problem without having one, I haven't known about it. Figure I can just create a swapfile later if it ever comes up.
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
I've been going without swap for quite a while now, and I don't see any bad effects, so I guess it's ok!
I need to find a way out so everyone can find their way out.
Resregietd Lunix Uesr: 485581
Offline
Virtualization has already been mentioned as a good reason to keep a swap partition. My swap space is never used except when I'm running Windows 7 under VMware. I wanted to give a good bit of RAM to Win7. When I'm in Win7 under VMware, Arch starts hitting the swap space. Then, when I close the virtual machine, Arch goes back to using only RAM. That's exactly what I want to happen.
Offline
I'm new to concept of swap space and partition. Why there is swap partition in linux ?
Offline
If you're never using swap then you're probably using you PC like many Windows users do, ie maybe 3 or 4 apps open at a time, and a browser with a few tabs open. Swap enables you to do some serious multitasking, eg 20 apps, Firefox with 60+ tabs, Virtualisation, web server, databases etc.
I'd recommend disabling disk based swap and using compcache, an app which sets up 1/4 of your RAM (by default) as compressed swap. Orders of magnitude faster than disk.
Offline
Wow, never heard of compcache - i've got to try it on my freerunner phone (128 MB). On my desktop machine, i have 4 GB RAM installed and i just found out, that my swap space is failing to initialize at boot - no problems so far. But having 2 GB as backup is better, i think.
Offline
is it ok to share swap between linux installs? Right now I have sepperate swap for each install, but if one where careful about booting into the right installation after hybernating, would it be ok, or would there be problems?
Homepage | Arch Linux Women | Arch Linux Classroom
Acer Aspire E5-575G-53VG:
Intel Dual-Core i5-6200U 2.3 GHz; Skylake rev3 | 8GB DDR4 ram | Intel HD Graphics 520 + NVIDIA GeForce 940MX
Qualcomm Atheros QCA9377 802.11ac | Realtek RTL8111/8168/8411 Gigabit Ethernet Controller
Offline