TechBuzzPro

Proxmox VM Sizing for AI Agents: CPU, RAM, Storage Guide

· 5 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Properly sizing Proxmox VMs for AI agents ensures stable performance, prevents resource bottlenecks, and maximizes hardware efficiency. AI agents—such as local LLMs, inference servers, or autonomous task runners—demand careful allocation of CPU, RAM, and storage based on workload complexity, model size, and concurrency needs. Before beginning, ensure you have a running Proxmox VE host with adequate physical resources and a clear understanding of the AI agent’s requirements, such as model size (e.g., 7B, 13B parameters) and expected usage patterns.

What You'll Need

  • Proxmox VE 7.0 or later installed and running
  • Access to the Proxmox web interface (root or user with VM permissions)
  • Knowledge of the AI agent’s resource profile (model size, inference speed, batch processing needs)
  • Sufficient physical CPU cores, RAM, and fast storage (NVMe recommended)
  • ISO or template for the guest OS (e.g., Ubuntu Server)

Step-by-Step

  1. Assess the AI agent’s workload: Determine whether it runs lightweight inference (e.g., small language models), batch processing, or real-time decision-making. Light agents (e.g., 1B–3B parameter models) may need 2–4 CPU cores and 8–16 GB RAM, while larger models (e.g., 13B–30B) can require 8–16 cores and 32–64 GB RAM or more.
  2. Estimate concurrent users or tasks: Each concurrent request increases memory and CPU load. For example, hosting a 7B model with 5 simultaneous users may need at least 12 GB RAM and 4 CPU cores. Use vendor or community benchmarks (e.g., from Hugging Face or Ollama) for reference.
  3. Allocate CPU resources: In Proxmox, assign vCPUs based on physical core availability. Avoid overcommitting CPU; a general rule is to assign no more than 1.5–2 vCPUs per physical core. For a 16-core host, reserve 4 cores for the host OS and allocate up to 24 vCPUs across all VMs. For a heavy AI VM, assign 6–8 dedicated vCPUs with type 'host' for best performance.
  4. Assign RAM: Allocate RAM conservatively. For a 7B model using GGUF quantization, expect 6–8 GB minimum. Add 2–4 GB overhead for the OS and inference engine. Set the VM with at least 12 GB RAM. For 13B models, start at 24–32 GB. Enable memory ballooning only if you have dynamic workloads, but avoid it for AI VMs due to performance sensitivity.
  5. Configure storage: Use fast storage (NVMe SSD) for the VM disk. Allocate at least 50 GB for the OS and applications. Store model files on a separate high-speed disk or ZFS dataset if possible. Use VirtIO SCSI with discard enabled for better I/O performance. If models are large (e.g., 20+ GB each), ensure the storage has ample free space—recommend 100 GB+ per AI VM.
  6. Create the VM: In the Proxmox web UI, click 'Create VM'. Set the VM ID, name, and OS. Choose 'Linux' and version (e.g., Ubuntu 22.04). On the 'System' tab, set BIOS to OVMF (UEFI) for better compatibility. Assign the CPU type as 'host' and enable 'NUMA' if your host has multiple CPU sockets.
  7. Attach storage: Select the target storage (e.g., local-lvm or an NVMe-backed ZFS pool). Set disk size (e.g., 60 GB), bus type to 'VirtIO SCSI', and enable 'Discard' for TRIM support. This improves long-term SSD performance.
  8. Configure network: Use a bridged network (vmbr0) with VirtIO driver for best throughput. Assign a static IP or reserve one via DHCP for consistent access to the AI service.
  9. Install the OS and AI software: Boot the VM from an ISO, install the OS, then install dependencies (Python, CUDA if GPU is passed through, inference frameworks like llama.cpp or vLLM). Store models on a dedicated mount if using separate storage.
  10. Monitor and adjust: After deployment, use tools like htop, nmon, or Proxmox’s built-in resource graphs to monitor CPU, RAM, and disk usage. If the VM consistently uses over 90% RAM or CPU, increase allocation. If underutilized, reduce to free resources.

Common Mistakes

  • Overcommitting CPU without considering host overhead, leading to lag and timeouts
  • Allocating insufficient RAM, causing swapping and severe performance drops
  • Using slow storage (HDD or SATA SSD) for model files, resulting in long load and inference times
  • Enabling memory ballooning on AI VMs, which can cause unpredictable memory reclamation
  • Ignoring NUMA topology on multi-socket hosts, reducing memory access speed

Tips

  • Use ZFS with compression (lz4) to save space on model storage without significant CPU cost
  • Pin CPU cores using taskset or cgroups for latency-sensitive AI agents
  • Separate model storage from the OS disk to simplify backups and upgrades
  • Use Proxmox templates to quickly clone and deploy standardized AI VMs
  • Regularly update Proxmox and guest OS for security and performance improvements

Troubleshooting

If the AI agent runs slowly or crashes, first check Proxmox resource graphs for CPU or RAM saturation. If RAM is maxed, increase the VM’s memory allocation and ensure the host has enough free RAM. If CPU usage is high, consider reducing concurrent requests or upgrading the host. For storage bottlenecks, verify disk I/O with iostat or fio; migrate the VM disk to faster storage if needed. If the VM fails to boot, ensure firmware is set to OVMF for UEFI and the ISO is properly attached. If network access is lost, confirm the bridge (vmbr0) is active and the VM’s network driver is VirtIO. Always shut down the VM before making hardware changes in Proxmox.

Frequently Asked Questions

Can I run multiple AI agents on one Proxmox host?

Yes, if the host has sufficient CPU, RAM, and fast storage. Distribute resources carefully and monitor total usage to avoid overcommitment.

Do I need a GPU for AI agent VMs?

Not always. CPU-only inference works for smaller models. For larger models or faster response, GPU passthrough (e.g., NVIDIA with VFIO) is recommended.

How much storage does a 13B model need?

A quantized 13B model (e.g., GGUF Q4_K_M) needs about 7–8 GB. Allocate at least 15–20 GB including OS and overhead.

Is swap memory recommended for AI VMs?

No. Swapping severely degrades AI inference performance. Ensure the VM has enough RAM to avoid swap usage.

Can I resize a VM after creation?

Yes. You can increase CPU, RAM, and disk size in Proxmox, but always shut down the VM first for disk changes and extend the filesystem afterward.

Should I use containers instead of VMs for AI agents?

VMs offer better isolation and hardware control. Containers (LXC) are lighter but may lack full GPU or kernel support needed for AI workloads.