MintGuide.org / Optimizing Linux Mint for the solid state drive SSD

Optimizing Linux Mint for the solid state drive 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:

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

[banner_inside-articles]{banner_inside-articles}[/banner_inside-articles]

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:

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!!!

 

19-02-2015, 18:51
Go Back