Repository navigation
Latency Profile
For programs that measure themselves in microseconds, such as trading systems and packet processors. A latency section in the manifest changes how the capsule is set up; once the program has started, nothing of capsule is on its path.
"latency": {
"cores": 2,
"memory_lock": true,
"realtime": true,
"hugepages": true,
"nic": {"name": "eth1", "address": "10.0.0.5/24", "gateway": "10.0.0.1"},
"devices": ["/dev/vfio/vfio"]
}| Field | What the capsule gets |
|---|---|
cores |
That many whole cores from the host's reserved set, shared with no other capsule, with no CPU quota |
memory_lock |
The right to lock all its memory in RAM |
realtime |
The right to give its threads real-time priority |
hugepages |
The host's huge pages, at /dev/hugepages
|
nic |
One of the host's network interfaces, moved into the capsule for as long as it runs |
devices |
Device files of the host, for network stacks that bypass the kernel |
The host's operator names the reserved cores, and what capsules run without root may have, in /etc/capsule/latency:
cores 2-3,6-7
nic enp1s0f1
memory_lock
realtime
hugepages
One Xeon E3-1245 v5 (4 cores, 8 threads, kernel 5.15), two cores and their siblings isolated at boot, every other core kept busy. Worst case over 120 seconds, in microseconds:
| Where the program ran | Busy polling (oslat) |
Wake-up (cyclictest) |
|---|---|---|
| Directly on the host, isolated core | 23 | 20 |
| Capsule with the latency profile | 20 | 14 |
| Host, shared core | 11,686 | 1,930 |
| Capsule, shared cores | 8,001 | 2,376 |
A capsule with the profile behaves like the program run directly on the host. test/bench-latency.sh repeats the measurement on your own hardware.
DPDK's testpmd runs in a capsule, as root and without root: it took an Intel I350 port through vfio-pci and received packets with the kernel out of the path. test/dpdk.sh repeats it.
- Measured inside one machine. Latency across a wire between two machines has not been measured (issue #9).
- One processor model and one network card so far.
Details and host settings: Guide, section 13.
capsule is source-available under the Functional Source License 1.1 (Apache 2.0 after two years). This wiki describes release 0.16.0; the documentation in the repository is the reference for each version.
capsule
In the repository