Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Linux swap necessary?
New Posts  All Forums:Forum Nav:

Linux swap necessary?

post #1 of 31
Thread Starter 
I'm contemplating which GNU/Linux distro I'm going to install. Since I'm using MLC-based SSD disks, I've decided to keep the swap partition minimal and no more than 1536 MB this time, in order to avoid wearing out the cells. However, I was thinking, is swap really necessary when you have 8 GB RAM?
post #2 of 31
No. It's not necessary.
You can get away without one if you have a bunch of memory.
But I don't really know what constitutes a "bunch" though.

But if you run out of physical memory (doubt it) your system will crash.
post #3 of 31
Although not necessary to have a fully operational system, I always partition a 256MB swap, even with 8GB of memory. I have three ramdisks running various profiles and apps and when I buildworld on Owl, I easily consume all of my physical memory.
ThermoChilled
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X6 1100T ASUS Crosshair IV Extreme EVGA GTX 580 SuperClocked STT WX200UB2G7 
Hard DriveOptical DriveOSMonitor
VelociRaptor WD6000HLHX Sony Optiarc AD-7260S Arch Linux x86_64 + JWM NEC MultiSync PA241W-BK 
KeyboardPowerCaseMouse
Topre Realforce 87UKB Corsair CMPSU-850AX Lian Li Tyr PC-X500FX Logitech G9x 
Mouse Pad
ZOWIE GEAR P-TF 
  hide details  
Reply
ThermoChilled
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X6 1100T ASUS Crosshair IV Extreme EVGA GTX 580 SuperClocked STT WX200UB2G7 
Hard DriveOptical DriveOSMonitor
VelociRaptor WD6000HLHX Sony Optiarc AD-7260S Arch Linux x86_64 + JWM NEC MultiSync PA241W-BK 
KeyboardPowerCaseMouse
Topre Realforce 87UKB Corsair CMPSU-850AX Lian Li Tyr PC-X500FX Logitech G9x 
Mouse Pad
ZOWIE GEAR P-TF 
  hide details  
Reply
post #4 of 31
I remember someone asking this in my linux class, and afaik, it's best to run a system with a swap file equal in size to your ram, just to prevent any really bad system hangs under heavy load. If you never fill up your ram much though, I don't know how much it will be used since that is up to the kernel, but I don't think you should run without any swap at all.
Renaissance
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 4790K GA-Z97n-Gaming 5 HIS 7850 Mushkin Blackline 2x8GB DDR3 2133 
Hard DriveCoolingOSCase
Corsair GS 240 Corsair H50 Windows 8.1 Lian-li PC-Q08R 
Mouse
Razer Deathadder 3500dpi 
  hide details  
Reply
Renaissance
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 4790K GA-Z97n-Gaming 5 HIS 7850 Mushkin Blackline 2x8GB DDR3 2133 
Hard DriveCoolingOSCase
Corsair GS 240 Corsair H50 Windows 8.1 Lian-li PC-Q08R 
Mouse
Razer Deathadder 3500dpi 
  hide details  
Reply
post #5 of 31
Better safe than sorry
My Build
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Athlon II X4 630 @3.5 GIGABYTE GA-790XT-USB3 NVIDIA GeForce GTX 260 BFG MAXCORE 55 OC 216 Core 4094MB Mushkin Enhanced Blackline 1600 @1666 
Hard DriveOptical DriveOSKeyboard
200GB Samsung, 160GB Seagate Sony Optiarc Black Windows 7 Ultimate 64bit, Linux Ubuntu 11.04 64bit Logitech 
PowerCaseMouseMouse Pad
COOLMAX 700 Watt COOLER MASTER Storm Scout SGC-2000-KKN1-GP Logitech MX 518 Huskers 
  hide details  
Reply
My Build
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Athlon II X4 630 @3.5 GIGABYTE GA-790XT-USB3 NVIDIA GeForce GTX 260 BFG MAXCORE 55 OC 216 Core 4094MB Mushkin Enhanced Blackline 1600 @1666 
Hard DriveOptical DriveOSKeyboard
200GB Samsung, 160GB Seagate Sony Optiarc Black Windows 7 Ultimate 64bit, Linux Ubuntu 11.04 64bit Logitech 
PowerCaseMouseMouse Pad
COOLMAX 700 Watt COOLER MASTER Storm Scout SGC-2000-KKN1-GP Logitech MX 518 Huskers 
  hide details  
Reply
post #6 of 31
Thread Starter 
Quote:
Originally Posted by ZHoob2004 View Post
I remember someone asking this in my linux class, and afaik, it's best to run a system with a swap file equal in size to your ram, just to prevent any really bad system hangs under heavy load. If you never fill up your ram much though, I don't know how much it will be used since that is up to the kernel, but I don't think you should run without any swap at all.
I've been paying a lot of attention to the system monitor in Ubuntu and I can't remember ever seeing it go over 0 bytes. Not even when I was boincing.

But that's with my current sig rig. On my laptops (512 MB and 1024 MB RAM), a swap partition is definitely needed.

So what you're saying is that I should create an 8 GB swap partition?
Edited by EliasAlucard - 12/18/10 at 3:01pm
post #7 of 31
I don't ever remember my swap partition being big... It's always been eh. Small.
post #8 of 31
If on a desktop environment, you don't need more than 2GBs for swap, regardless of how much physical RAM you got. It really depends on what you plan to do on your machine.
Magicbox
(17 items)
 
crapbox
(13 items)
 
 
CPUMotherboardGraphicsRAM
FX 8320 Sabertooth 990FX Nitro+ RX480 Kingston HyperX Fury 
Hard DriveHard DriveHard DriveCooling
Samsung 850 EVO  Kingston HyperX 3K Seagate Barracuda 7200.14 Noctua NH-D15 
OSOSMonitorKeyboard
Kubuntu  Windows 10 Pro Dell U2515H CM Quickfire TK (Cherry Blue) 
PowerCaseMouseMouse Pad
Cooler Master Silent Pro M 850W Enthoo Pro Logitech G502 Logitech G440 
Audio
Xonar DX 
CPUMotherboardGraphicsRAM
Sempron 3300+ HP stock mobo (laptop) 200M (IGP) 2x1GB PC3200 
Hard DriveOptical DriveOSMonitor
100GB ATA133 DVD/CDRW Kubuntu 32 bit 14.1" (1280x768) 
Power
6 cell 
  hide details  
Reply
Magicbox
(17 items)
 
crapbox
(13 items)
 
 
CPUMotherboardGraphicsRAM
FX 8320 Sabertooth 990FX Nitro+ RX480 Kingston HyperX Fury 
Hard DriveHard DriveHard DriveCooling
Samsung 850 EVO  Kingston HyperX 3K Seagate Barracuda 7200.14 Noctua NH-D15 
OSOSMonitorKeyboard
Kubuntu  Windows 10 Pro Dell U2515H CM Quickfire TK (Cherry Blue) 
PowerCaseMouseMouse Pad
Cooler Master Silent Pro M 850W Enthoo Pro Logitech G502 Logitech G440 
Audio
Xonar DX 
CPUMotherboardGraphicsRAM
Sempron 3300+ HP stock mobo (laptop) 200M (IGP) 2x1GB PC3200 
Hard DriveOptical DriveOSMonitor
100GB ATA133 DVD/CDRW Kubuntu 32 bit 14.1" (1280x768) 
Power
6 cell 
  hide details  
Reply
post #9 of 31
At least some swap space is recommended, however 8 GB is not necessary. 4 GB is what I use on my desktop (I only have 4 GB of RAM) and during some compilations I use nearly all of it. I wouldn't worry about wearing out an SSD when you already have 8 GB or RAM, though.
 
HTPC
(8 items)
 
 
CPUMotherboardGraphicsRAM
i7-3930k MSI X79MA-GD45 Powercolor 7950 G Skill 
Hard DriveCoolingCoolingCooling
Samsung 830 Swiftech Apogee XT Rev. 1 EK-FC HWLabs Black Ice GTX 240 and a Koolance HX-CU72... 
CoolingCoolingOSOS
MCP 35X and a MCP 350 Koolance 401x2 Opensuse 12.1 Windows 7 
KeyboardPowerCase
Ducky OCN with cherry blues Antec True Power New 650W Cooler Master CM690 II 
CPUMotherboardGraphicsRAM
i5-750 Gigabyte p55-ud2 GTX 430 G Skill 
Hard DriveOSPowerCase
Samsung HD204UI Fedora 15 Corsair CX-430 Silverstone GC04 
  hide details  
Reply
 
HTPC
(8 items)
 
 
CPUMotherboardGraphicsRAM
i7-3930k MSI X79MA-GD45 Powercolor 7950 G Skill 
Hard DriveCoolingCoolingCooling
Samsung 830 Swiftech Apogee XT Rev. 1 EK-FC HWLabs Black Ice GTX 240 and a Koolance HX-CU72... 
CoolingCoolingOSOS
MCP 35X and a MCP 350 Koolance 401x2 Opensuse 12.1 Windows 7 
KeyboardPowerCase
Ducky OCN with cherry blues Antec True Power New 650W Cooler Master CM690 II 
CPUMotherboardGraphicsRAM
i5-750 Gigabyte p55-ud2 GTX 430 G Skill 
Hard DriveOSPowerCase
Samsung HD204UI Fedora 15 Corsair CX-430 Silverstone GC04 
  hide details  
Reply
post #10 of 31
It is required to have at least the amount of RAM you have in swap if you want to hibernate your computer.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Linux swap necessary?