From 10f9782aa6bbe79d3f4969afdf060b616dc5ae9b Mon Sep 17 00:00:00 2001 From: AprilNEA Date: Wed, 22 Jul 2026 19:26:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?perf(config):=20HZ=20100=E2=86=921000=20to?= =?UTF-8?q?=20cut=20container-start=20latency=20(ABX-496)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Container start is a chain of jiffy-rounded scheduler waits across the containerd/shim/runc/dockerd IPC handshake; at HZ=100 each rounds up to 10 ms. Cross-engine bench (ABX-496) measured container churn ~5x slower than a matched Colima guest (HZ=1000), which dominates multi-step docker builds (each step is a container): simple cold 8.1s vs 0.6s, 12-stage 12.7s vs 1.5s. NO_HZ_IDLE keeps the tick off when idle, so the idle-CPU target is unaffected — the cost is purely more timer interrupts under active load, the right trade for a build/dev runtime chasing OrbStack parity. --- configs/arcbox-arm64.config | 12 ++++++++++-- configs/arcbox-x86_64.config | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/configs/arcbox-arm64.config b/configs/arcbox-arm64.config index 1878404..4d4fcc7 100644 --- a/configs/arcbox-arm64.config +++ b/configs/arcbox-arm64.config @@ -73,8 +73,16 @@ CONFIG_NR_CPUS=256 # first byte). Also forward-compatible — 7.0 removes voluntary for # lazy-capable arches, and arm64/x86 both select ARCH_HAS_PREEMPT_LAZY. CONFIG_PREEMPT_LAZY=y -CONFIG_HZ_100=y -CONFIG_HZ=100 +# HZ=1000 (1 ms tick) not 100 (10 ms): container start is a chain of +# jiffy-rounded scheduler waits (containerd poll, shim handshake +# completions, runc, dockerd↔containerd gRPC backoff). At HZ=100 each +# rounds up to 10 ms, making container churn ~5x slower than Colima's +# HZ=1000 guest — the dominant cost in multi-step `docker build` (each +# step is a container). NO_HZ_IDLE keeps the idle-CPU target intact +# (tickless when idle), so this is latency-only cost under active load. +# See ABX-496. +CONFIG_HZ_1000=y +CONFIG_HZ=1000 # Virtualization guest support CONFIG_PARAVIRT=y diff --git a/configs/arcbox-x86_64.config b/configs/arcbox-x86_64.config index 929d3a7..bbeac15 100644 --- a/configs/arcbox-x86_64.config +++ b/configs/arcbox-x86_64.config @@ -72,8 +72,16 @@ CONFIG_NR_CPUS=256 # first byte). Also forward-compatible — 7.0 removes voluntary for # lazy-capable arches, and arm64/x86 both select ARCH_HAS_PREEMPT_LAZY. CONFIG_PREEMPT_LAZY=y -CONFIG_HZ_100=y -CONFIG_HZ=100 +# HZ=1000 (1 ms tick) not 100 (10 ms): container start is a chain of +# jiffy-rounded scheduler waits (containerd poll, shim handshake +# completions, runc, dockerd↔containerd gRPC backoff). At HZ=100 each +# rounds up to 10 ms, making container churn ~5x slower than Colima's +# HZ=1000 guest — the dominant cost in multi-step `docker build` (each +# step is a container). NO_HZ_IDLE keeps the idle-CPU target intact +# (tickless when idle), so this is latency-only cost under active load. +# See ABX-496. +CONFIG_HZ_1000=y +CONFIG_HZ=1000 # Virtualization guest support CONFIG_HYPERVISOR_GUEST=y From 48ff8c7c5b533823a1b1b4a39f6c09acb24107b6 Mon Sep 17 00:00:00 2001 From: AprilNEA Date: Wed, 22 Jul 2026 19:37:20 +0800 Subject: [PATCH 2/2] build: assert CONFIG_HZ_1000 survives olddefconfig The HZ bump is a choice symbol; olddefconfig silently drops or rewrites unsatisfiable choices, so guard it the same way the script already guards the squashfs/netfilter symbols. --- scripts/build-kernel.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build-kernel.sh b/scripts/build-kernel.sh index 1ba6bf4..a466cc9 100755 --- a/scripts/build-kernel.sh +++ b/scripts/build-kernel.sh @@ -73,7 +73,7 @@ do_build() { # dependency gate in the fragment otherwise degrades silently — 6.18 did # exactly that to the legacy iptables stack via NETFILTER_XTABLES_LEGACY). for sym in CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU CONFIG_IP_NF_NAT \ - CONFIG_IP6_NF_NAT; do + CONFIG_IP6_NF_NAT CONFIG_HZ_1000; do grep -q "^$sym=y" .config || { echo "ERROR: $sym missing after olddefconfig" >&2 exit 1 @@ -132,7 +132,7 @@ cd linux-$KERNEL_VERSION sh /workspace/scripts/inject-drivers.sh /workspace cp /workspace/configs/arcbox-$TARGET_ARCH.config .config make ARCH=$TARGET_ARCH olddefconfig -for sym in CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU CONFIG_IP_NF_NAT CONFIG_IP6_NF_NAT; do +for sym in CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU CONFIG_IP_NF_NAT CONFIG_IP6_NF_NAT CONFIG_HZ_1000; do grep -q \"^\$sym=y\" .config || { echo \"ERROR: \$sym missing after olddefconfig\" >&2 exit 1