Optimizing Linux Mint for the solid state drive SSDSection: System | Actuality: Unspecified
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
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
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
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
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:
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"
After these manipulations do not forget to update GRUB:
5. Transfer the browser cache to RAM
Use the profile-sync-daemon - Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers.
Works for the following browsers:
- 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)
- Opera, Opera-Beta and Opera-Developer
- 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