The Dynaccel kernel is a Linux kernel that can speed up the long-term testing process through accelerated kernel's flow of time. The ratio to which the time is accelerated can be changed dynamically through the kernel interface - /proc
.
The idea originated from the repository.
A slides by the original authors (Toshiba) describing this work - PDF.
The kernel is based on the upstream CentOS8s kernel 4.18.0.
The Dynaccel kernel can be installed through a DNF update on a Centos8 Strean system:
- Create
dynaccel.repo
file in the/etc/yum.repos.d/
folder - Add the following content to the created file:
[dynaccel]
name=dynaccel
baseurl=http://portugal.cdot.systems/dynaccel
gpgcheck=0
enabled=1
After the RPM repository is set up locally, a simple dnf update --refresh
will install all the packages and update to the Dynaccel kernel.
kernel-sources
- a folder containing the Dynaccel kernel source code. README.mdconfig-x86_64
- a reference of kernel config for x86_64 used for compilation.dynaccel-patches.patch
- a patch file containing the changes for the Dynaccel functionality.kernel-4.18.0-394.el8.dynaccel.src.rpm
- a SRC.RPM file containing sources for the RPM package build.
The speedup_ratio
(acceleration) can be changed with sysctl
.
Example: sysctl --write kernel.accel=50
.
The current acceleration ratio can be accessed through cat /proc/sys/kernel/accel
.
Below is the steps required to build the Dynaccel RPM packages:
- Install RPM Developer tools -
sudo dnf -y install rpmdevtools
orsudo yum -y install rpmdevtools
. - Set up the RPM build tree -
rpmdev-setuptree
andcd rpmbuild
.
- Copy the
*src.rpm
to theSRPMS
folder and install it -rpm -i kernel*src.rpm
. - Build the RPM:
- With
rpmbuild -bb --target=x86_64 SPECS/kernel.spec
, if gcc-8 is present. - With
mock
utility -mock -r centos-stream-8-x86_64 *src.rpm
, if gcc-8 is not present.
- With
- Next steps would be to create and sign an RPM repository. Refer to the Wiki Page on how to do it.
Additionally, there is a good guide on the Fedora Wiki page on how to build a custom kernel RPM package.
- The
kernel.spec
specifies EPOCH 1 for Dynaccel to take precedence over the latest kernel present in DNF. - Inner VM's installed under the Dynaccel kernel inherit the flow of time (accelerated as well).
- However, an Inner VM's Watchdog that kernel should reset periodically does not function properly and goes off early. It causes kernel panics, making the system almost unusable.
- The issue can temporarily be fixed by disabling the Watchdog with
sysctl kernel.nmi_watchdog=0
- To disable for subsequent boots add
kernel.nmi_watchdog=0
line to /etc/sysctl.conf
- The issue can temporarily be fixed by disabling the Watchdog with
- However, an Inner VM's Watchdog that kernel should reset periodically does not function properly and goes off early. It causes kernel panics, making the system almost unusable.
- The acceleration ratio can be adjusted in the range of 1 to 1000, but the 'stable' range is from 1 to 200.
- The kernel and SRC.RPM should be compiled under
gcc-8
andg++-8
, otherwise compilation will fail. - The Dynaccel patches were only applied and tested on kernel version 4.18.0.
- It is not a hardware acceleration, so there isn't any performance boost, just accelerated time.