From 56839320ce667279e9b3e2f30c7cf3bbdf6b325a Mon Sep 17 00:00:00 2001 From: Arthur Petukhovsky Date: Wed, 29 Jan 2025 15:35:48 +0100 Subject: [PATCH] Update README.md --- neonvm-runner/cmd/main.go | 4 ++-- vm-examples/many-small-files/Dockerfile | 2 +- vm-examples/many-small-files/README.md | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/neonvm-runner/cmd/main.go b/neonvm-runner/cmd/main.go index 0b60e12da..8e63a1e81 100644 --- a/neonvm-runner/cmd/main.go +++ b/neonvm-runner/cmd/main.go @@ -400,8 +400,8 @@ func buildQEMUCmd( const ( baseKernelCmdline = "panic=-1 init=/neonvm/bin/init loglevel=7 root=/dev/vda rw" - kernelCmdlineDIMMSlots = "memhp_default_state=online_movable" - kernelCmdlineVirtioMemTmpl = "memhp_default_state=online memory_hotplug.online_policy=auto-movable memory_hotplug.auto_movable_ratio=%s" + kernelCmdlineDIMMSlots = "memhp_default_state=online_movable memory_hotplug.memmap_on_memory=on" + kernelCmdlineVirtioMemTmpl = "memhp_default_state=online memory_hotplug.online_policy=auto-movable memory_hotplug.auto_movable_ratio=%s memory_hotplug.memmap_on_memory=on" ) func makeKernelCmdline(cfg *Config, logger *zap.Logger, vmSpec *vmv1.VirtualMachineSpec, vmStatus *vmv1.VirtualMachineStatus, hostname string) string { diff --git a/vm-examples/many-small-files/Dockerfile b/vm-examples/many-small-files/Dockerfile index c50161d77..14048def1 100644 --- a/vm-examples/many-small-files/Dockerfile +++ b/vm-examples/many-small-files/Dockerfile @@ -13,7 +13,7 @@ RUN cargo build --release FROM neondatabase/compute-node-v16:latest USER root -RUN apt update && apt install --no-install-recommends -y smem htop lsof +RUN apt update && apt install --no-install-recommends -y smem htop lsof sysstat COPY --from=builder /usr/src/app/target/release/many-small-files /usr/local/bin/ COPY ./mem.py /root/mem.py diff --git a/vm-examples/many-small-files/README.md b/vm-examples/many-small-files/README.md index 6315ce72c..79310591b 100644 --- a/vm-examples/many-small-files/README.md +++ b/vm-examples/many-small-files/README.md @@ -20,6 +20,14 @@ docker build -t many-small-files . && \ ## Cheatsheet +Build a kernel: +``` +make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- -j `nproc` +cp ./arch/x86/boot/bzImage ../../autoscaling/neonvm-kernel/vmlinuz + +make docker-build-runner && make deploy +``` + To start a VM: ``` kubectl apply -f ./spec.yml