Capacity Planning and Hardware Design
local graph
Chapter 3: Capacity Planning And Hardware Design
Section titled “Chapter 3: Capacity Planning And Hardware Design”Capacity planning for Harvester is not a theoretical exercise, it is the difference between a platform that quietly supports your workloads and one that constantly pushes you into emergency meetings. Because Harvester is an HCI platform built on Kubernetes, mistakes have a habit of stacking up across layers. If you size the control plane too tightly, etcd will struggle. If you misjudge CPU and memory oversubscription, VMs will thrash during busy periods. If you use the wrong disks for Longhorn, IOPS will collapse under load. If you treat the network as an afterthought, VLANs and storage replication traffic will collide with user traffic in unpleasant ways.
This section gives you a practical framework for designing a Harvester cluster that can host both VM and container workloads with predictable behavior. You will see how node roles and minimal cluster sizes map to etcd quorum and availability guarantees, how to think about CPU, memory, and disk sizing for mixed workloads, how to select and arrange disks for Longhorn, and how to structure VLAN aware network topologies for labs and production environments. The goal is not abstract capacity formulas. The goal is to give you realistic patterns that match what Harvester and Longhorn are designed to do, informed by vendor guidance and field experience.
3.1: Node Roles, Management Nodes And Minimum Cluster Sizes
Section titled “3.1: Node Roles, Management Nodes And Minimum Cluster Sizes”Harvester is built on a Kubernetes control plane, and Kubernetes depends on etcd. That fact alone drives the minimum cluster size and the way node roles are assigned. Harvester documentation is very explicit that a three node cluster is required to fully realize multi node features. The first node joined to the cluster is a management node, and when the cluster has three or more nodes, the next two nodes are automatically promoted to management nodes to form a highly available control plane.
In practical terms, this means that by the time you have three nodes, you have three etcd members, three control plane instances, and scheduling capacity for workloads. In this configuration, the cluster can tolerate the loss of one management node while still keeping quorum. If you lose two management nodes, etcd can no longer reach a majority, and the control plane stops making progress. This is standard etcd behavior, not something specific to Harvester. Etcd documentation and guidance from vendors such as SUSE and Red Hat all converge on the same statement. A three node etcd cluster is the smallest configuration that provides high availability, and a five node cluster is common for larger environments.
Harvester introduces specific node roles on top of this control plane. A node can be a management node, a compute node, or a witness node. Management nodes run etcd, the Kubernetes control plane components, and Harvester controllers. Compute nodes focus on running workloads. A witness node is a lightweight control plane participant that runs etcd but does not host workloads. The witness role is particularly relevant for edge or constrained environments where you might have two powerful servers for workloads and a third smaller server that only needs to participate in quorum. Harvester documentation and test cases describe the witness node as a way to maintain quorum with two powerful nodes plus one lightweight node.
This has clear implications. If you try to build a production Harvester deployment with only two nodes, you will not get proper control plane high availability. With only two etcd members, losing either one removes majority. Harvester host management documentation warns that failure of a single control plane node in a minimal cluster can cause etcd to lose quorum and shut the cluster down. A two node Harvester cluster is therefore only suitable for labs, testing, or situations where you accept that a single node failure can take the platform down.
For a robust production deployment, you should treat three nodes as the absolute minimum and consider more if your workload is significant or your failure domains are complex. At three nodes, you have three management nodes by default. At four nodes, if Harvester keeps three as management and one as compute, the failure characteristics are similar to three node clusters but with more workload capacity. At five control plane nodes, etcd can tolerate the loss of two nodes but write performance slows down because a larger quorum is needed. Many Kubernetes design guides recommend three or five etcd nodes rather than larger numbers, to balance resilience against write latency.
Node roles today are mostly assigned automatically. The first node becomes a management node. The next two promoted nodes become management nodes in three node clusters. There is active work in the Harvester project to provide more direct control over node roles at install time, particularly to avoid automatic promotion in environments where you want specific nodes to carry control plane duties and others to remain compute only. An enhancement request on the Harvester GitHub tracker describes scenarios where administrators want to specify node roles such as management, witness, or compute explicitly during installation to prevent random promotion.
From a capacity planning angle, you should define your node roles before you order hardware. For a small production Harvester cluster that needs high availability, a common pattern is three identical servers that all act as management and compute nodes. This simplifies procurement and provides both control plane redundancy and workload capacity. As you grow, you might move to a pattern with three management nodes and N compute nodes, where the compute nodes are tuned more aggressively for CPU and memory density and the management nodes are tuned for resilience and IOPS for etcd and control plane operations.
It is useful to see how these roles manifest at the Kubernetes level. Harvester labels nodes with their role, and control plane nodes are tainted to avoid scheduling regular workloads onto them by default. You can inspect this with kubectl and even adjust placement if you know what you are doing.
apiVersion: v1kind: Nodemetadata: name: harv-mgmt-1 labels: node.harvesterhci.io/role: management node-role.kubernetes.io/control-plane: "true"spec: taints: - key: node-role.kubernetes.io/control-plane effect: NoSchedule---apiVersion: v1kind: Nodemetadata: name: harv-compute-1 labels: node.harvesterhci.io/role: compute kubernetes.io/hostname: harv-compute-1spec: taints: []---apiVersion: v1kind: Nodemetadata: name: harv-witness-1 labels: node.harvesterhci.io/role: witness node-role.kubernetes.io/etcd-only: "true"spec: taints: - key: node.harvesterhci.io/witness effect: NoScheduleIn a real cluster you would not edit these YAML definitions directly, but this structure illustrates the distinction. Management nodes carry control plane labels and taints. Compute nodes are free of control plane taints and host most VMs and pods. Witness nodes are deliberately unschedulable for workloads and are dedicated to etcd participation.
When you plan minimal cluster sizes, combine this role model with your workload profile. A home lab or small test environment might use three identical nodes with mixed management and compute roles. A production environment that needs predictable performance under load will often separate concerns more clearly. It might allocate three medium sized servers as management nodes and a larger number of high density compute nodes for workloads, possibly with a small witness node in a separate site to help with quorum in a dual site layout.
The key is to treat management capacity as a first class dimension of your design. Harvester relies on RKE2 and etcd, so the same principles that apply to any serious Kubernetes deployment apply here. Under sizing the control plane to save hardware costs is one of the quickest ways to destabilize a Harvester cluster once it starts hosting real workloads.
3.2: CPU, Memory And Disk Sizing For Mixed VM And Container Workloads
Section titled “3.2: CPU, Memory And Disk Sizing For Mixed VM And Container Workloads”Once you have a handle on node roles and minimum cluster size, you can start sizing CPU, memory, and disk capacity. Harvester runs both VMs and containers, so you have two sets of resource consumers that share the same physical hardware and the same control plane. If you treat them independently, they will compete in ways that are hard to predict. A solid capacity plan starts with a combined view of all workloads and a clear policy for oversubscription.
For CPU, most virtualization platforms rely on the fact that not all vCPUs are busy at the same time. That is also true for Harvester. You can safely allocate more virtual cores than you have physical cores, as long as you watch actual utilization and the nature of your workloads. Harvester itself reserves CPU and memory for system components. An open feature request notes that Harvester via RKE2 currently reserves CPU and memory based on a percentage of node capacity and that a more adaptive reservation model that combines minimum values and percentages would be desirable. This means that on small nodes, control plane overhead can be relatively high, and on large nodes, it is moderate but still must be factored into your calculations.
For planning, a practical approach is to start with the physical capacity of your cluster, subtract a conservative reservation for Harvester, Kubernetes, Longhorn, and system services, and then decide on an oversubscription ratio for the remaining CPU and memory. For example, you might assume that 20 percent of each node’s CPU and memory is dedicated to the platform itself, leaving 80 percent for user workloads. On that 80 percent, you might allow a CPU overcommit ratio of 2 to 1, while keeping memory oversubscription low, for example 1.2 to 1, because memory overcommit on Linux without careful tuning can cause swap storms or OOM kills that are especially painful for VMs.
Disk sizing is more nuanced because Longhorn replicates data. Longhorn documentation and community best practice guides emphasize that you should use SSD or NVMe disks or block devices with similar performance and that spinning disks are not recommended because their IOPS are too low for typical Kubernetes and VM patterns. Longhorn also uses a replica count per volume, often set to 2 or 3. A replica count of 3 means that each gigabyte of logical volume consumes roughly 3 gigabytes of raw disk capacity, plus some overhead. The same documentation suggests replica count 2 as a balanced default when you want both availability and lower capacity overhead.
When sizing disk, then, you must translate logical storage needs into physical capacity taking replica count and future growth into account. If your workloads need 10 terabytes of logical storage and you choose replica count 3, you already need around 30 terabytes of usable Longhorn capacity, plus headroom for snapshots and backups. If you choose replica count 2, that drops to 20 terabytes, but you also reduce the number of simultaneous node failures you can tolerate without data risk.
Harvester users often report good results with a design that includes a relatively small fast disk, such as a 1 terabyte NVMe, for the Harvester OS and some general VM storage, plus several larger SSDs dedicated to Longhorn volumes for Kubernetes and VM disks. One GitHub issue about disk allocation describes a setup with three node each with a 1 terabyte NVMe for Harvester installation and four terabyte SSDs for PV storage. This kind of design clearly separates system storage from application storage and uses SSDs for Longhorn to avoid performance bottlenecks.
To make the sizing process concrete, it helps to write down your workloads and run a quick calculation script. Even a short Python script can be valuable when you want to test different oversubscription ratios.
# Simple Harvester sizing helper for CPU, memory, and storage
from dataclasses import dataclassfrom typing import List
@dataclassclass Workload: name: str vcpus: int memory_gib: float storage_gib: float # logical storage on Longhorn
@dataclassclass NodeType: name: str nodes: int physical_cpus: int physical_mem_gib: float longhorn_storage_gib: float # usable raw Longhorn capacity on this node
workloads: List[Workload] = [ Workload("vm-db-01", vcpus=8, memory_gib=32, storage_gib=500), Workload("vm-db-02", vcpus=8, memory_gib=32, storage_gib=500), Workload("vm-app-01", vcpus=4, memory_gib=16, storage_gib=200), Workload("k8s-guest-01", vcpus=6, memory_gib=24, storage_gib=300),]
nodes = NodeType( name="standard", nodes=3, physical_cpus=24, physical_mem_gib=128, longhorn_storage_gib=8000, # per node, from SSD pool)
cpu_platform_reserve = 0.2 # 20 percent of CPU for Harvester and systemmem_platform_reserve = 0.2 # 20 percent of memory for Harvester and system
cpu_oversubscription = 2.0 # 2 to 1 CPU overcommitmem_oversubscription = 1.2 # 1.2 to 1 memory overcommitlonghorn_replica_count = 2 # Longhorn replica count
total_vcpus = sum(w.vcpus for w in workloads)total_mem = sum(w.memory_gib for w in workloads)total_storage_logical = sum(w.storage_gib for w in workloads)
cluster_physical_cpus = nodes.nodes * nodes.physical_cpuscluster_physical_mem = nodes.nodes * nodes.physical_mem_gibcluster_physical_longhorn = nodes.nodes * nodes.longhorn_storage_gib
usable_cpu_for_workloads = cluster_physical_cpus * (1 - cpu_platform_reserve) * cpu_oversubscriptionusable_mem_for_workloads = cluster_physical_mem * (1 - mem_platform_reserve) * mem_oversubscriptionusable_longhorn_for_workloads = cluster_physical_longhorn / longhorn_replica_count
print(f"Total workload vCPUs: {total_vcpus}")print(f"Total workload memory GiB: {total_mem}")print(f"Total workload storage GiB (logical): {total_storage_logical}")print()print(f"Usable CPU capacity (vCPUs): {usable_cpu_for_workloads:.1f}")print(f"Usable memory capacity (GiB): {usable_mem_for_workloads:.1f}")print(f"Usable Longhorn capacity (GiB): {usable_longhorn_for_workloads:.1f}")This script is deliberately simple, but it helps you see whether your workload plan is within a reasonable range for a proposed cluster configuration. You can adjust the number of nodes, the size of each node, and the oversubscription ratios and replica count until the numbers make sense.
Beyond raw capacity, consider performance and contention. CPU bound workloads such as CI agents or analytics jobs may require lower oversubscription ratios or dedicated node pools. Memory intensive workloads such as databases prefer low oversubscription and stable memory latency. Disk bound workloads benefit from NVMe based Longhorn disks and sufficient network bandwidth between nodes, since Longhorn replicates data over the network. Best practice guides recommend 10 Gbps network bandwidth between nodes for Longhorn in production to keep replication and rebuild times acceptable.
Harvester offers monitoring views that show CPU and memory utilization per node, along with information derived from Kubernetes resource requests and limits. Documentation on resource metric calculation explains that Harvester dynamically calculates resource limits and requests of all pods on a host and stores these values in node metrics annotations. These metrics can inform your ongoing sizing decisions. If you see control plane components regularly competing with user workloads for CPU, or if Longhorn engine pods consume a surprising amount of memory, you may need to adjust reservations or add nodes.
In short, treat CPU, memory, and disk sizing as an iterative process. Start with a clear inventory of workloads and a rough model like the script above. Add a comfortable margin for growth and unknowns. Observe the platform under load and refine. Harvester and Longhorn behave like any other serious virtualization and storage stack. They reward conservative, data driven capacity planning and punish aggressive overcommit when workloads grow faster than expected.
3.3: Disk Layout For Longhorn Including NVMe, SSD And Spinning Disk Tradeoffs
Section titled “3.3: Disk Layout For Longhorn Including NVMe, SSD And Spinning Disk Tradeoffs”Disk layout is one of the most consequential design decisions you will make for a Harvester cluster, because Longhorn sits on top of those disks and provides persistent storage for both VMs and containers. If the underlying disks are slow or poorly arranged, Longhorn will struggle, and every IO heavy workload will remind you of that decision.
The Longhorn project and Harvester knowledge base articles are very clear on recommended disk types. They call out SSD or NVMe disks or other block devices with similar performance as the right choice for Longhorn storage. They explicitly advise against using spinning disks because their IOPS characteristics are poor compared to SSDs. Community posts echo that guidance, stating that Longhorn on spinning disks shows significantly lower performance and is often not acceptable for databases, message queues, or any workload with frequent synchronous writes.
On a Harvester node, you need to accommodate at least two broad categories of storage. The first is system storage for SLE Micro, Harvester, RKE2 components, and logs. The second is Longhorn data disks that will store VM images, Kubernetes persistent volumes, and snapshots. In many production friendly designs, system storage lives on a relatively small but fast disk, such as a 512 gigabyte or 1 terabyte NVMe, while Longhorn data volumes live on one or more larger SSDs or NVMe drives dedicated to that purpose. Using the same disk for both system storage and Longhorn data is technically possible but strongly discouraged in Longhorn documentation, which warns that using the root disk for Longhorn introduces avoidable risk and performance interference.
Longhorn also needs direct visibility into the disks you want to use. Each node reports a set of disks to Longhorn, and you choose which ones participate in the storage cluster. Best practice guides recommend dedicating entire disks or well partitioned devices to Longhorn, not carving up the system disk into many partitions for both OS and storage. This simplifies management and avoids scenarios where OS log growth competes with application data for space.
Within Longhorn itself, you set a default replica count and per volume replica counts. Replica count directly multiplies your capacity requirements, as already discussed, but it also affects disk layout strategy. With replica count 3, an ideal layout has enough nodes and disks so that each replica can sit on a different node, and ideally in different physical racks or power domains if your cluster is large enough. In a small three node cluster, Longhorn naturally spreads replicas across nodes. In larger clusters, you can use node tags and disk tags to control replica placement so that critical volumes are not concentrated on a few nodes. Longhorn documentation and tuning guides discuss these strategies in detail.
Harvester adds another dimension with support for Longhorn v2 and NVMe acceleration. Harvester documentation for Longhorn v2 notes that Harvester sets the Longhorn disk driver to auto, which means NVMe disks use the SPDK NVMe backend for better performance and trim support. This is valuable because it gives you the option to use very fast NVMe devices with an optimized driver, getting closer to local disk performance while still enjoying Longhorn’s replication and snapshot features. If your budget allows, designing nodes with one or more NVMe disks dedicated to Longhorn can significantly improve throughput and latency for storage heavy workloads.
The main tradeoff between NVMe, SATA SSD, and spinning disk is cost per gigabyte versus performance. NVMe provides the best performance but costs more per unit of capacity. SATA SSDs sit in the middle. Spinning disks are cheapest per gigabyte but too slow for many use cases, especially when you add replica overhead and network replication into the picture. Longhorn benchmarks demonstrate that even when using SSDs, Longhorn volumes are typically slower than raw NVMe local disks because of network hops and replication, but they are still more than adequate for many application patterns.
A pragmatic pattern for many Harvester deployments looks like this. Each node carries a small but fast system disk where SLE Micro and Harvester live. Each node also carries a pool of SSDs or NVMe drives that Longhorn uses as data disks. Capacity is sized according to the total storage needs and replica count, with some headroom for snapshots and future workloads. If certain workloads require very high performance, such as large transactional databases, you might dedicate a separate NVMe to those volumes or even attach a local disk directly to the VM via PCI passthrough and accept that the data will not be replicated by Longhorn. That choice trades availability for performance and must be made consciously.
Spinning disks may still have a place for cold data or archive workloads, but if you choose to involve them, isolate them in dedicated Longhorn disk tags and be honest about the performance profile. Longhorn can handle them technically, but it cannot conjure IOPS that the hardware does not provide. For most general purpose Harvester clusters, the safest guidance is to keep Longhorn on SSD or NVMe and leave spinning disks out of the primary storage path.
3.4: Network Topologies With VLAN Aware Switching For Lab And Production
Section titled “3.4: Network Topologies With VLAN Aware Switching For Lab And Production”Network design is often the part of Harvester planning that causes the most debate, because it involves coordination with switching teams and has a direct impact on VM connectivity, storage replication, and management access. Harvester documentation includes a set of best practice guides for networking, with specific scenarios covering multiple NICs with VLAN aware switches, multiple NICs with non VLAN aware switches, and single NIC designs. The overview section recommends multiple NICs in production, with one used for node access and one for VM networking, and then references detailed guides for VLAN aware and non VLAN aware switches.
For VLAN aware topologies, the basic pattern is that the switch ports connected to Harvester nodes are configured as trunk ports that carry one or more VLANs. Harvester creates a management network on one VLAN or on untagged traffic and additional VLAN networks for VMs. In multiple NIC scenarios, one NIC or bond is typically dedicated to management and storage traffic, and another NIC or bond is used for VM networks. Documentation notes that if you have a bonded interface, you treat it as a single NIC from Harvester’s perspective and then follow the single NIC VLAN aware design for that bond unless you have multiple bonds.
In a lab environment, you might run with a single NIC per node connected to a VLAN aware switch. In that case, Harvester’s management network and VLAN networks all share the same physical link. Harvester networking best practices and GitHub discussions describe this as acceptable for testing and small clusters, as long as the switch is configured correctly and the aggregate bandwidth needs are modest. However, they also note that separate NICs for management and VM traffic are preferred for production, to reduce contention and simplify troubleshooting.
Within Harvester, VM networks are implemented through Kubernetes CNI and Multus. When you create a VLAN network from the Harvester UI, the platform creates a corresponding NetworkAttachmentDefinition object in Kubernetes with the correct VLAN ID and bridge configuration. The VM then references this network, and KubeVirt configures a tap interface and bridge inside the pod so that the VM sees a NIC connected to that VLAN. SUSE virtualization documentation describes the process of adding a VLAN network and then creating a VM that uses that network, while the networking best practice docs provide explicit switch configuration patterns.
A simple example of a NetworkAttachmentDefinition for a VLAN aware network helps make this concrete.
apiVersion: k8s.cni.cncf.io/v1kind: NetworkAttachmentDefinitionmetadata: name: vlan-200-net namespace: harvester-system annotations: harvesterhci.io/network-type: "vlan"spec: config: | { "cniVersion": "0.3.1", "name": "vlan-200-net", "plugins": [ { "type": "bridge", "bridge": "br-vlan-200", "vlan": 200, "ipam": { "type": "static" } } ] }In practice, Harvester generates this JSON automatically based on your UI input, but the structure is similar. The bridge type plugin creates a Linux bridge, attaches it to the host interface that carries the VLAN, and tags traffic with VLAN ID 200. When a VM connects to this network, the pod’s virt-launcher container connects a tap interface to br-vlan-200, and the VM’s NIC uses that path.
On the switch side, the port that connects to the Harvester node must be configured as a trunk that allows VLAN 200. The exact syntax varies by vendor, but conceptually you set the port to trunk mode, define the native VLAN for untagged traffic if you use one, and add allowed VLANs including 200. Harvester documentation for single NIC with VLAN aware switches shows access and trunk configuration examples for common switch platforms, stressing that VLAN tagging must be correct on both sides or VM traffic will fail silently.
To help keep lab and production designs aligned, it is sensible to use VLAN aware switching from the start, even in labs. For example, in a home lab where you only have a single physical NIC per node, you can still configure the switch as VLAN aware and create separate VLANs for management, storage, and VM traffic. Harvester can run all these networks on the same physical interface, with one bridge for management and others for VM VLANs. This allows you to test realistic network separation without requiring extra NICs, while acknowledging that throughput and fault isolation are not as strong as in a production network with dedicated links. Guides for building Harvester based labs discuss this approach directly.
For production, spread traffic across at least two NICs per node. One NIC, or more commonly a bonded pair, carries management traffic, RKE2 control plane traffic, and Longhorn replication. The other NIC or bond carries VM networks. Within the VM networks, you can break out additional VLANs for different tenant segments, development and production separation, or special purpose networks such as backup or database replication. The Harvester best practice overview summarizes these options and points you to detailed pages for multiple NIC designs with both VLAN aware and non VLAN aware switching.
Finally, keep in mind the interaction between network design and capacity planning. Longhorn replication and rebuild traffic will consume bandwidth on whichever NICs you place storage networks. If you combine storage replication with heavy VM east west traffic on a single 10 Gbps link, you may hit congestion during failure events or backup windows. Best practice documents for Longhorn storage performance highlight the need for 10 Gbps connectivity between nodes for production and suggest that dedicated bandwidth for storage is ideal. Harvester networking best practices lean in the same direction, recommending multiple NICs in real production environments.
Network design for Harvester does not require exotic SDN features. It does demand clear planning between your Harvester configuration and your physical switches. Decide early which VLANs will carry management, storage, and VM traffic. Decide how many NICs each node will have and which NICs will carry which VLANs. Then configure Harvester VLAN networks and switch ports consistently. If you align lab and production designs around these patterns, you will have a much easier time predicting behavior and diagnosing issues when the platform starts carrying important workloads.