For performance and longer lifetime of your SSD you need to make some changes to the standard filesystem..
You should choose for the ext4 file system on install by the way because it supports TRIM..
0. partition alignment
This can only be done with a clean system before you install Linux. Make a new primary partition and enter a start sector of at least 2,048 The general rule is that the starting sector must be divisible by 512, but to cater for all variations of SSD page size and filesystem block size, 2,048 is a good idea (and equates to 1MB).
1. fstab
after install open up the terminal (CTRL + T) and run:
Code:
sudo gedit -w /etc/fstab
this should open a text window and you will be able to make changes to the file system. So be carefull.
Then for the SSD device in your system remove 'relatime' if present and add 'noatime,nodiratime,discard' so it looks something like this:
Code:
/dev/sda / ext4 noatime,nodiratime,discard,errors=remount-ro 0 1
the 'discard' part activates the TRIM.. the other parts stops updating metadata from being updated every time a file is accessed.
2. schedular
The scheduler helps organise reads and writes in the I/O queue to maximise performance. The default scheduler in the Linux kernel is CFQ (Completely Fair Queuing), which is designed with the rotational latencies of spinning platter drives in mind. So while it works well for standard hard drives, it doesn't work so well when it comes to SSDs.
As CFQ is the default, change SSDs to use deadline by opening up a terminal and running:
Code:
sudo gedit -w /etc/rc.local
Then add the following line for each SSD in your system:
Code:
echo deadline >/sys/block/sda/queue/scheduler
3. swap tmp and applications
Do you have a mechanical drive in your system? Then use a part of it (if you can) to provide for the swap and for temporary files and browser cache. That writes and rewrites a lot of data that you don't realy use longterm but does wear out your SSD.
If you do not have a mechanical drive. Keep a swap partition available, but add the following to the rc.local file:
Code:
sudo gedit -w /etc/rc.local
and add:
Code:
echo 0 > /proc/sys/vm/swappiness
And Linux won't use swap at all unless physical memory is completely filled.
Next, to reduce unnecessary writes to the SSD move the temp directories into a ram disk using the 'tmpfs' filesystem, which dynamically expands and shrinks as needed.
In your /etc/fstab, add the following:
Code:
sudo gedit -w /etc/fstab
Code:
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0
the last line discards log files between boots.
That's it.. I found this here.. So thank you Ashton Mills..
Hope this serves your needs..
Bookmarks