LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 08: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, 08:44 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
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, 02: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, 04:41 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
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, 04:55 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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, 10:18 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
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-24-2011, 11:49 PM   #7
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 223

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, 06:04 AM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
With that much RAM and an SSD disk (limited number of writes), I would NOT make a swap partition.
 
Old 08-25-2011, 09:52 AM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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, 10:38 AM   #10
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

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


Reply



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 02:28 PM
Swap double size of the RAM zillah Fedora 3 12-24-2005 07:13 AM
Swap double size of the RAM zillah Solaris / OpenSolaris 3 11-22-2005 11:30 AM
Why should you give the size of the swap disk as twice the size of RAM vmniza Linux - Newbie 3 09-17-2004 02:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:20 PM.

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
Open Source Consulting | Domain Registration