SSD optimization on Ubuntu Mate 18.04.1

Hi,
I’m trying to understand what are the optimizations necessary to ensure the optimal functioning of a SSD with UM, but all the material that i could find is at least one year old and is quite inconsistent.
I’ve bought a Drevo SSD (X1 Pro 128 GB) and i have a Acer Aspire with 4 GB of RAM.
What i managed to understand is:

  • I need to leave around 10% of anallocated space for overprovisioning.

  • I shouldn’t have a swap partition.

  • Set swappiness to 10.

Now first problem: isn’t it necessary with that small amount of RAM to have a swap partition? I use this PC mainly for study, but sometimes i need to run IDEs, servers, or pretty demanding softwares.
Second: i’m trying to understand if TRIM is enabled by default on UM or not.
If not i’ve seen how to enable it in different way: automate it via cron or by putting discard and noatime in fstab.
Wich is the best way?
Are there any other recomanded actions?
Thanks for your help and i’m sorry if i made any mistake.

18.04 uses swap files instead of swap partitions according to this thread.

Mickey :relaxed:

1 Like

I have several 128 gig ssd drives I use in a few different computers.I’ve installed several different linux systems in them and I have never had a problem with pretty much just going with the default system set up.I do usually use xfs instead of the ext4 but ext4 maybe more stable.As far as leaving 10% space I haven’t messed with it. Swap space with the smaller disk I stay around 2 gigs and on ubuntu I do set the swappines to 10.As far as I know trim is enabled but depending on what I’m doing I try and run fstrim every week or so just to clean up the drive.It may not need it but it’s just something I’ve gotten used to.One drive is coming up on about 3 years old now and as i said I haven’t done anything special and have had very good luck with staying close to the default when installing.

1 Like

Thank you for the replies, as i will have a couple of hours i will install everything and update the post :spy:

How do you set the swap memory to 10%?

Instead of a swap, you can use zram, which makes the swap in RAM by compressing old pages.

It configures itself, so it is easy to deploy:

https://doc.ubuntu-fr.org/zram

It is working like a charm for me.

And more things:

I need to leave around 10% of anallocated space for overprovisioning.

I am not sure that it is required on modern drives, if you enable TRIM and considering that overprovisioning is already done by the SSD itself (managed by the controller).

i’m trying to understand if TRIM is enabled by default on UM or not.

For me, the installer took care of it.
One way to check is to run something like fstrim -v /, for instance. If it works, then it means that TRIM has been enabled.

Also, there is a systemctl time to launch it periodically, which you can check with:

➤  systemctl status fstrim.timer