[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#947759: Configuration optimizations for the cloud variant



On Tue, 31 Dec 2019 17:03:23 +0000 Ben Hutchings <ben@decadent.org.uk> wrote:
> On Mon, 2019-12-30 at 00:03 -0800, Josh Triplett wrote:
> > Source: linux
> > Severity: wishlist
> > 
> > A few requests for changes to the cloud configuration:
> 
> Most of this looks reasonable, but:
> 
> > - Please disable CONFIG_ACPI_BGRT; a cloud kernel doesn't need to spend
> >   time or code space looking for a boot logo that won't exist.
> > 
> > - Please disable the CONFIG_CPU_SUP_* options for CPUs that no cloud
> >   provider uses.
> > 
> > - Please disable CONFIG_GNSS_*, which won't be hooked up to a cloud
> >   server.
> > 
> > - Please disable CONFIG_GTP for the same reason.
> > 
> > - Please configure CONFIG_INPUT_MOUSEDEV as a module, not built-in, as
> >   most cloud servers won't have a mouse and probing for one takes time.
> > 
> > - Please consider changing the default kernel compression to GZIP, which
> >   decompresses faster and thus boots faster.
> 
> LZO or LZ4 could be even faster.

It might. GZIP seemed like a more reasonable tradeoff to request, but
I'd be all for LZ4 if that seems reasonable to you. That is indeed the
fastest option (see https://smackerelofopinion.blogspot.com/2019/09/ for
data to back that up).

It might even be worth switching to LZ4 on the standard Debian kernels
as well.

> > - Please change CONFIG_NET_MPLS_GSO from y to m (and consider doing this
> >   for the non-cloud kernel too); it doesn't need to be built into the
> >   kernel.
> 
> Unfortunately nothing will load it if it's a module.  It's also a tiny
> piece of code.  This might still be justifiable on the basis of
> reducing the default attack surface though.

I didn't realize it didn't autoload. But yes, it seems quite unlikely to
be needed.

> > - Please change CONFIG_NF_NAT_* and CONFIG_NF_MASQUERADE_* from y to m,
> >   as many systems won't need those modules and shouldn't need to load
> >   their code.
> 
> Some of those are boolean options, and I believe all of those that can
> be modular already are.  You'll have to be more specific.

I'd forgotten that several options became booleans and their code got
merged into parent modules that are already modularized; nevermind on
this one.

> > - Please compile in the NVME driver and the EXT4 filesystem; this will
> >   allow many cloud systems to avoid using an initramfs at all, which
> >   substantially improves boot time.
> > 
> > - Please disable CONFIG_NUMA_EMU, only used to create fake-NUMA systems
> >   for debugging.
> > 
> > - Please disable CONFIG_PCIPCWATCHDOG, CONFIG_PPS, and CONFIG_RMI4_*,
> >   which won't appear on a cloud server.
> 
> Hyper-V and KVM both support PTP clocks, and PTP_1588_CLOCK selects
> PPS.

Ah, I didn't realize Hyper-V provided a PTP device; that makes sense.

- Josh Triplett


Reply to: