1 |
On Sat, 20 Nov 2010 00:10:02 +0100, Mick wrote about Re: [gentoo-user] |
2 |
migrating disks (from mounts to disklabels: |
3 |
|
4 |
>On Friday 19 November 2010 19:19:34 David W Noon wrote: |
5 |
>> On Fri, 19 Nov 2010 17:00:04 +0100, Peter Humphrey wrote about Re: |
6 |
>> |
7 |
>> [gentoo-user] migrating disks (from mounts to disklabels: |
8 |
>> >On Friday 19 November 2010 14:42:23 Neil Bothwick wrote: |
9 |
>> >> On Fri, 19 Nov 2010 10:52:50 +0000, Mick wrote: |
10 |
>> >> > Also primary partitions which he does not seem to be using at |
11 |
>> >> > all have a slight edge over logical. |
12 |
>> >> |
13 |
>> >> Do you have any data on this? I generally use all logical |
14 |
>> >> partitions but could be persuaded to rethink. |
15 |
>> > |
16 |
>> >Well there must be one level of indirection on first access, since |
17 |
>> >the start of the logical partition has to be looked up in a |
18 |
>> >"primary" partition, but I can't imagine that being needed more |
19 |
>> >than once per reboot. |
20 |
>> |
21 |
>> Correct. |
22 |
>> |
23 |
>> The same applies to LVM2 or EVMS logical volumes: a small "lookup" |
24 |
>> penalty (a few milliseconds) when the filesystem is first |
25 |
>> activated/mounted, and as fast as the drive itself thereafter. |
26 |
> |
27 |
>Short of measuring the latency with some system (which I wouldn't know |
28 |
>how) I have experimented with setting the /boot partition on primary |
29 |
>and logical partitions and the difference (on a stopwatch) was |
30 |
>measurable in seconds betweeen having said partition on a primary and |
31 |
>having it on a logical. Furthermore, sda7 was slower than sda5. |
32 |
|
33 |
Unless you have the mother of all initrd's or initramfs's, you cannot |
34 |
have /boot on a logical partition -- only a primary partition, as BIOS |
35 |
interrupts will only access raw drives and primary partitions. If you do |
36 |
put /boot on a logical partition, you will pay the "lookup" overhead |
37 |
repeatedly as part of the early bootstrap process. Since you won't have |
38 |
a kernel running at that time. no caching, including device mapping, |
39 |
will be in force. It will be dog slow if /boot is not in the primary |
40 |
partition table. I always make my /boot partition /dev/sda1, which is |
41 |
the first primary on the first hard drive. |
42 |
|
43 |
>I haven't measured latencies for first mount and subsequent look ups. |
44 |
>I thought that it would be the same every time a partition fs is being |
45 |
>accessed, no? |
46 |
|
47 |
No. |
48 |
|
49 |
The absolute seek addresses of all partitions and logical volumes are |
50 |
cached by the kernel. Later accesses will always use the cached extent |
51 |
details. Resizing a logical volume rebuilds that part of the cache and, |
52 |
if you resize with the filesystem mounted, forces the filesystem driver |
53 |
to reread the cached extent information. |
54 |
|
55 |
-- |
56 |
Regards, |
57 |
|
58 |
Dave [RLU #314465] |
59 |
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
60 |
dwnoon@××××××××.com (David W Noon) |
61 |
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |