GPU-VMs 8 vCPU / 20 GB, infra 4 GB, ZFS-ARC 2 GB (Rolle pve-host), kein Auto-Reboot durch tofu
ci / test (push) Successful in 29s
ci / test (push) Successful in 29s
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
4cd3fb87ed
commit
2a8badd610
@@ -67,6 +67,27 @@
|
||||
mode: "0644"
|
||||
notify: update initramfs
|
||||
|
||||
# ZFS-ARC begrenzen: Standard wären 10 % des RAM (3,2 GB), bei Pool-Anlage 4 GB gesetzt. Die GPU-VMs liegen auf
|
||||
# local-lvm, tank trägt nur Replikate und die kleinen Infra-Gäste – 2 GB reichen, der Rest geht an die VMs.
|
||||
- name: ZFS-ARC-Obergrenze (modprobe, gilt nach initramfs beim nächsten Start)
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/modprobe.d/zfs.conf
|
||||
content: "options zfs zfs_arc_max={{ knaster_pve.cluster.zfs_arc_max_mb * 1024 * 1024 }}
|
||||
"
|
||||
mode: "0644"
|
||||
when: knaster_pve.cluster.zfs_arc_max_mb is defined
|
||||
notify: update initramfs
|
||||
|
||||
- name: ZFS-ARC-Obergrenze sofort setzen
|
||||
ansible.builtin.shell: >
|
||||
[ -w /sys/module/zfs/parameters/zfs_arc_max ] || exit 0;
|
||||
v={{ knaster_pve.cluster.zfs_arc_max_mb * 1024 * 1024 }};
|
||||
[ "$(cat /sys/module/zfs/parameters/zfs_arc_max)" = "$v" ] && exit 0;
|
||||
echo "$v" > /sys/module/zfs/parameters/zfs_arc_max && echo gesetzt
|
||||
register: arc
|
||||
changed_when: "'gesetzt' in arc.stdout"
|
||||
when: knaster_pve.cluster.zfs_arc_max_mb is defined
|
||||
|
||||
- name: Speicher local darf Snippets enthalten (clusterweite Einstellung, einmal)
|
||||
ansible.builtin.shell: |
|
||||
set -euo pipefail
|
||||
|
||||
@@ -38,6 +38,10 @@ resource "proxmox_virtual_environment_vm" "gpu" {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
# Änderungen an CPU/RAM nicht automatisch neu starten (sonst alle GPU-VMs gleichzeitig):
|
||||
# Neustart einzeln per `qm reboot <vmid>` auf dem Knoten, siehe docs/BETRIEB.md Abschnitt 6.
|
||||
reboot_after_update = false
|
||||
|
||||
cpu {
|
||||
cores = each.value.cores
|
||||
type = "host"
|
||||
|
||||
@@ -11,6 +11,7 @@ cluster:
|
||||
lxc_template: debian-13-standard_13.6-1_amd64.tar.zst
|
||||
# Ubuntu-24.04-Cloud-Image-Template je Knoten (VMIDs sind clusterweit eindeutig)
|
||||
templates: {pve44: 9044, pve46: 9046, pve48: 9048, pve52: 9052}
|
||||
zfs_arc_max_mb: 2048 # ZFS-Lesecache der GPU-Knoten (tank trägt nur Replikate und kleine Gäste); Rolle pve-host
|
||||
|
||||
pci_mappings: # Proxmox Resource Mappings (Datacenter → Resource Mappings → PCI)
|
||||
gpu-m4000-pve44: {node: pve44, path: "0000:01:00", id: "10de:13f1", subsystem_id: "10de:1153", iommu_group: 1}
|
||||
@@ -21,14 +22,17 @@ pci_mappings: # Proxmox Resource Mappings (Datacenter → Resour
|
||||
gpu-p2000-pve48: {node: pve48, path: "0000:02:00", id: "10de:1c30", subsystem_id: "10de:11b3", iommu_group: 8}
|
||||
gpu-m4000-pve52: {node: pve52, path: "0000:01:00", id: "10de:13f1", subsystem_id: "10de:1153", iommu_group: 1}
|
||||
|
||||
# Zuteilung je GPU-VM (15.10.): alle 8 Threads des Knotens und 20 von 32 GB. Der Rest des Knotens: Proxmox
|
||||
# selbst ~3 GB, ZFS-ARC 2 GB (cluster.zfs_arc_max_mb), dazu ops (2 GB, pve46), infra (4 GB, pve44), k3s (3 GB, pve48).
|
||||
# RAM der GPU-VMs ist durch PCI-Passthrough fest reserviert (kein Ballooning), CPU darf überbucht sein.
|
||||
vms: # eine GPU-VM pro Knoten mit allen Karten des Knotens (D2)
|
||||
gpu-pve44: {node: pve44, vmid: 244, cores: 4, memory_mb: 12288, disk_gb: 40, models_disk_gb: 60, storage: local-lvm, gpus: [gpu-m4000-pve44, gpu-p2000-pve44], ip: dhcp, driver_generation: legacy}
|
||||
gpu-pve46: {node: pve46, vmid: 246, cores: 4, memory_mb: 12288, disk_gb: 40, models_disk_gb: 60, storage: local-lvm, gpus: [gpu-m4000-pve46, gpu-p2000-pve46], ip: dhcp, driver_generation: legacy}
|
||||
gpu-pve48: {node: pve48, vmid: 248, cores: 4, memory_mb: 12288, disk_gb: 40, models_disk_gb: 60, storage: local-lvm, gpus: [gpu-m4000-pve48, gpu-p2000-pve48], ip: dhcp, driver_generation: legacy}
|
||||
gpu-pve52: {node: pve52, vmid: 252, cores: 4, memory_mb: 12288, disk_gb: 40, models_disk_gb: 60, storage: local-lvm, gpus: [gpu-m4000-pve52], ip: dhcp, driver_generation: legacy}
|
||||
gpu-pve44: {node: pve44, vmid: 244, cores: 8, memory_mb: 20480, disk_gb: 40, models_disk_gb: 60, storage: local-lvm, gpus: [gpu-m4000-pve44, gpu-p2000-pve44], ip: dhcp, driver_generation: legacy}
|
||||
gpu-pve46: {node: pve46, vmid: 246, cores: 8, memory_mb: 20480, disk_gb: 40, models_disk_gb: 60, storage: local-lvm, gpus: [gpu-m4000-pve46, gpu-p2000-pve46], ip: dhcp, driver_generation: legacy}
|
||||
gpu-pve48: {node: pve48, vmid: 248, cores: 8, memory_mb: 20480, disk_gb: 40, models_disk_gb: 60, storage: local-lvm, gpus: [gpu-m4000-pve48, gpu-p2000-pve48], ip: dhcp, driver_generation: legacy}
|
||||
gpu-pve52: {node: pve52, vmid: 252, cores: 8, memory_mb: 20480, disk_gb: 40, models_disk_gb: 60, storage: local-lvm, gpus: [gpu-m4000-pve52], ip: dhcp, driver_generation: legacy}
|
||||
|
||||
containers: # Infrastruktur als LXC (ADR-0001), HA + ZFS-Replikation (ADR-0002)
|
||||
infra: {node: pve44, vmid: 101, cores: 4, memory_mb: 8192, disk_gb: 60, storage: tank, ip: 192.168.100.188/24, ha: true, replicate_to: [pve52, pve48]}
|
||||
infra: {node: pve44, vmid: 101, cores: 4, memory_mb: 4096, disk_gb: 60, storage: tank, ip: 192.168.100.188/24, ha: true, replicate_to: [pve52, pve48]}
|
||||
|
||||
# Dienst-VMs ohne GPU (D6): k3s-Steuerung, geklont vom Template des Knotens, auf tank mit HA.
|
||||
# Adresse per DHCP wie die GPU-VMs (D5); die Agents finden den Server über /etc/hosts (Rolle k3s-agent).
|
||||
|
||||
Reference in New Issue
Block a user