Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1CxAzm-0006ff-E2 for mharc-grub-devel@gnu.org; Fri, 04 Feb 2005 16:28:06 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CxAzk-0006fN-8E for grub-devel@gnu.org; Fri, 04 Feb 2005 16:28:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CxAzj-0006ey-Aa for grub-devel@gnu.org; Fri, 04 Feb 2005 16:28:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxAzj-0006ev-5d for grub-devel@gnu.org; Fri, 04 Feb 2005 16:28:03 -0500 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CxAlo-0000fR-Dz for grub-devel@gnu.org; Fri, 04 Feb 2005 16:13:40 -0500 Received: from vscan-cn.han.nl (venus.han.nl [145.74.65.6]) by mail-cn.han.nl (Postfix) with ESMTP id F3F338696 for ; Fri, 4 Feb 2005 22:11:46 +0100 (CET) Received: from mail-cn.han.nl ([145.74.66.11]) by vscan-cn.han.nl (venus.han.nl [145.74.65.6]) (amavisd-new, port 10024) with ESMTP id 28951-01 for ; Fri, 4 Feb 2005 22:11:46 +0100 (CET) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id 029738236 for ; Fri, 4 Feb 2005 22:11:46 +0100 (CET) Received: from marco.marco-g.com (mgerards.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id BECA2C047 for ; Fri, 4 Feb 2005 22:11:45 +0100 (CET) Mail-Copies-To: metgerards@student.han.nl To: grub-devel@gnu.org From: Marco Gerards Date: Fri, 04 Feb 2005 21:11:48 +0000 Message-ID: <87k6po3u97.fsf@marco.marco-g.com> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new (2.2.0) at vscan-cn.han.nl Subject: Slow disk access X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Feb 2005 21:28:04 -0000 Hi, The disk access on GRUB 2 is terribly slow. At first I thought it was only a problem on the PPC, but it is also showing up in grub-emu and I guess on the PC as well. You can notice the problem when reading in big files, like a big kernel. Reading in a 20MB files takes 17 seconds. In this e-mail I will propose some things that could make GRUB work smoother. Some ideas are just plain silly, but I want to address the issue at all levels. If someone has other suggestions, please tell me. This is an important and serious issue we have to deal with. It would also be very nice if someone could test if the problem occurs on the PC as well (when booting that is). The load time of 17 seconds can be easily be reduced to one or two seconds by increasing GRUB_DISK_CACHE_SIZE from 8 to 128. So that means the problem is that the writes are devices up in too many small reads, I guess. I don't think this is a good solution, but feel free to convince me otherwise. :) One thing that fshelp does is reading files on behalf of the filesystems. It checks per filesystem block to which disk block it belongs and reads it. What we could change is that the blocks will only be read when they get out of order. So instead of: 1, 2, 3, 6, 7, 10 It should read the blocks like: 1-3, 6-7, 10 This of course does not matter with such small ranges, but it could improve the performance when reading more than GRUB_DISK_CACHE_SIZE. Which brings me to the next problem: grub_disk_read does just read 8 blocks at a time, not what was requested. And of course that is not the last problem. Even if the filesystem and disk.c would work in a way multiple blocks would be read, the grub_file_read caller would have to read multiple blocks as well. So I really hope I am not understanding the problem at all and it is something else. Perhaps I can have a more detailed look at this tomorrow by studying GRUB 2 and GRUB Legacy, to see that does not have the same problems. I would appreciate if someone who could test big files by booting from a PC to see if the problem was there too. Patches to fix this properly would be better of course, but for that we need to know what to fix. :) Thanks, Marco