21 Feb 2012 08:11
Memory requirement for linux kernel compression/decompression
Since some time I am the happy user of xz to compress linux kernel (2.6.27 patched, 2.6.32 and now 3.0). All tests below were made with xz-5.0.3. Machine has 1 GB memory, x86 32 bits. On 2.6.32, only lzma option is available and by default, kernel use lzma -9 and this require much more memory than needed. As one compiler of my distrib reported a compilation breakage on a 512 MB VM during kernel compression, I started hacking scripts/Makefile.lib, removed -9 and added -vv. I then played with information displayed during compression to adjust xz memory requirement. Using the value from linux kernel (lzma -9), adding -vv show as result lzma: Filter chain: --lzma1=dict=64MiB,lc=3,lp=0,pb=2,mode=normal,nice=64,mf=bt4,depth=0 lzma: 674 MiB of memory is required. The limit is 17592186044416 MiB. lzma: Decompression will need 65 MiB of memory. (stdin): 1413.3 KiB / 3437.4 KiB = 0.411, 741 KiB/s, 0:04 Removing -9 show as result lzma: Filter chain: --lzma1=dict=8MiB,lc=3,lp=0,pb=2,mode=normal,nice=64,mf=bt4,depth=0 lzma: 94 MiB of memory is required. The limit is 17592186044416 MiB. lzma: Decompression will need 9 MiB of memory. (stdin): 1413.3 KiB / 3437.4 KiB = 0.411, 747 KiB/s, 0:04 So still same size result with less memory requirement.(Continue reading)
RSS Feed