Linux Mint is already much faster than the Apple or Windows operating system. This is due to the fact that it is only 4 GB in file size compared to 8 GB in file size for Apple and nearly 30 GB in file size for Windows. Linux is also better suited for Solid State Drives than Windows because Linux aligns data “in order” in the drive better than Windows. Windows is notorious for putting data in random places on the drive requiring frequent “defragmentation” of the disc. Defragmentation is not a major issue with slow old fashion spinning disc drives. But it is a major problem with solid state drives as solid state drives wear out more quickly if they are run through a defragmentation process. Put in plain English, using the Windows operating system is a sure fire way to reduce the life of a Solid State Drive – both because Windows is too big and because Windows does not put documents in the best place on the disk.
Spinning disc drive laptops typically last less than 5 years. Even if the hard drive does not wear out, key boards and screens wear out. Solid State Drives should last much longer than spinning disc drives because solid state drives have no moving parts. It is expected that a solid state drive will last from 5 to 10 years. However, there are some things that can cause a solid state drive to wear out much sooner. One concern is that solid state drives, like disc drives, slow down as the hard drive gets full. This is a real problem for the Windows operating system as many solid state drives only have a capacity of 16 GB to 32 GB. This is obviously a problem for Windows as it cannot even be loaded on a 16 GB SSD and takes up all of the room on a 32 GB SSD.
Even Solid State Drives with higher capacities can have serious problems once they start to get full. To address this problem, SSD manufacturers now typically partition off about 10% of the SSD as an unused “reserve.” This is why a 256 GB SSD typically only has 240 GB of actual space. It is because 16 GB was set aside for the reserve area.
Linux Mint may set aside even more of the space as a reserve area. This area is called a Swap partition. A swap partition is used when the amount of physical active memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. Windows uses something similar to a Swap Partition called a “Page File.” While swap space can help computers with a small amount of RAM run faster, swap space should not be considered a replacement for more RAM.
The problem with using the Swap partition too much is that it causes wear on solid state drives. What determines when the Swap Partition is used is a factor called “Swappiness.” (I am not making this up.). Swappiness can be set for any value between 0 to 100. A low swappiness means that items and applications are rarely moved to the Swap partition. A high swappiness means that items and applications are moved to the swap partition all of the time. Since the swap partition is on the hard drive and we want to limit its use so the solid state drive lasts longer, we want a low swappiness value.
Unfortunately, Linux Mint still assumes we will be using a spinning hard drive and it therefore is set by default with a high swappiness value of 60. This means that it starts moving applications to the Swap partition even when only 40% of the 4 GB of RAM is being used. It only takes opening a couple of modern applications to cause 2 GB of RAM to be used. So a swappiness value of 60 is a pretty low trigger. A much better value would be 10 – meaning that applications would not be moved to the Swap partition until 90% of the 4 GB of RAM was being used.
The solution to this problem is to reduce the swappiness value from the default value of 60 to a lower value of 10. Not only will this help double the life of your solid state drive, but your computer will actually run faster because it will force applications to use your 4 GB of RAM rather than using space on your solid state drive – which is fast but not anywhere near as fast as your RAM. There is no downside of reducing swappiness. If you are running lots of applications or have 40 browser windows open at the same time, the swap partition will still be activated and used once the 4 GB of RAM has been used. All reducing the Swappiness does is reduce the use of the Swap partition when you are using less than 4 GB of RAM.
How to Reduce Swappiness in Linux Mint
First, we will install two applications called gksu and leafpad. Click on Menu, Terminal to open a terminal window. Then copy/paste):
sudo apt-get install gksu leafpad
Press Enter and submit your password. Note that the password will remain invisible. Don't worry. This is normal. Then check your current swappiness setting by copying and pasting the following command into the terminal:
Press Enter. The result will probably be 60.To change this value, copy and paste the following command into the terminal window:
gksudo leafpad /etc/sysctl.conf
Press Enter. You will see a page open ending with the following text:
Copy and paste the following lines at the end of the text:
# Sharply reduce swap inclination
Click on the menu at the top of this file and click Save and then quit. Then reboot your computer.
Why You Should Avoid Hibernation with a Solid State Drive
If you put your computer into hibernation, all of the programs and data are placed in the Swap partition. This will greatly reduce the life of your solid state drive. The solution to this problem is to simply turn off hibernation and never put your computer into hibernation. For your solid state drive to last as long as possible, your computer should either be on or off. Not some state in between.
Turn off Hibernation in Linux Mint
Hibernation can causes a lot of wear and tear on a solid state drive because it places all applications and data in the swap partition every time it is used. This is especially a problem with for Linux Mint, because in Linux Mint hibernation is unfortunately enabled by default. To change this, go to the Mint Menu, Control Center, Personal, Screen Saver, Power Settings. Then change the settings for putting the computer to sleep to Never.
Now that we have Mint running better, it is time to add more free programs.