Lewati ke konten

Managing Linux Kernels & Sched-ext framework with the CachyOS Kernel Manager

Konten ini belum tersedia dalam bahasa Anda.

Installing a Kernel from a Repository

The CachyOS Kernel Manager makes it simple to install and manage kernels from any Arch Linux repository.

To install a kernel. Launch the CachyOS Kernel Manager application and choose the desired kernel by ticking the box [] from the list of all the available options then just press on Execute to start the kernel installation.


Configuring and Building a custom CachyOS Kernel


The CachyOS Kernel Manager makes it easy to configure and build a custom CachyOS kernel.

To get started. Open the Kernel Manager and click on the Configure button to start adjusting various settings, such as the desired scheduler, tick rate and more. Once you have made your desired changes click on Build kernel button to begin building your custom CachyOS kernel.

Available configuration options:

  • Custom package name: With this option, you can name your kernel to whatever you want example: linux-custom-cachy
  • Scheduler (BORE, RC, RT, RT+BORE, EEVDF and BMQ)
  • Enable CachyOS config
  • Tweak Configuration via nconfig, menuconfig, xconfig, or gconfig
  • Enable/Disable NUMA
  • Enable/Disable Modprobed-db
  • KBUILD CFLAGS (-O3 or -O2)
  • Performance governor as default
  • Enable BBR3
  • Tick rate selection (100Hz, 250Hz, 300Hz, 500Hz, 600Hz, 750Hz, 1000Hz)
  • Tickless mode (idle, periodic, full)
  • Preemption (Full, Voluntary or Server)
  • Transparent Hugepages (Always or Madvise)
  • Enable/Disable DAMON
  • Enable/Disable Automatic CPU arch detection
  • Apply kernel optimization for specific CPU architectures
  • Enable LTO (Full, Thin, No)
  • Build ZFS Module
  • Build NVIDIA Closed Module
  • Build NVIDIA Open Module
  • Include vmlinux with debug information/symbols
  • Load/Save Kernel Manager config preset: (Only presets from the manager itself)
  • Kernel Patches Management (Remote and Local support)

Once the kernel has been successfully built, you will be prompted for your sudo password to install the kernel.

Sched-ext Framework Management

The Kernel Manager provides a graphical user interface (GUI) for managing and controlling sched-ext schedulers. Access the GUI by clicking on the sched-ext scheduler config button in the main window.


This GUI allows you to:

  • Switch between different sched-ext (scx) schedulers.
  • Enable or disable the scheduler service.
  • Check the currently running scheduler.
  • Set scheduler flags and profiles. Currently only bpfland and lavd support profiles.

In order to achieve this, the Kernel Manager uses the scx_loader with a configuration stored in:

/etc/scx_loader.toml. For more information about the scx_loader configuration file, check this documentation.

  • How does the scx_loader work?
    • Once you have selected the scheduler and profile, the scx_loader will then start the scheduler with the profile that has been selected and save this configuration to the /etc/scx_loader.toml file in order to achieve persistence across reboots. An example of what the file will look like choosing scx_bpfland with the Gaming profile:
      default_sched = "scx_bpfland"
      default_mode = "Gaming"
      [scheds.scx_bpfland]
      auto_mode = []
      gaming_mode = ["-m", "performance"]
      lowlatency_mode = ["-k", "-s", "5000", "-l", "5000"]
      powersave_mode = ["-m", "powersave"]

Scheduler Profiles

  • What are the “profiles” for?
    • They are presets for the scheduler that modify flags based on proven combinations to enhance effectiveness for specific use cases, such as “Gaming.”

Check the table for a more detailed look.

Bpfland

Profile NameCommand-line FlagsDescription
Low Latency-k -s 5000 -l 5000Meant to lower latency at the cost of throughput. Suitable for real-time applications like Audio Processing and Multimedia.
Gaming-k -m performanceOptimizes for high performance in games. Prioritizes P-cores over E-cores on Intel CPUs and CCDs on Ryzen X3D CPUs.
Power Save-m powersavePrioritizes power efficiency. Favors less performant cores (e.g E-cores on Intel).
Server-c 0Disables the interactive task classification in Bpfland making more capable for a server, an increase of approximadetely 2-3% in server workloads is expected

LAVD

Profile NameCommand-line FlagsDescription
Gaming & Low Latency--performanceMaximizes performance by using all available cores, prioritizing physical cores.
Power save--powersaveMinimizes power consumption while maintaining reasonable performance. Prioritizes efficient cores and threads over physical cores.