Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 09-28-2014, 09:28 PM   #1
Registered: Apr 2014
Posts: 276

Rep: Reputation: Disabled
Get swap correct

What is the nominal size for a swap partition with 14.1?
I have read rules of thumb that run from 1x to 3x of memory. What is currently suggested for 14.1?
Old 09-28-2014, 09:43 PM   #2
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,456
Blog Entries: 28

Rep: Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175
The old rules for swap have been negated by the increase in default RAM. The old rule of thumb was 2X RAM, but that was when 256MB or 512MB RAM was the standard.

If you plan to have your machine hibernate, the swap partition should be more than the amount of RAM, as hibernation saves RAM to swap. Otherwise, if you have more than 4GB RAM, a swap partition of 1GB should be sufficient. On the P4 box I'm using right now, I have 4GB RAM, uptime is more than four days (a power failure forced a restart), and I'm using about 1MB of 2GB swap.

Last edited by frankbell; 09-28-2014 at 09:45 PM.
Old 09-28-2014, 09:46 PM   #3
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
Depends on how much ram you use, and how much ram you have, what you're using the computer for.

For example, if you want to hibernate to disk often, and a running desktop session uses about 2GB ram, it would be wise to have at least 3GB swap space.

There isn't really a suggestible amount, if you have free space, it doesn't hurt to use more than you might need.
If you have limited ram (a small amount) most people would use x2 the amount of ram for their swap space.
Old 09-29-2014, 05:43 AM   #4
Registered: Nov 2005
Location: Land of Linux :: Finland
Distribution: Arch Linux && OpenBSD 7.4 && Pop!_OS && Kali && Qubes-Os
Posts: 824

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
i have 8 gigs of ram and 1,85 gigs of swap, never run into problems.
Old 09-29-2014, 07:34 AM   #5
Mark Pettit
Registered: Dec 2008
Location: Cape Town, South Africa
Distribution: Slackware 15.0
Posts: 627

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
In the early days of computers, hard disks were not that much slower than real memory, and real memory was incredibly expensive. Nowadays we find that hard disks have really only sped up by a small factor, whereas memory has sped up by millions of times, and memory is pretty cheap too. The usefulness of swap (aside from hibernation) no longer exists. If your system got into a state where it really started using more memory than you have and started to page out/in, your entire machine would grind to a slow death. Your expectations of program performance would dip so fast you'd be better off just restarting the machine and maybe adding more real memory.

Last edited by Mark Pettit; 09-29-2014 at 07:35 AM. Reason: Fix typos
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Managing Swap in Linux: Devices, Files, and Swap Priorities LXer Syndicated Linux News 0 01-15-2014 05:31 PM
Why Does Top Not Show the Correct Swap Space Amount? forbin Linux - General 6 09-28-2010 05:19 PM
Gparted says swap has 5 Gb, grep SwapTotal /proc/meminfo says swap has 800 Mb rickrandall Red Hat 3 02-24-2010 12:09 PM
Use Windows pagefile.sys (swap) as Linux swap? bluesword1969 Linux - General 3 02-19-2010 02:35 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration