Re: [gentoo-user] Understanding fstrim...

2020-04-14 Thread Rich Freeman
On Tue, Apr 14, 2020 at 10:26 AM Wols Lists wrote: > > On 14/04/20 13:51, Rich Freeman wrote: > > I believe they have > > to be PCIv3+ and typically have 4 lanes, which is a lot of bandwidth. > > My new mobo - the manual says if I put an nvme drive in - I think it's > the 2nd nvme slot - it disabl

Re: [gentoo-user] Understanding fstrim...

2020-04-14 Thread Wols Lists
On 14/04/20 13:51, Rich Freeman wrote: > I believe they have > to be PCIv3+ and typically have 4 lanes, which is a lot of bandwidth. My new mobo - the manual says if I put an nvme drive in - I think it's the 2nd nvme slot - it disables the 2nd graphics card slot :-( Seeing as I need two graphics

Re: [gentoo-user] Understanding fstrim...

2020-04-14 Thread Rich Freeman
On Mon, Apr 13, 2020 at 11:32 PM wrote: > > Since I have a NVMe drive on a M.2 socket I would > be interested at what level/stage (?word? ...sorry...) > the data go a different path as with the classical sata > SSDs. > > Is this just "protocol" or there is something different? NVMe involves both

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread tuxic
On 04/13 04:58, Rich Freeman wrote: > On Mon, Apr 13, 2020 at 4:34 PM antlists wrote: > > > > aiui, the spec says you can send a command "trim 1GB starting at block > > X". Snag is, the linux block size of 4KB means that it gets split into > > loads of trim commands, which then clogs up all the bu

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread Rich Freeman
On Mon, Apr 13, 2020 at 4:34 PM antlists wrote: > > aiui, the spec says you can send a command "trim 1GB starting at block > X". Snag is, the linux block size of 4KB means that it gets split into > loads of trim commands, which then clogs up all the buffers ... > Hmm, found the ATA spec at: http:

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread antlists
On 13/04/2020 17:05, Rich Freeman wrote: And what takes time when doing a "large" TRIM is transmitting a _large_ list of blocks to the SSD via the TRIM command. That's why e.g. those ~6-7GiB trims I did just before (see my other mail) took a couple of seconds for 13GiB ~ 25M LBAs ~ a whole effin

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread Rich Freeman
On Mon, Apr 13, 2020 at 11:41 AM David Haller wrote: > > First of all: "physical write blocks" in the physical flash are 128kB > or something in that size range, not 4kB or even 512B Yup, though I never claimed otherwise. I just made the generic statement that the erase blocks are much larger th

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread David Haller
Hello, On Mon, 13 Apr 2020, Rich Freeman wrote: >So, "trimming" isn't something a drive does really. It is a logical >command issued to the drive. > >The fundamental operations the drive does at the physical layer are: >1. Read a block >2. Write a block that is empty >3. Erase a large group of bl

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread Rich Freeman
On Mon, Apr 13, 2020 at 9:18 AM wrote: > > One quesion -- not to express any doubt of what you wrote Rich, but onlu > to check, whether I understand that detail or not: > > Fstrim "allows" the drive to trim ittself. The actual "trimming" is > done by the drive ittself without any interaction from

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread David Haller
Hello, On Mon, 13 Apr 2020, tu...@posteo.de wrote: >On 04/13 11:06, Michael wrote: >> On Monday, 13 April 2020 06:32:37 BST tu...@posteo.de wrote: [..] >My question are more driven by curiousty than by anxiety... [..] >For example [the fstrim manpage] says: >"For most desktop and server systems a

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread tuxic
On 04/13 08:18, Rich Freeman wrote: > On Mon, Apr 13, 2020 at 7:55 AM Michael wrote: > > > > I have noticed when prolonged fstrim takes place on an old SSD drive of mine > > it becomes unresponsive. As Rich said this is not because data is being > > physically deleted, only a flag is switched fro

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread Rich Freeman
On Mon, Apr 13, 2020 at 7:55 AM Michael wrote: > > I have noticed when prolonged fstrim takes place on an old SSD drive of mine > it becomes unresponsive. As Rich said this is not because data is being > physically deleted, only a flag is switched from 1 to 0 to indicate its > availability for fu

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread Michael
On Monday, 13 April 2020 12:39:11 BST Rich Freeman wrote: > On Mon, Apr 13, 2020 at 1:32 AM wrote: > > fstrim clears blocks, which currently are not in use and which > > contents is != 0. > > > >... > > > > BUT: Clearing blocks is an action, which includes writes to the cells of > > the SSD. > >

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread Rich Freeman
On Mon, Apr 13, 2020 at 1:32 AM wrote: > > fstrim clears blocks, which currently are not in use and which > contents is != 0. >... > BUT: Clearing blocks is an action, which includes writes to the cells of > the SSD. I see a whole bunch of discussion, but it seems like many here don't actually un

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread Andrea Conti
Have your backup cron job call fstrim once everything is safely backed up? Well, yes, but that's beside the point. What I really wanted to stress was that mounting an SSD-backed filesystem with "discard" has effects on the ability to recover deleted data. Normally it's not a problem, but

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread tuxic
Hi Michael, thank you for replying to my questions! :) On 04/13 11:06, Michael wrote: > On Monday, 13 April 2020 06:32:37 BST tu...@posteo.de wrote: > > Hi, > > > > From the list I already have learned, that most of my concerns regarding > > the lifetime and maintainance to prolong it are with

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread Peter Humphrey
On Monday, 13 April 2020 06:32:37 BST tu...@posteo.de wrote: > Assuming this information is available: Is it possible to find the > sweat spot, when to fstrim SSD? This crontab entry is my compromise: 15 3 */2 * * /sbin/fstrim -a It does assume I'll be elsewhere at 03:15, of course. -- Regard

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread Michael
On Monday, 13 April 2020 06:32:37 BST tu...@posteo.de wrote: > Hi, > > From the list I already have learned, that most of my concerns regarding > the lifetime and maintainance to prolong it are without a > reason. Probably your concerns about SSD longevity are without a reason, but keep up to da

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread Neil Bothwick
On Mon, 13 Apr 2020 11:22:47 +0200, Andrea Conti wrote: > I have no desire to enter the whole performance/lifetime debate; I'd > just like to point out that one very real consequence of using fstrim > (or mounting with the discard option) that I haven't seen mentioned > often is that it makes the

Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread Andrea Conti
> My SSD (NVme/M2) is ext4 formatted and I found articles on the > internet, that it is neither a good idea to activate the "discard" > option at mount time nor to do a fstrim either at each file deletion > no triggered by a cron job. I have no desire to enter the whole performance/lifetime deba

[gentoo-user] Understanding fstrim...

2020-04-12 Thread tuxic
Hi, >From the list I already have learned, that most of my concerns regarding the lifetime and maintainance to prolong it are without a reason. Nonetheless I am interested in the technique as such. My SSD (NVme/M2) is ext4 formatted and I found articles on the internet, that it is neither a good