Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linux swap file with SSD

Posted on 2013-11-05
2
Medium Priority
?
693 Views
Last Modified: 2013-11-06
I'm about to install Linux Mint as the sole OS on a new box. I'll be using a 250GB SSD and 1 x 8GB RAM.

I'm finding a lot of conflicting opinion on swap file usage with SSDs.

I'm not bothered about not being able to hibernate - with an SSD shut down and start up are so fast it's hardly worth bothering.

1. Is it necessary for me to have a swap partition at all?
2. If so, with 8GB of RAM how big should it be?
3. If I install Linux with a 30GB / partition and the remainder of the SSD for /home will the installation create a swap file instead of a swap partition?
0
Comment
Question by:Alan Henderson
2 Comments
 
LVL 36

Accepted Solution

by:
Seth Simmons earned 2000 total points
ID: 39626435
1) yes.  if you have many applications open and physical memory begins to run low, the kernel can't swap out memory pages.  that's a bad thing and you will start to see the OOM killer randomly killing processes.  i've experienced that before.

2) 8gb is fine.  linux is better about swap space than windows is and is customizable.  you can add the line vm.swappiness=0 to your /etc/sysctl.conf file (takes affect after reboot) that will force the kernel to keep memory pages in physically memory and won't swap anything unless absolutely necessary.  i've done this often on production systems

this talks about it more
http://en.wikipedia.org/wiki/Swappiness

3) no; you need to create swap partition manually.  either do it first or after / then you can set /home to be the remaining space
0
 
LVL 24

Author Closing Comment

by:Alan Henderson
ID: 39627792
Thank you Seth.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
When we purchase storage, we typically are advertised storage of 500GB, 1TB, 2TB and so on. However, when you actually install it into your computer, your 500GB HDD will actually show up as 465GB. Why? It has to do with the way people and computers…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month13 days, 7 hours left to enroll

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question