Re: [PATCH] x86/boot: Support uncompressed kernel
From: Chao Peng
Date: Fri Mar 24 2017 - 01:36:00 EST
> > > The patch adds a 'CONFIG_KERNEL_RAW' configure choice so the built
> > > binary
> > > can have no uncompressing at all. The experiment shows:
> > >
> > > ÂÂÂÂkernelÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂkernel sizeÂÂÂÂtime in decompress_kernel
> > > ÂÂÂÂcompressed (gzip)ÂÂÂÂ3.3MÂÂÂÂÂÂÂÂÂÂÂ53ms
> > > ÂÂÂÂuncompressedÂÂÂÂÂÂÂÂÂ14MÂÂÂÂÂÂÂÂÂÂÂÂ3ms
> >
> > How about the time difference for bootloader to read kernel from
> > flash/disk/network to ram?
The loading time for bootloader can be longer as size increased, but
that depends on which media it uses. For our usecase, it's not a big
problem. As we run the kernel in virtual machine and lunch thousands of
instances in the same physical machine so only the first instance needs
to read from the file and later we just copy the memory. The thing that
really matters for us is how fast we can boot for majority of the
instances.
>
> there are also faster de-compressors than gzip out there. LZ4, for
> instance.
> LZ4, as far as I remember, can be quite fast, like ~10 times faster
> than gzip.
> have you tested it?
Exactly, LZ4 is the fastest. It takes 16ms to complete the
decompression. Still sounds a little longer when compared to
uncompressed kernel.
Chao