[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Grub2 EFI: Image loading from USB takes too long
From: |
KESHAV P.R. |
Subject: |
Re: Grub2 EFI: Image loading from USB takes too long |
Date: |
Tue, 5 Apr 2011 12:47:30 +0530 |
On Tue, Apr 5, 2011 at 12:02, Seth Goldberg <address@hidden> wrote:
> It's not just USB. Loading large files via UEFI with GRUB2 takes an
> extremely long time. One of the things phcoder suggested was changing the
> cache size, which you've done. Od love to see a larger cache committed to
> the trunk so UEFI platforms can benefit when large files need to be read by
> GRUB2 (assuming no other side effects)!
>
> --S
>
> On Apr 4, 2011, at 10:33 PM, Aravind Srinivasan <address@hidden> wrote:
>
>>
>> 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
>>
>> _______________________________________________
>> Grub-devel mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/grub-devel
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
I can confirm that grub2 x86_64-efi is very slow in loading initramfs
files. I did my testing in VirtualBox 4.0.4 (VBox patched OVMF, quite
old compared to updated OVMF) using an iso mounted in a virtual SATA
AHCI CD drive and 1 GiB RAM alloted to the virtual machine. Intel VT
extension was enabled. In a crude benchmarking using s top watch, the
time between selection of menuentry to seeing the kernel boot messages
is approx 4 minutes (236 seconds) measured using a stop watch. I have
not yet tested with an updated ovmf in qemu or in duet. I guess
accessing from HDDs is faster in UEFI systems. Its the CDs and USB
which seem to take a lot of time.
The kernel loaded by grub2 during the test and the initramfs can be
downloaded from
ftp://ftp.archlinux.org/iso/archboot/2011.02/boot/vm64 - kernel (lzma
compressed)
ftp://ftp.archlinux.org/iso/archboot/2011.02/boot/initrd64.img -
initramfs (lzma -9 compressed cpio archive).
Regards.
Keshav