grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grub2 EFI: Image loading from USB takes too long


From: Aravind Srinivasan
Subject: Re: Grub2 EFI: Image loading from USB takes too long
Date: Wed, 6 Apr 2011 09:12:28 -0700 (PDT)


Dint see any further response on this. So can I assume the block-io patch 
provided will become part of some official release ? If so, which one ? Do I 
need to log a bug for this ?

Thanks,
Aravind

----- Original Message ----
From: Aravind Srinivasan <address@hidden>
To: The development of GNU GRUB <address@hidden>
Sent: Tue, April 5, 2011 9:36:52 AM
Subject: Re: Grub2 EFI: Image loading from USB takes too long



Tried the block IO patch. It is much better than the current default 
performance 

of 1.99. For the same initrd image (160M), loading from USB took approx 20 
secs. 

I also tried changing the value of GRUB_DISK_CACHE_BITS from 6 to 8, and load 
time improved to approx 12 secs.
Just to note, on Legacy Grub, this gets loaded almost in 3 secs.

Thanks,
Aravind


----- Original Message ----
From: Vladimir 'φ-coder/phcoder' Serbinenko <address@hidden>
To: The development of GNU GRUB <address@hidden>
Sent: Tue, April 5, 2011 12:36:35 AM
Subject: Re: Grub2 EFI: Image loading from USB takes too long

On 05.04.2011 08:32, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> On 05.04.2011 07:33, Aravind Srinivasan wrote:
>> include/grub/disk.h
>> <snip>
>> /* The size of a disk cache in sector units.  */
>> #define GRUB_DISK_CACHE_SIZE   8
>> #define GRUB_DISK_CACHE_BITS   3
>> <snip>
>> 
>> I tried changing this value to 8192 - and the time it took to load the same
>> image came down to 10 secs !
>> /* The size of a disk cache in sector units.  */
>> #define GRUB_DISK_CACHE_SIZE   8192
>> #define GRUB_DISK_CACHE_BITS   13
>> 
>> I am not sure of the reason for setting the cache size to a low value and any
>> possible issues in increasing this size. Appreciate any input on this.
> This value is a misnomer. It's not a cache size but a cache unit size. As 
>immediate effect it has that if one reads a single 512B, sector one reads an 
>entire block of 4K. Under normal conditions values of around 32K-128K 
>(6-8/64-256) would be optimal. It seems that some EFI implementations do a 
>"buffering" only to discard the buffered data. Some of the reports suggest 
>that 

>this braindamage is limited to disk io and doesn't happen with Block IO. 
>Values 

>you propose would result in 4M reads even when one needs just few sectors and 
>so 
>
>is suboptimal under normal conditions.
> I'll prepare few patches to investigate.
> After 1.99 the GRUB_DISK_CACHE_BITS will be increased to 6-8 range since, 
> it's 

>optimal and my AF support requires sector size to be smaller than cache unit 
>size.
> 
Attached a patch based on my AF patch which change to block IO.

-- Regards
Vladimir 'φ-coder/phcoder' Serbinenko

Insert mode



reply via email to

[Prev in Thread] Current Thread [Next in Thread]