Solved

Linux swap file with SSD

Posted on 2013-11-05
2
639 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 34

Accepted Solution

by:
Seth Simmons earned 500 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 23

Author Closing Comment

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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
More or less everybody in the IT market understands the basics of Networking, however when we start talking about Storage Networks, things get a bit dizzier, and this is where I would like to help.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now