LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 08-23-2011, 09:34 PM   #1
wulp
LQ Newbie
 
Registered: Mar 2011
Posts: 8

Rep: Reputation: 0
Question SSD and 8GB RAM, What size SWAP?


I have a 160GB SSD and 8GB of RAM. I don't expect to need swap much while my computer is on, but I would like to be able to hibernate. Is there any reason to have a swap partition larger than 8GB? Maybe 8.5GB?
 
Old 08-23-2011, 09:44 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
You should be OK setting it = to your amount of RAM to be able to hibernate.

Also you could alter the swappiness. For more details:

https://wiki.archlinux.org/index.php..._Space_on_SSDs
 
Old 08-24-2011, 03:45 PM   #3
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
I only use between 2gb and half the amount of ram for swap space on all my servers any more... It all really depends on what the server/machine is going to be doing.
 
Old 08-24-2011, 05:41 PM   #4
jefro
Guru
 
Registered: Mar 2008
Posts: 12,087

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
Some feel one should not use swap on a ssd but since you desire hibernation, I'd think it unlikely you'd need 8G. My thinking would be it would be faster to power on than it would be to resume from hibernate. At least my VM's are that way.
 
Old 08-24-2011, 05:55 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
Quote:
Originally Posted by jefro View Post
Some feel one should not use swap on a ssd but since you desire hibernation, I'd think it unlikely you'd need 8G. My thinking would be it would be faster to power on than it would be to resume from hibernate. At least my VM's are that way.
You are missing an important advantage of hibernation. You can work from exactly that point on from where you hibernated the machine, all application windows are in the same place with the same content and doing things they were doing. This is simply not possible with a normal boot, AFAIK. Regarding the speed, my SSD reads (according to hdparm) with ca. 250MB/s, so reading 8GB would only require 24 seconds, add the kernel boot time and you may come to ca. 30-35 seconds for that. Now do a normal boot and then open all your applications to the point they were before the reboot, you will most likely spend much more time on that.

By the way, on my VMs I normally use neither hibernate nor shutdown, but the suspend option of Virtualbox (when i think about that it should be somewhat similar to hibernation).
 
Old 08-24-2011, 11:18 PM   #6
jefro
Guru
 
Registered: Mar 2008
Posts: 12,087

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
Then the OP ought to test his SSD both ways. It may be that his thinking of the old hard drive and new ssd needs to be changed. He may feel he needs hibernate for speed. As you say it may be a point in time deal.
 
Old 08-25-2011, 12:49 AM   #7
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 205

Rep: Reputation: 20
I suggest that you make the 16 GB Swap. Well, you have a lot of space anyway... Beside, Linux binaries mostly requires small amount of space, so this shouldn't be a concern.
 
Old 08-25-2011, 07:04 AM   #8
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
With that much RAM and an SSD disk (limited number of writes), I would NOT make a swap partition.
 
Old 08-25-2011, 10:52 AM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095Reputation: 4095
Quote:
Originally Posted by H_TeXMeX_H View Post
With that much RAM and an SSD disk (limited number of writes), I would NOT make a swap partition.
Which will not allow you hibernation. The OP does want his computer to hibernate.
 
Old 08-25-2011, 11:38 AM   #10
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
If you want hibernate, then 8 GB.
 
  


Reply


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Swap size for a server with 128 GB RAM shaikjaveed1 Linux - Server 9 03-17-2009 03:28 PM
Swap double size of the RAM zillah Fedora 3 12-24-2005 08:13 AM
Swap double size of the RAM zillah Solaris / OpenSolaris 3 11-22-2005 12:30 PM
Why should you give the size of the swap disk as twice the size of RAM vmniza Linux - Newbie 3 09-17-2004 03:13 AM


All times are GMT -5. The time now is 08:41 AM.

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