Conversation
✱ Stainless preview buildsThis PR will update the
|
| - fq_codel leaf qdisc for low latency under load | ||
|
|
||
| **Default limits:** | ||
| - Proportional to CPU: `(vcpus / cpu_capacity) * network_capacity` |
There was a problem hiding this comment.
so if i have 1 vcpu vm on a 256 core machine, with 2.0 oversub and a 10Gbps NIC:
Limit = 10Gbps × 2.0 × (1/256) = ~78 Mbps download and upload
seems low? Maybe we just raise oversub
There was a problem hiding this comment.
Right, and yes I agree / ran into same concept here. But it seems to me that it's sensible to give a low limit by default if the CPU is super high - presumably this user would be planning to deploy 100 VMs on the machine. Also, I think in practice we will not use the default, it seems possibly too high, because the NIC speed is going to be much higher than the actual bandwidth
| hash := h.Sum32() | ||
| // Use only 16 bits (tc class ID max is 0xFFFF) | ||
| return fmt.Sprintf("%04x", hash&0xFFFF) | ||
| } |
There was a problem hiding this comment.
HTB class ID hash collision can fail instance creation
The deriveClassID function uses a 16-bit hash (FNV-1a truncated to 0xFFFF) to generate HTB traffic control class IDs from TAP names. With only 65536 possible values, the birthday paradox makes collisions increasingly likely as VM count grows (~7% chance with 100 VMs, ~26% with 200 VMs). When two TAP names hash to the same class ID, tc class add in addVMClass fails with "File exists", causing instance creation to fail with a cryptic error. The user would need to create a new instance with a different ID to work around this.
Note
Introduces host resource accounting and per-VM rate limiting across CPU, memory, disk, and network.
lib/resources(CPU/memory/disk/network discovery, oversubscription, capacity/allocations) and newGET /resourcesendpoint and types inoapi/openapi.yamlnetwork.bandwidth_{download,upload}anddisk_io_bps; stores in metadata and includes in responsesdisk_io_bpsand symmetric network limits from CPU share viaResourceManagerNetworkManager.SetupHTB, class derivation, orphan cleanup, and restore paths updatedResourceManagerWritten by Cursor Bugbot for commit 366e0f7. This will update automatically on new commits. Configure here.