View Single Post
Posts: 479 | Thanked: 1,284 times | Joined on Jan 2012 @ Enschede, The Netherlands
#1
Current SSD's support TRIMming, where the OS tells the drive whenever data blocks are no longer used and can be freed by the drive. It helps with longevity and performance, as the drive has empty blocks available for wear leveling and ready to write new data to.

Linux supports this since many years, and Btrfs has a mount option to enable it.

On the Jolla1, this does not appear to be enabled:

Code:
[nemo@Sailfish ~]$ cat /sys/block/mmcblk0/queue/discard_zeroes_data 
0
(remarkably, it it is enabled on the µSD-card?!)
Code:
[nemo@Sailfish ~]$ cat /sys/block/mmcblk1/queue/discard_zeroes_data 
1
Linux normally has the command fstrim, which invokes TRIM on demand. However, this command isn't available on SailfishOS.

edit: not sure whether discard_zeroes_data actually means TRIM is supported. On my two home machines with SSD with TRIM support it also says "0", even though an "fstrim" actually seems to do something. On Ubuntu, fstrim is scheduled to run once a week by default.

Questions:
  • Could it be enabled for btrfs on Jolla1? Note the btrfs mount option "ssd", which is enabled on J1, does not imply TRIM/discard.
  • Would it actually help?

Last edited by Fuzzillogic; 2017-10-15 at 21:49.
 

The Following 6 Users Say Thank You to Fuzzillogic For This Useful Post: