Gentoo Archives: gentoo-user

From: Volker Armin Hemmann <volkerarmin@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] 1-Terabyte drives - 4K sector sizes? -> bar performance so far
Date: Sun, 07 Feb 2010 20:03:43
Message-Id: 201002072016.35000.volkerarmin@googlemail.com
In Reply to: Re: [gentoo-user] 1-Terabyte drives - 4K sector sizes? -> bar performance so far by Mark Knecht
1 On Sonntag 07 Februar 2010, Mark Knecht wrote:
2 > On Sun, Feb 7, 2010 at 9:30 AM, Alexander <b3nder@××××××.ru> wrote:
3 > > On Sunday 07 February 2010 19:27:46 Mark Knecht wrote:
4 > >> Every time there is an apparent delay I just see the hard drive
5 > >> light turned on solid. That said as far as I know if I wait for things
6 > >> to complete the data is there but I haven't tested it extensively.
7 > >>
8 > >> Is this a bad drive or am I somehow using it incorrectly?
9 > >
10 > > Is there any related info in dmesg?
11 >
12 > No, nothing in dmesg at all.
13 >
14 > Here are two tests this morning. The first is to the 1T drive, the
15 > second is to a 120GB drive I'm currently using as a system drive until
16 > I work this out:
17 >
18 > gandalf TestMount # time tar xjf /mnt/TestMount/portage-latest.tar.bz2
19 > -C /mnt/TestMount/usr
20 >
21 > real 8m13.077s
22 > user 0m8.184s
23 > sys 0m2.561s
24 > gandalf TestMount #
25 >
26 >
27 > mark@gandalf ~ $ time tar xjf /mnt/TestMount/portage-latest.tar.bz2 -C
28 > /home/mark/Test_usr/
29 >
30 > real 0m39.213s
31 > user 0m8.243s
32 > sys 0m2.135s
33 > mark@gandalf ~ $
34 >
35 > 8 minutes vs 39 seconds!
36 >
37 > The amount of data written appears to be the same:
38 >
39 > gandalf ~ # du -shc /mnt/TestMount/usr/
40 > 583M /mnt/TestMount/usr/
41 > 583M total
42 > gandalf ~ #
43 >
44 >
45 > mark@gandalf ~ $ du -shc /home/mark/Test_usr/
46 > 583M /home/mark/Test_usr/
47 > 583M total
48 > mark@gandalf ~ $
49 >
50 >
51 > I did some reading at the WD site and it seems this drive does use the
52 > 4K sector size. The way it's done is the addressing on cable is still
53 > 512 byte 'user sectors', but they are packed into 4K physical sectors
54 > and internal hardware does the mapping.
55 >
56 > I suspect the performance issue is figuring out how to get the file
57 > system to keep things on 4K boundaries. I assume that's what the 4K
58 > block size is for when building the file system but I need to go find
59 > out more about that. I did not select it specifically. Maybe I need
60 > to.
61 >
62 > Thanks,
63 > Mark
64
65 no. 4k block size is the default for linux filesystems. But you might have
66 'misaligned' the partitions. There is a lot of text to read about
67 'eraseblocks' on ssds and how important it is to align the partitions. You
68 might want to read up on that to learn how to align partitions.