close
» » Optimizing Linux Mint for the solid state drive SSD

Optimizing Linux Mint for the solid state drive SSD

System

Optimizing Linux Mint for the solid state drive SSD

Installing Linux Mint on SSD get super-fast boot time (about 8 seconds), the computer shuts down in about 5 seconds. In this article I will tell you how to optimally configure the system to work on the SSD.

On my laptop has 2 physical disk. The first SSD 64 GB, the second HDD 1 terabyte.
Linux Mint I have as follows
section /root on SDD
The /home section on HDD
The system boots very quickly, and all the large files and user settings are stored on a separate hard drive, which is very convenient.

 

no longer relevant for latest distr

 

Before enabling TRIM, you must make sure:

  • you're using the Linux Kernel 2.6.33 or newer
  • your SSD supports TRIM
  • the partition(s) are EXT4 or BTRFS*

1. So first turn on TRIM (chief technology designed to extend the life and to distribute the load SSD.)

Check whether your SSD drive technology TRIM

sudo hdparm -I /dev/sda | grep "TRIM supported"

Where "/dev/sda" is the solid-state drive (it may be /dev/sdb, /dev/sdc, etc. for you) To find the path to your SDD type the command df

Optimizing Linux Mint for the solid state drive SSDOptimizing Linux Mint for the solid state drive SSD

When you see the sign the same as in the picture, then can use this technology.

We will use a secure (recommended) way to enable TRIM (gedit replace on the editor you use, for example in the desktop environment Mate will pluma)

sudo gedit /etc/cron.daily/trim

Paste the following content:

#!/bin/sh
LOG=/var/log/trim.log
echo "*** $(date -R) ***" >> $LOG
fstrim -v / >> $LOG
fstrim -v /home >> $LOG

The last two commands in the code above perform the actual trimming for the /root and /home partition and you need to edit them: here, add the SSD partitions for which you want to enable the daily TRIM job (usually, you must add "/" if the root partition is on the SSD and "/home" if you've set up a separate home partition).

Since I have a /home partition is on the HDD drive, I removed the last line.

Now make the file executable with the following command:

sudo chmod +x /etc/cron.daily/trim

Now Linux Mint is every day to do the TRIM.

2. By default, after each opening of the file - system leaves the timestamp of the last open - unnecessary write operations. Cure just add in fstab before setting errors=remount-ro 0

a couple of options - relatime,nodiratime First allows to record only the modification time (sometimes it is necessary for the stable operation of some programs), the second cancels the write time access to directories. In principle, instead relatime can be put noatime that nothing will update.

sudo gedit /etc/fstab

Optimizing Linux Mint for the solid state drive SSDOptimizing Linux Mint for the solid state drive SSD

Further, it is worth remembering that our Limux Mint loves to record a variety of logs. And either transfer them to the HDD, or to keep in RAM until the system is rebooted. I believe that if your home is not the server, then the optimal second option, and realized he added in fstab

sudo gedit /etc/fstab

the following lines

tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/tmp tmpfs defaults 0 0
tmpfs /var/lock tmpfs defaults 0 0

Optimizing Linux Mint for the solid state drive SSDOptimizing Linux Mint for the solid state drive SSD

3. Configure /etc/sysctl.conf

the kernel will save the data waiting to be written to disk, and burn them or if necessary, or upon expiration of the timeout.

sudo gedit /etc/sysctl.conf

and add parameters to the end of the file:

# vm.laptop_mode = 5 The write-back mode is enabled
vm.laptop_mode = 5
# vm.dirty_writeback_centisecs = 6000 time. I.e. 100 units = 1 second, default is 60 seconds
vm.dirty_writeback_centisecs = 6000
# vm.swappiness=10 Priority for the use of swap. The parameter controls the percentage of free memory which will start swapping.
vm.swappiness=10

Optimizing Linux Mint for the solid state drive SSDOptimizing Linux Mint for the solid state drive SSD

4. Changing I/O scheduler

To work with SSD drive is more suitable scheduler noop. First, let's check what kind of planner you have included:

cat /sys/block/sda/queue/scheduler

Optimizing Linux Mint for the solid state drive SSDOptimizing Linux Mint for the solid state drive SSD

In brackets shows the scheduler that you have installed at the moment. If this is not a noop - fix it.

To change I/O scheduler, which was once a need for better positioning of the HDD heads. To do this, go into the config GRUB /etc/default/grub

sudo gedit /etc/default/grub

In the opened file, look for the option GRUB_CMDLINE_LINUX_DEFAULT. By default, there is only "quiet splash". Will next add "elevator=noop". I got the following:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=noop"

Optimizing Linux Mint for the solid state drive SSDOptimizing Linux Mint for the solid state drive SSD

After these manipulations do not forget to update GRUB:

sudo update-grub


5. Transfer the browser cache to RAM

Use the profile-sync-daemonSymlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers.

Works for the following browsers:

  • Chromium
  • Conkeror
  • Epiphany
  • Firefox (stable, beta, and aurora)
  • Firefox-trunk (this is an Ubuntu-only browser: http://www.webupd8.org/2011/05/install-firefox-nightly-from-ubuntu-ppa.html)
  • Google Chrome (stable, beta, and dev)
  • Heftig's version of Aurora (this is an Arch Linux-only browser: https://bbs.archlinux.org/viewtopic.php?id=117157)
  • Icecat (GNU version of Firefox)
  • Iceweasel (Debian version of Firefox)
  • Luakit
  • Midori
  • Opera, Opera-Beta and Opera-Developer
  • Otter-browser
  • Palemoon
  • QupZilla
  • Rekonq
  • Seamonkey
  • Vivaldi-browser and Vivaldi-browser-snapshot
sudo add-apt-repository ppa:graysky/utils
sudo apt-get update
sudo apt-get install profile-sync-daemon

open the configuration file /etc/psd.conf:

sudo gedit /etc/psd.conf

Then find the line USERS="And in quotation marks, enter the name of your user. You can enter multiple users, most importantly, put a space between them.

You can also directly specify which browsers you want to accelerate. Line #BROWSERS="". Uncomment and add your browsers separated by spaces.

Save all changes and restart the computer

sudo reboot

Good Luck!!!

 

Print version

Add comments

  • Local comments
  • Facebook comments
siawacsh
siawacsh 27 September 2015 00:52
I just went through these steps to optimize my Kingston Hyper X Savage SSD. I also have another copy of Mint 17.2 on my disk drive. On reboot the grub menu had removed my kingston from the list. So I can only boot into the Mint on my disk drive. Looks like I am going to have to reinstall the OS on my SSD. I would appreciate some help on this.

This file was on my Mint 17.2 was empty /etc/sysctl.conf AND so was this /etc/psd.conf
  • +2
holodoc1967
holodoc1967 9 October 2015 23:49
same here.

look here: http://lifehacker.com/5687850/speed-up-firefox-by-moving-your-cache-to-ram-no-r
am-disk-required
  • 0
Shekin 25 May 2016 08:35
no longer relevant
--------------------
x64 Linux Mint 18.1 cinnamon
  • +1
Shekin 2 October 2016 20:21
I wouldn't optimize your laptop as you doing it. Install the latest version of Linux mint (preferably XCFE) and you will have nothing else do not touch. Maybe take some tips from here.
--------------------
x64 Linux Mint 18.1 cinnamon
  • 0
Shekin 3 October 2016 20:24
I was advised to XFCE because netbooks usually use this working environment. Requires less computer resources to work. Therefore works faster on slower computers. RAM is good, but it's not all that important for performance.
--------------------
x64 Linux Mint 18.1 cinnamon
  • 0
  • bowtiesmilelaughingblushsmileyrelaxedsmirk
    heart_eyeskissing_heartkissing_closed_eyesflushedrelievedsatisfiedgrin
    winkstuck_out_tongue_winking_eyestuck_out_tongue_closed_eyesgrinningkissingstuck_out_tonguesleeping
    worriedfrowninganguishedopen_mouthgrimacingconfusedhushed
    expressionlessunamusedsweat_smilesweatdisappointed_relievedwearypensive
    disappointedconfoundedfearfulcold_sweatperseverecrysob
    joyastonishedscreamtired_faceangryragetriumph
    sleepyyummasksunglassesdizzy_faceimpsmiling_imp
    neutral_faceno_mouthinnocent
CrossOver Linux
Your working environment Other polls