Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Problem with gdbus-codegen
Date: Mon, 30 Jan 2017 14:40:12
Message-Id: 4d064c23-16fb-dba3-5c49-2b0be1302a98@gmail.com
In Reply to: Re: [gentoo-user] Problem with gdbus-codegen by Mick
1 On 30/01/2017 01:06, Mick wrote:
2 > On Sunday 29 Jan 2017 22:10:59 Neil Bothwick wrote:
3 >> On Sun, 29 Jan 2017 19:17:47 +0000, Mick wrote:
4 >>>> Are you running fstrim once in a while like it's recommended?
5 >>>> Apparently using 'discard' as an option when mounting is no longer
6 >>>> recommended. On my laptops I use a systemd timer to do this. Before
7 >>>> that I used anacron (I think it was anacron) which would run missed
8 >>>> cronjobs.
9 >>>
10 >>> This is surprised me ... I just installed Gentoo on a MacBook and the
11 >>> handbook/wiki said to use discard in fstab ... I'm running two PCs like
12 >>> this now. :-/
13 >>>
14 >>> Is there a URL somewhere recommending otherwise?
15 >>
16 >> man fstrim:
17 >>
18 >> Running fstrim frequently, or even using mount -o discard, might
19 >> negatively affect the lifetime of poor-quality SSD devices. For most
20 >> desktop and server systems a sufficient trimming frequency is once a
21 >> week. Note that not all devices support a queued trim, so each trim
22 >> command incurs a performance penalty on whatever else might be trying to
23 >> use the disk at the time.
24 >
25 > Hmm .... I better take these discards off fstab then. Are these weekly trims
26 > OK, if the PC is rebooted on a daily basis?
27 >
28
29 You can deal with trim as if it were a low-impact defrag on Windows. All
30 trim really does is clean up blocks from deleted files, nuke the
31 metadata and return the blocks to the unallocated pool.
32
33 This is an expensive operation on SSDs which is why they are delayed. In
34 theory you could even leave the disk untrim'med until you need the space :-)
35
36
37 --
38 Alan McKinnon
39 alan.mckinnon@×××××.com