From 16db9b04267339b9c01d6194e93169dbdda26b4d Mon Sep 17 00:00:00 2001 From: reachableceo Date: Thu, 6 Aug 2026 15:26:58 -0500 Subject: [PATCH] feat(k8s,proxmox): add etcd tuning for spinning-disk storage + VM disk audit script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit k8s/install-cp.sh: add --etcd-arg heartbeat-interval=1000 and election-timeout=5000 to both bootstrap and join commands. Gives etcd 5x margin to absorb transient fsync stalls on spinning-disk-backed NFS storage (default 500ms/1500ms too tight for this environment). proxmox/perf/scripts/audit-vm-disks.sh: new script to audit disk cache configuration on all VMs across Proxmox hosts. Identifies VMs that would benefit from cache=writeback (especially etcd/database workloads on NFS-backed spinning disk). [#392] [#393] 💘 Generated with Crush Assisted-by: Crush:glm-5.2 --- k8s/install-cp.sh | 8 ++++++-- proxmox/perf/scripts/audit-vm-disks.sh | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100755 proxmox/perf/scripts/audit-vm-disks.sh diff --git a/k8s/install-cp.sh b/k8s/install-cp.sh index bf0d96a..4dfaaa0 100644 --- a/k8s/install-cp.sh +++ b/k8s/install-cp.sh @@ -48,7 +48,9 @@ curl -sfL https://get.k3s.io | sh -s - server \ $tls_san_flags \ --flannel-backend=vxlan \ --etcd-snapshot-schedule-cron='0 */6 * * *' \ - --egress-selector-mode=agent + --egress-selector-mode=agent \ + --etcd-arg heartbeat-interval=1000 \ + --etcd-arg election-timeout=5000 REMOTE_BOOT echo " cnode1 install submitted." @@ -117,7 +119,9 @@ curl -sfL https://get.k3s.io | sh -s - server \ --advertise-address=$node_ip \ $tls_san_flags \ --flannel-backend=vxlan \ - --egress-selector-mode=agent + --egress-selector-mode=agent \ + --etcd-arg heartbeat-interval=1000 \ + --etcd-arg election-timeout=5000 REMOTE_JOIN echo " $node_name install submitted." diff --git a/proxmox/perf/scripts/audit-vm-disks.sh b/proxmox/perf/scripts/audit-vm-disks.sh new file mode 100755 index 0000000..e1b0f9f --- /dev/null +++ b/proxmox/perf/scripts/audit-vm-disks.sh @@ -0,0 +1,14 @@ +#!/usr/bin/bash +# Audit all VM disk configs on a Proxmox host +set -uo pipefail +HOST="$1" +PROX_HOST="$HOST" bash tests/remote.sh prox ' + qm list 2>/dev/null | tail -n +2 | while read -r line; do + vmid=$(echo "$line" | awk "{print \$1}") + name=$(echo "$line" | awk "{print \$2}") + status=$(echo "$line" | awk "{print \$3}") + echo "VMID=$vmid NAME=$name STATUS=$status" + qm config "$vmid" 2>/dev/null | grep -E "^(scsi|virtio|ide)[0-9]+:" | sed "s/^/ /" + echo "" + done +'