Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: Gentoo User <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] disk accesses per subdirectory tree
Date: Fri, 21 Dec 2012 22:24:10
Message-Id: CAK2H+eduwUiAovz4aa-s8SjHb7yfktHs4FhG6paPceOYcZTXig@mail.gmail.com
In Reply to: [gentoo-user] disk accesses per subdirectory tree by Helmut Jarausch
1 On Fri, Dec 21, 2012 at 5:42 AM, Helmut Jarausch
2 <jarausch@××××××××××××××××.de> wrote:
3 > Hi,
4 >
5 > I'd like to put some subdirectory trees (of / and of /usr and of /home) onto
6 > an SSD.
7 > For that I'd like to count the disk accesses which go to a given
8 > subdirectory tree
9 > in some given time intervall.
10 >
11 > Is there any utility which can measure this?
12 >
13 > Many thanks for a hint,
14 > Helmut.
15 >
16
17 Hi Helmut,
18 Only responding to say I'd been looking for something to do the
19 same thing myself and haven't found anything.
20
21 That said, a couple of points:
22
23 1) You should be able to watch for issues using smartctl, assuming a
24 modern SSDs.
25
26 2) In a post where I asked about this sort of stuff in the Vertex
27 forums I received the following response from folks who seem to have
28 more experience than I. Of course, take this with a grain of salt:
29
30 [QUOTE]
31 Just using round numbers and assuming effective wear leveling, your 30
32 GB file may get rewritten once a month. That's 25% of the 128 GB
33 drive, so each NAND cell will get rewritten 3 times a year. If the
34 NAND is good for 10,000 rewrites, you have LOTS of years available...
35
36 Even if it's rewritten every day, that's 100 NAND rewrites/year, or
37 100 years of NAND life based on rewrites.
38
39 You can use any numbers you want, but it will still likely come out to
40 "longer than we care about"...
41 [/QUOTE]
42
43 Keep in mind that the idea of 'effective wear leveling' is
44 ___really___ important here. Unlike an HD, SSDs do not write over and
45 over to the same location forever. If a block of the drive starts to
46 get heavily used, in terms of number of writes, then firmware will
47 move the block to another location and remap the address. This happens
48 in the drive, not by the OS, so it's invisible to us. (First order
49 anyway - there are probably ways to find out but I'm not looking for
50 those.)
51
52 Anyway, as there hadn't been any responses I thought I would...
53
54 Cheers,
55 Mark