The trim command is only used on SSDs (Solid State Drives); it must be supported by the host OS as that informs the drive to perform safe 'garbage collection' on blocks of data that are unused and so can be wiped.
Questions tagged [trim]
109 questions
203
votes
2 answers
How to enable TRIM?
I know that the Linux kernel supports TRIM as of version 2.6.33, so there should be TRIM support in ubuntu.
Is TRIM enabled by default or do I need to change some settings or install additional software for it to work? If so, how?
Uli
- 5,196
77
votes
7 answers
What is the recommended way to empty a SSD?
I've just received my new SSD since the old one died. This Intel 320 SSD supports TRIM. For testing purposes, my dealer put Windows on it, but I want to get rid of this and install Kubuntu on it.
It does not have to be a "secure wipe", I just need…
Lekensteyn
- 178,446
71
votes
2 answers
Is TRIM enabled on my Ubuntu 18.04 installation?
I know that weekly TRIM is enabled by default from 14.10 onwards. Source: How to enable TRIM?
But running sudo nano /etc/cron.weekly/fstrim returns an empty file. Also tail -n1 /etc/cron.weekly/fstrim says that this file does not exist.
Running…
m.umar
- 825
34
votes
5 answers
Does Ubuntu have support for the TRIM command for use with SSD?
SSD drives need to be "cleared/reset" after the drive fills up to maintain performance. This is done through the TRIM command for new SSD drives. Does Ubuntu support the TRIM command (through hdparm etc) for clearing/resetting of these drives?
ssanj
- 4,411
23
votes
1 answer
How well are SSDs supported?
I'm planning to buy an SSD (Corsair Force Series 60GB) but haven't found any reassurance that it is "safe" to install Ubuntu 11.04 on without commands or "hacks". I want to install Ubuntu on an SSD and don't want to care about writing commands after…
Celso
- 432
21
votes
4 answers
Ubuntu SSD - Was fast, is now extremely slow
This is what I'm getting now, with a Crucial MX300 750GB SSD (with latest firmware [there are no firmware updates yet]).
lptp [ blah ]: sudo hdparm -Tt /dev/sda
/dev/sda:
Timing cached reads: 10202 MB in 2.00 seconds = 5103.20 MB/sec
Timing…
d0c_s4vage
- 363
15
votes
2 answers
Do I need to enable TRIM if I have a non-Intel/Samsung
I read in one of the webupd8 articles that TRIM support, which was introduced in Ubuntu 14.04, by default only works for Intel and Samsung SSDs. What about other? I am using Dell XPS 13 Dev Edition laptop and the SSD is from a different…
Nikki Kononov
- 1,310
14
votes
1 answer
Should I turn on zfs-trim on my pools or should I trim on a schedule using systemd timers or cron?
I run Ubuntu 19.10 installed on ZFS through the new ZFS install option on 19.10. This is on a Thinkpad X1 Carbon 7th which is in heavy daily use. No dualboot so it's Ubuntu all the time. The laptop has a SSD, and as I understand it fstrim doesn't…
Christian
- 1,789
- 2
- 22
- 38
13
votes
4 answers
Do you recommend LUKS encryption on a SSD (TRIM support)?
I have a laptop (Dell Inspiron 11z) and and SSD (Samsung 128GB) on order.
On my current laptop, I have a spinning HDD and use LVM and LUKS encryption.
I would like to use LUKS on the SSD but from doing a bit of research I am not sure if this is…
user24222
- 131
13
votes
1 answer
What exactly do the 'allow-discards' and 'root_trim' Linux parameters do?
A lot of SSD-related instructions online currently say you should add allow-discards and root_trim=yes to your GRUB_CMDLINE_LINUX. I have yet to find one that says why you should do that, i.e. what exactly (if anything!) do those parameters do.…
Jani Uusitalo
- 893
- 1
- 8
- 22
13
votes
4 answers
Automatic TRIM vs. manual TRIM
I am currently trying to find out how to trim with my new TP and was wondering about the difference of manual/online trimming.
Here is my setup:
ThinkPad T430s with SSD Samsung 830, 128GB and Xubuntu 12.10, here are some outputs to check if trim…
Eike Cochu
- 313
13
votes
5 answers
What's the story with TRIM support?
The situation with TRIM in Ubuntu has me utterly confused. I don't know whether I need to manually run it or not. Sources I've found are disparate and unclear.
I have Ubuntu 10.04 with latest updates (including kernel 2.6.32-26). I have an Intel…
Kent Boogaart
- 1,088
13
votes
1 answer
How to run fstrim -a regularly automatically?
I noticed that manual seldom invocations of fstrim -av take a lot of time (over 10 minutes) and report a lot of free space to the SSD:
# /usr/bin/time -p fstrim -av
/boot/efi: 503,2 MiB (527671296 Bytes) auf /dev/sda1 getrimmt
/: 377 GiB…
user1033549
10
votes
1 answer
fstrim on external SSD drives don't work
I have two external USB 3.0 SSD drives from Samsung (one is Model T1, other T3).
I would like to trim them with my Ubuntu 16.04.1 LTS.
While doing that I receive a error message. Here an example:
sudo fstrim -v /media/techo/Samsung_T3
fstrim:…
Luckyrings
- 481
- 2
- 5
- 15
10
votes
2 answers
How to set up SSD raid and TRIM support?
I am looking to set up a new server. I can only use Intel 520 Series 240gb MLC ssds or standard Seagate 7200rpm disks.
These are the non negotiable options.
Naturally, as this is going to be running MySQL with its primary task being a MySQL server.…
Steed
- 101