guix-patches
[Top][All Lists]
Advanced

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

[bug#60129] [PATCH 0/2] VM-optimized Linux-Libre variant


From: Marius Bakke
Subject: [bug#60129] [PATCH 0/2] VM-optimized Linux-Libre variant
Date: Fri, 16 Dec 2022 23:11:47 +0100

Hello Guix!

This patch adds a kernel optimized for running inside a VM.

It includes drivers for the popular hypervisors and not much else.
Building it takes ~9 minutes on my machine (7,5 if we disable
CONFIG_TRIM_UNUSED_KSYMS).

The config was created by taking the linux-libre config and removing
things that are generally useless in VMs: hardware drivers, firmware
loading, sleep/hibernate, etc.

The only drivers included are for various hypervisors, the ones required
by our initrd[*], as well as popular emulated hardware (e1000, rtl8169,
sound hardware supported by QEMU, etc).  It's possible some things need
to be re-added to support all the different VPS providers out there.

The kernel is tailored towards server workloads running on a VPS, but
should work fine as a default for "guix system vm", etc.

Some statistics:

  | benchmark               | linux-libre   | linux-libre-virtual |
  |-------------------------|---------------|---------------------|
  | guix size               | 101.4 MiB     | 36.2 MiB            |
  | cpu events/s            | 2707.92       | 2709.19             |
  | 200GiB random mem wr    | 1203.26 MiB/s | 1204.26 MiB/s       |
  | avg thread latency      | 0.89ms        | 0.86ms              |

These numbers were obtained by running two identical VMs mapped to the
same physical cores on an idle host (with static CPU frequency).

(the benchmarks in question were taken with 'sysbench', with the
best out of 3 runs.  Generally -virtual is marginally ahead.)

Thoughts?  Is this useful at all?  Any more interesting benchmarks?

[*] I considered making it module-less; i.e. everything built-in, but
most of our tooling expects an initrd, so maybe not worth the trouble.

Marius Bakke (2):
  activation: Firmware activation handles missing support in kernel.
  gnu: Add linux-libre-virtual.

 Makefile.am                                   |    1 +
 gnu/build/activation.scm                      |    9 +-
 .../linux-libre/6.0-x86_64-virtual.conf       | 5881 +++++++++++++++++
 gnu/packages/linux.scm                        |   11 +
 4 files changed, 5899 insertions(+), 3 deletions(-)
 create mode 100644 gnu/packages/aux-files/linux-libre/6.0-x86_64-virtual.conf

-- 
2.38.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]