From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1K8o74-0005JA-JF for mharc-grub-devel@gnu.org; Tue, 17 Jun 2008 23:13:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K8o71-0005J1-Ra for grub-devel@gnu.org; Tue, 17 Jun 2008 23:13:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K8o6z-0005Ip-Bi for grub-devel@gnu.org; Tue, 17 Jun 2008 23:13:30 -0400 Received: from [199.232.76.173] (port=40180 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K8o6z-0005Im-60 for grub-devel@gnu.org; Tue, 17 Jun 2008 23:13:29 -0400 Received: from ik-out-1112.google.com ([66.249.90.183]:30748) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K8o6y-0007bg-Qj for grub-devel@gnu.org; Tue, 17 Jun 2008 23:13:29 -0400 Received: by ik-out-1112.google.com with SMTP id c21so43254ika.2 for ; Tue, 17 Jun 2008 20:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer; bh=/1mC8bYRUZNpmd5bbGxc6doawLayOJxa/8q9BEdhnwM=; b=lxv/IsueAkusTburPwfzC2zazyqtt5nDtWtWySlfSWClKAkzIE9FjZNgvXN6fCX0Am Pgmi3HV6CY2Z3zktXAhaEyIYQe1+gRgZgHTkXmJRdyAT/CPIgB+8V6qMqQbEuDBdkXK9 kHTvxhP75phRvOmOalGkk4Vc7bDOY5kGGB18E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer; b=Zj7tvMEM7PWRG9gVe1hN31z8Pep9EQVtLHb/q3xHijf0jXsEZ0vb5tBq1BS8adGM90 a4VT7PhTv1NuiBD+7g8NETS77OY0Z7SJcd0wKXRVETX6Z4wmrE6GJUf+F28KN0vr5X6A BvxBKlPMTb5BNKRePqxj4xyJihHLXi6yMhETs= Received: by 10.210.61.8 with SMTP id j8mr12587eba.125.1213758807862; Tue, 17 Jun 2008 20:13:27 -0700 (PDT) Received: from ?192.168.1.101? ( [213.37.137.93]) by mx.google.com with ESMTPS id c22sm12250201ika.1.2008.06.17.20.13.25 (version=SSLv3 cipher=RC4-MD5); Tue, 17 Jun 2008 20:13:26 -0700 (PDT) From: Javier =?ISO-8859-1?Q?Mart=EDn?= To: The development of GRUB 2 In-Reply-To: References: <20080615174819.GA3506@thorin> <1213618146.6330.6.camel@localhost> <20080616213116.GC6108@thorin> <1213670869.6330.12.camel@localhost> <1213713543.6330.24.camel@localhost> <1213723385.6330.35.camel@localhost> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-4IB8vYGlf+W780qAUGg6" Date: Wed, 18 Jun 2008 05:14:07 +0200 Message-Id: <1213758847.6330.59.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: [RFC] split floppy support off biosdisk 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: Wed, 18 Jun 2008 03:13:32 -0000 --=-4IB8vYGlf+W780qAUGg6 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable El mi=C3=A9, 18-06-2008 a las 01:35 +0800, Bean escribi=C3=B3: > On Wed, Jun 18, 2008 at 1:23 AM, Javier Mart=C3=ADn > wrote: > > I'm currently checking the memory requisites of LZMA decompression > > depending on the -1..9 compression setting, and will report back when > > finished >=20 > Hi, >=20 > Well, actually current lzo decompresser uses similar method, > decompress the data directly to 0x100000. The compressed kernel is > only used in i386-pc platform, and space at 0x100000 should be > available, as Linux kernel will be loaded at this address as well. >=20 > About lzma setting, although I can't be sure, but the default seems to > gain the best result. >=20 jmp 1f Here are the results of my "investigation": in large files (the kernel tarball) LZMA is the absolute king, with some 3% gains over bzip2 at the same -n compression level and more than 7% over gzip. However, memory used by lzma for decompression increases with each -n compression level from 2MB while reading a "-1" .lzma file to 34MB reading a "-9" file. Memory usage for bzip2 also fluctuates, though less dramatically: from 1MB in -1 to 4 in -9. Mem usage of gzip is constant at 500KB. 1: That was the theory: now for the actual use in _small_ files like core.img. I found that bzip2 is a no-go, since it gives worse results than gzip in this kind of files and is also more complex. LZMA shows better results than gzip, but is the additional complexity worth the savings? One would have to code both decompressors and check, but I think the best option is switch to gzip, mainly because LZO compression does _not_ save nearly anything! ORIGINAL FILE: /boot/grub/core.img (28449 bytes in Ubuntu Hardy default) CLvl LZO-sav% GZIP-sav% LZMA-sav% 1 28215-0.82 26647-6.33 =EF=BB=BF26270-7.66 2 28211-0.84 =EF=BB=BF26643-6.35 =EF=BB=BF26270-7.66 3 *28211-0.84 =EF=BB=BF26644-6.35 =EF=BB=BF26185-7.96 4 28211-0.84 =EF=BB=BF26600-6.50 =EF=BB=BF26185-7.96 5 28211-0.84 =EF=BB=BF26601-6.50 =EF=BB=BF26185-7.96 6 28211-0.84 *=EF=BB=BF26596-6.52 =EF=BB=BF26185-7.96 7 28129-1.13 =EF=BB=BF26596-6.52 *=EF=BB=BF26185-7.96 8 28129-1.13 =EF=BB=BF26596-6.52 =EF=BB=BF26185-7.96 9 28129-1.13 =EF=BB=BF26596-6.52 =EF=BB=BF26185-7.96 * indicates the default compression level Apps used: lzop v.1.01, GNU gzip 1.3.12, LZMA 4.43 With these results, I believe that the first conclusion is immediate: we should dump LZO because even in its "best" compression level it saves just 320 bytes, or 1.13%. Of the alternatives, while LZMA provides a superior compression level, I think Gzip offers the best compromise between code complexity and space savings. Besides, it is already used in the Linux kernel for this very purpose, so we might even find that we "just" need to copy, paste and adjust a bit. --=-4IB8vYGlf+W780qAUGg6 Content-Type: application/pgp-signature; name=signature.asc Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQIVAwUASFh9f6Sl+Fbdeo72AQJ9mhAAlqWFhHGblTG6/9YjEyXp7q+34HRwx1im m9aJ7nu1x0i9i6eqF2Sx9fVJMpnYQvViqPdnOvhpfA8nmCWMrqkHI+/848zl9qOp hKjULez7x9RLKlO7VmdflOodBoU9C5zL50DKz3zhHM3WYcuDmD/t/Wi/t61nTMbG kM5y34y9WRPS1so6/NdsBvbl5D4WQ/YijB5I+YcSYEh8S4F4EecIUBC2WzflweiZ iKfsYNXkLmMk7Pk0aUMHSHYMyFkYc+XTP9HHGPMKhLEmKmx7qfxKRHd/v4xnscu9 pLU7cyFuZwZzqBO4n5Vu9aEKMQbNugoIadIG+ckP4uCYGqnqC9jwP2xiR7i24VJT aEVP6raDY8TQJ0Za+8sMtnnDuVeeIh/ahcGLlFLozBYWKoc/wuSCStufDQLRN/Em zVETk7XIvrw3lU1az1BtsU4pYz1//swU4BMJGp9genzqXeDpRq5omCwlXui+W0cZ 5ohzw1XqIV8LGsNKvfQRqJriNYPF8qvVu3/jz1rlqJwUTfJ4XU0I48xwAP/Bq788 Du7//8cemTW9dVgm32pCgKY9w5sc3r6/pUB+eKMAJJO1Q9W8LbUMYrUTcM5rUikf BrxoZE/buNMt/9bSB3fkzdn/AVhnTgTy5x+YqwaKmig8B3UHCh/2Y5r5+8FV9bt3 vZ91cwEFWxk= =VwT/ -----END PGP SIGNATURE----- --=-4IB8vYGlf+W780qAUGg6--