This repository contains a TUI utility for building the Linux Kernel with various optimizations from CachyOS tailored to your system's CPU architecture. It automates the configuration and creates distributable Debian packages with these modifications.
The utility provides the following:
- Build a Linux Kernel using patches from CachyOS.
- Advanced configuration options, including compilation optimizations.
- Create distributable Debian packages.
To use the utility, follow these steps:
- Clone the repository to your local machine.
- Make the utility executable with
chmod +x cachy-kernel-deb
and move the utility to a directory in the$PATH
. - Run the utility with
cachy-kernel-deb
and follow the on-screen prompts to configure the kernel and build the packages.
The utility includes advanced configuration options for users who want to fine-tune their kernel:
- Linux Kernel Configuration: Choose from different configuration patches for the Linux Kernel from CachyOS.
- CPU Scheduler: Choose between schedulers like BORE, BORE+Cachy Sauce and BMQ/PDS.
- Configure LLVM's Link Time Optimization (LTO): Select from Thin and Full LTO for better optimization.
- Configurable Tick Rate and Tick Types: You can configure the kernel tick rate and types according to your system's needs.
- Configurable NR_CPUS: Set the maximum number of CPUs/cores the kernel will support.
- Configurable Hugepages: Enable Hugepages support or not.
- Configurable LRU: Configure the Least Recently Used memory management mechanism.
- Configurable Preemption Type: Kernel preemption types generally control how the Linux kernel handles tasks and interrupts, affecting system responsiveness and latency.
- No Forced Preemption: This mode disables kernel preemption entirely, only allowing preemption at explicit preemption points.
- Voluntary Kernel Preemption: This mode allows the kernel to preempt tasks at specific, well-defined preemption points. It offers a balance between low latency and high throughput.
- Preemptible Kernel (Low-Latency Desktop): In this mode, the kernel can be preempted almost anywhere, allowing for very low latency and high responsiveness.
- Real-Time Preemption: This mode is designed for real-time applications where minimizing latency is critical.
- Configurable Kernel Name: Choose a name for your custom kernel.
- Additional Optimizations: Optimizations target aspects of system performance and can provide benefits depending on the workload and system configuration.
- Use GCC -O3 Optimizations: Aggressively optimizes compiled code for speed, possibly increasing binary size and compilation time.
- Enable Performance Governor: This setting sets the CPU to run at maximum frequency, boosting performance but increasing power consumption and heat.
- Enable VMA Optimizations: Enhances memory management efficiency, potentially improving application performance.
- Enable DAMON: Monitors data access patterns to optimize memory usage and improve performance.
- Enable NUMA: Optimizes memory allocation and access patterns on NUMA systems to reduce latency.
Contributions are welcome! If you have suggestions for improving the utility or adding new features, please open an issue or submit a pull request.
The repository and its contents are licensed under BSD-3-Clause.
If you find problems with the contents of this repository, please create an issue.
©2024 Laio O. Seman, Nitrux Latinoamericana S.C.