Guest User!

You are not Sophos Staff.

[8.920][ANSWERED] will there be trim support for SSD?

I remember reading in the forums previously concerning 8.3 that v9 will have trim support for SSD.

Will the ultimate release of 8.9 include trim support for ssd?
  • AstaroOS: Support for SSD's

    According to product management, it is included in the UTM v9 beta which you can test out today!
  • There is TRIM support, already in the BETA. It's automatic use is limited to selected models, though because SSDs cannot be detected easily as such. But you can achieve full SSD support by modifying a few things manually (especially the EXT4 'discard' mount option to activate TRIM). All partitions will be 1MB-aligned by default in v9, even when not using an SSD. Read on here for some manual steps.
  • Hi Mario,
    thank you for the update and extra information.

    I tried the commands on my UTM which has an SSD and most of the commands are either not known eg sudo nano or permission denied which I thought was a bit rough being logged in as root.

    Ian

    Used edit to alter a number of entries, the only worry is that some of the fstab entries look very similar to what is in the article.

    Further update. /var/spool doesn't work, i suspect there is a requirement that the entry for the temporary file be made earlier in the boot process, Postfix (I think it was) can't find or build the required structure.
    The swap change has created a swap space, but not used any space yet according to top.

    How do I tell if the changes I have made have improved the performance?

    UTM9 would be the fastest booting version I have ever used.

    Probably would help if I added details about the SSD.
    OCZ 60GB Sata II Vertex 2.
    MLC flash memory. TRIM Support. Raid capability.
  • RFCat_vk, the guide was not meant as a copy & paste article for UTM v9.

    If you don't measure speed, you probably won't notice any improvement by optimizing. TRIM does not directly affect speed, it's more about keeping an SSD in good shape so it doesn't slow down over time. Other SSD optimizations are about lowering SSD wear level, like not writing last access timestamps or SWAP only if really necessary.
  • Hi Mario,
    I didn't copy an paste, I tried out a number of the items mentioned, but not all worked.
    Part of being in a beta trial is learn, as I am the only user of my portable unit at the moment I can experiment. It didn't fail to boot, so my experimentation wasn't a failure and hopefully will improve the live of the SSD.

    Ian
  • Successfully running 8.930 on a Patriot 32GB Torqx 2ssd (sata 2).

    As per the link posted by Mario (post #3) I added a ram disk for tmp file usage.  (The box has 4GB).   Straight from the link, I edited /etc/fstab and added:



    #added for moving tmp file to ramdisk instead of ssd

    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




    After reboot df -h shows:



    astaro:/home/login # df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda6       5.4G  1.7G  3.5G  33% /
    tmpfs           2.0G  168K  2.0G   1% /dev
    tmpfs           2.0G     0  2.0G   0% /dev/shm
    /dev/sda1       348M   30M  301M   9% /boot
    /dev/sda5       9.1G  1.5G  7.2G  17% /var/storage
    /dev/sda7        12G  868M   11G   8% /var/log
    /dev/sda8       2.0G   52K  2.0G   1% /tmp
    tmpfs           2.0G   52K  2.0G   1% /tmp
    tmpfs           2.0G     0  2.0G   0% /var/spool
    tmpfs           2.0G     0  2.0G   0% /var/tmp
    tmpfs           2.0G   24K  2.0G   1% /var/storage/chroot-smtp/tmp/ram



    I found this link to provide a nice description of tmpfs versus ramfs:

    http://www.thegeekstuff.com/2008/11/overview-of-ramfs-and-tmpfs-on-linux/



    I also note /etc/fstab as created by astaro installer disables metadata updating on file access.  /etc/fstab on install contains:



    # written by Astaro Installer

    UUID=7677ba51-7f46-4f22-b8c1-860dd5ee2012 /boot ext4 defaults,ro,noatime 1 2
    UUID=86cde415-7052-4f4b-bc89-123e6ececfc8 swap swap sw 0 0
    UUID=7726c8e4-691b-4d79-9224-add2d07f69f5 /opt/inst ext4 defaults,noauto,noatim
    UUID=3f5cb4f4-92b8-4a82-bf9f-4a2b443c00d0 /var/storage ext4 defaults,noatime 1
    UUID=1912acc0-2cab-43aa-83d9-d5d3bd6901e5 / ext4 defaults,noatime 1 1
    UUID=4ad236fe-22d2-4d88-8faf-c5942baed2f8 /var/log ext4 defaults,noatime 1 2
    UUID=29fabaf9-ec4f-4b08-a437-1bc7cba03389 /tmp ext4 defaults,noatime 1 2

  • rayik, you forgot to add the 'discard' mount option for the ext4 partitions. This effectively makes use of TRIM support on filesystem level.
  • Hi,
    I found out why mine was failing. I had added all the necessary commands to /etc/fstab, but the UTM does not like having 2 /var/spool directories and as a result does not start postfix.
    As far as I can see the build files would need to be edited to remove the creation of the permanent /var/spool directory and add one to the fstab file. Of course this is probably a feature request to allow finer config tuning at build time.
    I removed the /var/spool from the tmpfs function all is working again.

    Ian
  • A monitor attached to the astaro box showed that postfix failed due to astaro being unable to locate directory /var/spool/postfix/etc.  Because that directory was missing, astaro could not create these files:

    localtime
    nsswitch.conf
    paswd
    resolv.conf
    services

    Solution was to change the /etc/fstab file to create that directory in tmpfs.   On reboot no longer did postfix fail.

    This is what I have added to /etc/fstab to create the ramdisk:




    tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
    tmpfs /var/spool/postfix/etc tmpfs defaults,noatime,mode=1777 0 0
    tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0

    #removed due to error on bootup
    #tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0



    Ramdisk in use:



    astaro:/home/login # df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda6       5.4G  1.7G  3.5G  33% /
    tmpfs           1.9G  176K  1.9G   1% /dev
    tmpfs           1.9G     0  1.9G   0% /dev/shm
    /dev/sda1       348M   30M  301M   9% /boot
    /dev/sda5       9.1G  1.5G  7.2G  17% /var/storage
    /dev/sda7        12G  883M   11G   8% /var/log
    /dev/sda8       1.9G   52K  1.9G   1% /tmp
    tmpfs           1.9G   52K  1.9G   1% /tmp
    tmpfs           1.9G  320K  1.9G   1% /var/spool/postfix/etc
    tmpfs           1.9G     0  1.9G   0% /var/tmp
    tmpfs           1.9G   32K  1.9G   1% /var/storage/chroot-smtp/tmp/ram



    **************** EDIT

    The second error in photo #2 is due to my error in not having a final endline at the end of the /etc/fstab file.  Adding a carriage return to the end of file fixed this error and it no longer appeared on bootup and ramfs /var/tmp was created successfully

    **************** END EDIT


    Attached are two screen shots showing the errors on bootup.

    Bob


  • I tried the commands on my UTM which has an SSD and most of the commands are either not known eg sudo nano or permission denied which I thought was a bit rough being logged in as root.


    I noticed nano is not included in astaro.  The joe editor is built in.  (Much easier to use than vi)

    Bob
Share Feedback
×

Submitted a Tech Support Case lately from the Support Portal?