1 |
On Friday 19 November 2010 22:13:50 Mick wrote: |
2 |
|
3 |
> Short of measuring the latency with some system (which I wouldn't |
4 |
> know how) I have experimented with setting the /boot partition on |
5 |
> primary and logical partitions and the difference (on a stopwatch) |
6 |
> was measurable in seconds betweeen having said partition on a |
7 |
> primary and having it on a logical. Furthermore, sda7 was slower |
8 |
> than sda5. |
9 |
> |
10 |
> I haven't measured latencies for first mount and subsequent look ups. |
11 |
> I thought that it would be the same every time a partition fs is |
12 |
> being accessed, no? |
13 |
|
14 |
I shouldn't design it that way. Would you? |
15 |
|
16 |
Consider the layout of the disk. First we have the master boot record, |
17 |
which contains the disk addresses of the four allowable primary |
18 |
partitions*, and not much else besides the primitive boot code to fetch |
19 |
the data from those addresses. Then each primary partition has the |
20 |
address of its first directory containing data. Those five parameters are |
21 |
assumed to be fixed and can be held in a small lookup table in the OS. |
22 |
|
23 |
One primary partition may be declared as an "extended" partition, by the |
24 |
setting of a single bit in its entry in the MBR**. That partition has to |
25 |
have the same header layout as the others, in particular not allowing |
26 |
more than one data address***. In this case it's the address not of the |
27 |
first directory but of the first logical partition - and that partition |
28 |
has to have the same header layout again, because it's just a partition |
29 |
full of data, isn't it? |
30 |
|
31 |
The answer to your question is that only very few values are needed to |
32 |
specify the fixed start points of all the partitions on the disk, and |
33 |
virtually no overhead is involved in storing them for the inevitably |
34 |
frequent use they're going to get. |
35 |
|
36 |
(Sorry if I'm rambling. I've been down with the dreaded lurgy for a day |
37 |
or two, and after a small glass of wine this evening I'm having trouble |
38 |
focusing on the screen, never mind my thoughts.) |
39 |
|
40 |
* One partition is plenty for all normal folk, especially those who run |
41 |
an OS that's convinced it's the only entity in the universe - who could |
42 |
possibly want more than four? And just don't mention 640KB memory unless |
43 |
you're prepared for fisticuffs. |
44 |
|
45 |
** Talk about a single point of failure! |
46 |
|
47 |
*** Well, of course it doesn't, but what would we do without hindsight? |
48 |
|
49 |
-- |
50 |
Rgds |
51 |
Peter. Linux Counter 5290, 1994-04-23. |