ImpliedConsent wrote:powerhouse wrote:You should never defrag an SSD !!! Not only does it nothing to improve performance or disk usage, it actually harms your SSD and can severely reduce its life time.
Oh, I wasn't asking whether an SSD needs to be defrag or not - and said as much and am aware of the wear levels - my question is more geared to TRIM support on LM. I know the kernal supports TRIM - but does LM automatically enable it for background GC? My comment on defrag was more a comparison with W7+ being turned off by default when the drive reports itself to the OS as an SSD. Does this also happen in LM?
I suggest you check the link I posted. Here is my /etc/fstab configuration for reference:
Code: Select all
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/dev/mapper/lm16-root / ext4 noatime,nodiratime,discard,errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
/dev/sda1 /boot ext2 defaults,noatime,nodiratime 0 2
/dev/mapper/lm16-home /home ext4 noatime,nodiratime,discard,defaults 0 2
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# My SSD has /dev/sda1, and several LVM volumes:
/dev/mapper/lm16-root / ext4 noatime,nodiratime,discard,errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
/dev/sda1 /boot ext2 defaults,noatime,nodiratime 0 2
/dev/mapper/lm16-home /home ext4 noatime,nodiratime,discard,defaults 0 2
# Regular HDD:
# lm16-data on /dev/sdb1 as /home/<user name>/data
/dev/mapper/lm16-data /home/<user name>/data ext4 errors=remount-ro 0 1
/dev/mapper/lm16-swap none swap sw 0 0
#force temporary files to be stored in memory instead of on disk
none /tmp tmpfs nodev,nosuid,mode=1777 0 0
none /var/tmp tmpfs nodev,nosuid,mode=1777 0 0
For ext2 partitions it's: ext2 defaults,noatime,nodiratime
For ext3 or ext4 partitions: ext4 noatime,nodiratime,discard,defaults
"discard" activates the trim function. It is quite possible that this is done automatically with modern Linux distributions, but I don't know for sure.
"noatime" prevents Linux to write the access time to the file, which greatly reduces write access on SSDs. "nodiratime" is the same for directories, but "noatime" implies "nodiratime" so it's actually not required. But it won't harm.
The swap partition resides on a regular HDD !
Another important part is setting up a virtual tmp file system in memory for /tmp and /var/tmp
And here the relevant line in /etc/default/grub file:
Code: Select all
GRUB_CMDLINE_LINUX_DEFAULT="profile elevator=deadline"
This defines the scheduler to be used. Not sure this makes a big difference.