All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Grub2 EFI: Image loading from USB takes too long
@ 2011-04-06 16:12 Aravind Srinivasan
  2011-04-07  9:24 ` KESHAV P.R.
  2011-04-08 16:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 2 replies; 21+ messages in thread
From: Aravind Srinivasan @ 2011-04-06 16:12 UTC (permalink / raw)
  To: grub-devel



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 <aravind_s_873@yahoo.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
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 <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
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


^ permalink raw reply	[flat|nested] 21+ messages in thread
* Re: Grub2 EFI: Image loading from USB takes too long
@ 2011-04-15 16:07 Finnbarr P. Murphy
  0 siblings, 0 replies; 21+ messages in thread
From: Finnbarr P. Murphy @ 2011-04-15 16:07 UTC (permalink / raw)
  To: grub-devel

This problem is also present on ext3 and ext4

- F


^ permalink raw reply	[flat|nested] 21+ messages in thread
* Grub2 EFI: Image loading from USB takes too long
@ 2011-04-05  5:33 Aravind Srinivasan
  2011-04-05  6:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2011-04-05  6:32 ` Seth Goldberg
  0 siblings, 2 replies; 21+ messages in thread
From: Aravind Srinivasan @ 2011-04-05  5:33 UTC (permalink / raw)
  To: grub-devel

      
Hi,

I am trying Grub2 EFI - this is on a custom platform. On 1.99-rc1, compared to 
Legacy grub, loading image, in particular initrd image from a USB takes a very 
long.  Our initrd image is about 160M and it is taking about 2 mins to load this 
image. Turning on "set debug=all" in the grub.cfg file, I see that all the time 
is being spent in reading the USB. Looking at the source, I think the issue is 
the value set for GRUB_DISK_CACHE_SIZE in include/grub/disk.h
Currently this is what it is set to:

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.

Thanks,
-Aravind
Insert mode


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2011-06-23 16:02 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-06 16:12 Grub2 EFI: Image loading from USB takes too long Aravind Srinivasan
2011-04-07  9:24 ` KESHAV P.R.
2011-04-08 16:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-15  2:45   ` Bean
2011-04-15  6:55     ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-15  8:18       ` Seth Goldberg
2011-04-15 19:54         ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-06-23 16:02           ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-25  4:14       ` Bean
2011-04-25 10:58         ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-26  3:03           ` Bean
2011-04-26 10:36             ` Vladimir 'φ-coder/phcoder' Serbinenko
  -- strict thread matches above, loose matches on Subject: below --
2011-04-15 16:07 Finnbarr P. Murphy
2011-04-05  5:33 Aravind Srinivasan
2011-04-05  6:32 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-05  7:36   ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-05 16:36     ` Aravind Srinivasan
2011-04-05  6:32 ` Seth Goldberg
2011-04-05  7:17   ` KESHAV P.R.
2011-04-05  7:43     ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-04-05  8:06       ` KESHAV P.R.

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.