So, what do we have:
Intel i5-3470
16 Gb DDR3-1600Mhz
60Gb Kingston SSD
1500Gb Samsung Hard Disk
[1] Analysis and preparation
Google search gives the first 3 links to wiki.debian.org
That’s what we need.
The article “SSD Installation” tells that the use of SSD will increase the speed of the system by 200%. This is good news. However, it also shows that there is a problem – a limited number of rewriting cycles.Further explains how to transfer an existing installation to a solid-state drive – this is not what we need, since we will put a clean system on it. Therefore, proceed to the article “SSDOptimization”. Here we get the following recommendations:
– use the kernel version of at least 3.2 (in Debian 7 is just 3.2)
– use the ext4 file system (and select it during installation)
[2] Installing a clean system
At this preparatory stage is over. Now, in any convenient way, we run the Debian Wheezy installation. Having preliminarily read various articles about which I will go further, I decided not to change anything particularly in how logical disks are partitioning, and all the necessary transformations I will make after the installation. Moreover, it would take a lot of time – the main place on the 1.5TB drive is the /home partition on the xfs file system, which does not support the reduction. That is, it would be necessary to transfer more than 1 TB of data somewhere, and then copy again … I will put the operation system on an SSD drive, and then I will make symbolic links for such directories as /var and others that I deem it necessary to place next to /home on the existing HDD.
I will not even install the swap partition.
[3] Setting up and optimizing
So, the system is installed. Further on the links to other articles we find still valuable recommendations.
Thanks https://wiki.archlinux.org/index.php/SSD, http://help.ubuntu.ru/wiki/ssd, and other articles, we can see that the partitions and file systems on the SSD need to be customized. What came in handy for me personally:
-> Let’s check the TRIM support (http://ru.wikipedia.org/wiki/TRIM) (technology that allows to distribute load on SSD)
hdparm -I /dev/sda | grep TRIM
* Data Set Management TRIM supported (limit 1 block)
* Deterministic read data after TRIM
-> Boot from the LiveCD / LiveUSB and transfer the / var partition from the root located on the SSD to the HDD (the one that is mounted in the home). Then make a symbolic link from /home/var to /var.
This will significantly reduce the number of write cycles on the SSD, since this directory is actively used by operationg system for recording (log files and others…).
-> We also edit /etc/fstab – add the “discard” option (includes use of TRIM) for the root file system, “noatime” (turn off file access time), “nodiratime”
-> I decided to use one more tip – apt cache put to RAM
To do this, add the following line in /etc/fstab:
tmpfs /var/cache/apt/archives tmpfs defaults 0 0
In this case, the apt cache will not be stored on harddisk. For reinstalling packages, its can always be downloaded from the network. But it will now be possible to speed up packages installation in a clean system due to the large volume of RAM.
[4] Further analysis
Install utility iotop:
aptitude install iotop
Now you can see which processes are most actively use disk for writing:
iotop -oPa
After that, perhaps, you can think about what other folders can be transfered from application profiles to hdd.
p.s. This configuration has been working since January 2014. There are no problems 🙂