KubeArmor Performance Benchmark (v1.7.6)¶
KubeArmor v1.7.6 keeps application throughput within 5% of a cluster without KubeArmor in all 29 test scenarios. The heaviest scenario runs 150 policies across process, file and network rules. It uses 30.31m of CPU and 184 MiB of memory on average.
| Result | AppArmor (Redis) | BPF-LSM (Redis) | BPF-LSM, 1 to 150 policies (Online Boutique) |
|---|---|---|---|
| Throughput vs. no KubeArmor | +1.9% to +4.0% | −4.3% to +4.9% | 116 to 118 req/s vs. 117 req/s |
| CPU, average | 5.07m to 11.42m | 1.68m to 13.18m | 1.82m to 30.31m |
| Memory, average | 44 to 53 MiB | 152 to 164 MiB | 154 to 184 MiB |
- Full visibility costs about 1% of one core. Process, network and file visibility together use 11.42m on AppArmor and 12.90m on BPF-LSM.
- Policy count adds little. 100 policies of one type cost at most 3.83m of CPU and 13.81 MiB of memory more than 1 policy.
- BPF-LSM uses about 110 MiB more memory than AppArmor. CPU cost is close between the two.
Units
A millicore (m) is one thousandth of a CPU core, so 10m is 1% of one core. CPU and memory are the total across all KubeArmor pods.
AppArmor Adds No Throughput Loss on Redis¶
Redis SET throughput stays between 52,121 and 53,195 requests per second, against a baseline of 51,163. Latency stays at about 0.5 ms.
| Scenario | CPU avg (m) | Memory avg (MiB) | Throughput (req/s) | Change | Latency (ms) |
|---|---|---|---|---|---|
| Without KubeArmor | N/A | N/A | 51,163 ± 525 | Baseline | 0.514 ± 0.005 |
| Visibility: none | 5.07 ± 0.13 | 43.83 ± 1.01 | 52,901 ± 170 | +3.4% | 0.499 ± 0.003 |
| Visibility: process | 5.64 ± 0.45 | 44.62 ± 0.69 | 52,755 ± 1,497 | +3.1% | 0.502 ± 0.017 |
| Visibility: process + network | 7.61 ± 0.22 | 49.58 ± 0.72 | 52,402 ± 648 | +2.4% | 0.505 ± 0.007 |
| Visibility: process + file | 10.21 ± 0.87 | 51.75 ± 1.07 | 53,195 ± 574 | +4.0% | 0.496 ± 0.007 |
| Visibility: process + network + file | 11.42 ± 1.56 | 52.03 ± 1.37 | 52,472 ± 1,639 | +2.6% | 0.504 ± 0.018 |
| Policy: process | 5.11 ± 0.17 | 44.89 ± 1.02 | 52,409 ± 1,264 | +2.4% | 0.505 ± 0.015 |
| Policy: process + network | 7.01 ± 0.08 | 49.25 ± 2.71 | 52,121 ± 274 | +1.9% | 0.508 ± 0.002 |
| Policy: process + file | 10.10 ± 1.16 | 53.22 ± 0.35 | 53,097 ± 368 | +3.8% | 0.497 ± 0.004 |
| Policy: process + network + file | 10.90 ± 0.53 | 52.44 ± 0.74 | 52,466 ± 192 | +2.5% | 0.503 ± 0.002 |
BPF-LSM Stays Within 5% of Baseline on Redis¶
Redis SET throughput ranges from 41,553 to 45,524 requests per second, against a baseline of 43,407. The largest drop is 4.3%, which is within two standard deviations of the baseline.
| Scenario | CPU avg (m) | Memory avg (MiB) | Throughput (req/s) | Change | Latency (ms) |
|---|---|---|---|---|---|
| Without KubeArmor | N/A | N/A | 43,407 ± 998 | Baseline | 0.728 ± 0.032 |
| Visibility: none | 1.68 ± 0.27 | 152.48 ± 1.10 | 41,553 ± 668 | −4.3% | 0.762 ± 0.018 |
| Visibility: process | 4.63 ± 0.17 | 157.71 ± 3.87 | 42,402 ± 1,531 | −2.3% | 0.736 ± 0.041 |
| Visibility: process + network | 7.06 ± 0.27 | 159.32 ± 0.64 | 42,149 ± 1,264 | −2.9% | 0.739 ± 0.041 |
| Visibility: process + file | 11.76 ± 0.69 | 161.89 ± 0.22 | 42,253 ± 736 | −2.7% | 0.737 ± 0.028 |
| Visibility: process + network + file | 12.90 ± 1.00 | 163.53 ± 0.32 | 42,328 ± 641 | −2.5% | 0.736 ± 0.019 |
| Policy: process | 4.71 ± 0.36 | 155.22 ± 0.70 | 45,482 ± 1,300 | +4.8% | 0.662 ± 0.024 |
| Policy: process + network | 7.61 ± 0.71 | 158.68 ± 0.83 | 45,524 ± 342 | +4.9% | 0.655 ± 0.007 |
| Policy: process + file | 11.65 ± 0.78 | 163.30 ± 1.84 | 44,805 ± 955 | +3.2% | 0.675 ± 0.018 |
| Policy: process + network + file | 13.18 ± 0.62 | 163.66 ± 1.77 | 44,895 ± 70 | +3.4% | 0.675 ± 0.005 |
BPF-LSM keeps policy and event data in eBPF maps, so its memory baseline is about 110 MiB higher than AppArmor. Use the LSM your node kernel supports. The KubeArmor Support Matrix lists the supported distributions.
Compare each table with its own baseline
The AppArmor and BPF-LSM runs have different baselines. Compare each scenario only with the "Without KubeArmor" row in the same table.
Policy Type Drives Cost More Than Policy Count¶
With 1 to 150 policies on BPF-LSM, the Online Boutique serves 116 to 118 requests per second, against a baseline of 117.
| Scenario | CPU avg (m) | CPU peak (m) | Memory avg (MiB) | Throughput (req/s) | Latency (ms) |
|---|---|---|---|---|---|
| Without KubeArmor | N/A | N/A | N/A | 117 ± 0 | 28.85 ± 5.23 |
| Visibility: none | 1.82 ± 0.31 | 12 | 154.47 ± 3.31 | 117 ± 1 | 32.45 ± 6.04 |
| Process, 1 policy | 4.72 ± 0.39 | 17 | 157.05 ± 1.46 | 117 ± 1 | 32.10 ± 6.13 |
| Process, 50 policies | 5.29 ± 0.56 | 39 | 164.56 ± 2.34 | 118 ± 1 | 24.01 ± 9.72 |
| Process, 100 policies | 5.28 ± 1.89 | 48 | 168.39 ± 2.09 | 117 ± 2 | 26.54 ± 11.38 |
| File, 1 policy | 11.24 ± 0.22 | 33 | 164.44 ± 0.06 | 117 ± 1 | 28.60 ± 8.77 |
| File, 50 policies | 13.68 ± 1.67 | 64 | 170.81 ± 1.52 | 117 ± 0 | 28.58 ± 4.85 |
| File, 100 policies | 14.00 ± 2.76 | 66 | 178.25 ± 2.65 | 117 ± 1 | 31.47 ± 9.27 |
| Network, 1 policy | 18.90 ± 1.57 | 41 | 166.00 ± 0.98 | 116 ± 1 | 39.22 ± 5.69 |
| Network, 50 policies | 19.11 ± 3.39 | 52 | 170.12 ± 1.38 | 117 ± 2 | 31.52 ± 11.24 |
| Network, 100 policies | 22.73 ± 1.27 | 69 | 173.39 ± 1.64 | 117 ± 1 | 26.80 ± 11.95 |
| Process + network + file, 50 each | 30.31 ± 3.26 | 140 | 183.95 ± 1.64 | 117 ± 0 | 29.51 ± 2.23 |
Going from 1 to 100 policies of one type adds:
| Policy type | Extra CPU | Extra memory |
|---|---|---|
| Process | +0.56m | +11.34 MiB |
| File | +2.76m | +13.81 MiB |
| Network | +3.83m | +7.39 MiB |
One network policy costs more CPU than 100 process policies, because KubeArmor inspects every network event on the node.
Tests Ran on One 8 vCPU Node With 1,000 Simulated Pods¶
| Item | Value |
|---|---|
| KubeArmor | v1.7.6 |
| Host | Ubuntu 24, amd64, 8 vCPU, 16 GB memory |
| Kubernetes | K3s, with KWOK simulating 1,000 nodes and 1,000 pods in 250 namespaces |
| Redis benchmark | redis-benchmark SET test, 50 clients, on AppArmor and BPF-LSM |
| Policy stress benchmark | Google Online Boutique (11 microservices), Locust with 100 concurrent shoppers, on BPF-LSM |
| Repetitions | 3 per scenario, reported as mean ± standard deviation |
Each run installs KubeArmor, waits for it to stabilize, records CPU and memory with kubectl top, runs the load from inside the cluster, then uninstalls KubeArmor. "Without KubeArmor" is the same workload with no KubeArmor pods.
KubeArmor monitors every process on the node, including the K3s and KWOK control plane. With file or network visibility on, that control plane activity is part of the CPU figure even with no application load.
Full Results With Minimum and Maximum Values¶
Each table adds the lowest and highest single samples across all runs.
AppArmor, Redis: full results
| Scenario | Users | CPU avg (m) | CPU min (m) | CPU max (m) | Mem avg (MiB) | Mem min (MiB) | Mem max (MiB) | Throughput (req/s) | Latency (ms) |
|---|---|---|---|---|---|---|---|---|---|
| Without KubeArmor | 50 | N/A | N/A | N/A | N/A | N/A | N/A | 51,163 ± 525 | 0.514 ± 0.005 |
| Visibility: none | 50 | 5.07 ± 0.13 | 4.00 | 6.00 | 43.83 ± 1.01 | 42.00 | 45.00 | 52,901 ± 170 | 0.499 ± 0.003 |
| Visibility: process | 50 | 5.64 ± 0.45 | 4.00 | 14.00 | 44.62 ± 0.69 | 42.00 | 46.00 | 52,755 ± 1,497 | 0.502 ± 0.017 |
| Visibility: process + network | 50 | 7.61 ± 0.22 | 6.00 | 45.00 | 49.58 ± 0.72 | 47.00 | 51.00 | 52,402 ± 648 | 0.505 ± 0.007 |
| Visibility: process + file | 50 | 10.21 ± 0.87 | 7.00 | 33.00 | 51.75 ± 1.07 | 50.00 | 53.00 | 53,195 ± 574 | 0.496 ± 0.007 |
| Visibility: process + network + file | 50 | 11.42 ± 1.56 | 9.00 | 28.00 | 52.03 ± 1.37 | 49.00 | 54.00 | 52,472 ± 1,639 | 0.504 ± 0.018 |
| Policy: process | 50 | 5.11 ± 0.17 | 4.00 | 8.00 | 44.89 ± 1.02 | 42.00 | 47.00 | 52,409 ± 1,264 | 0.505 ± 0.015 |
| Policy: process + network | 50 | 7.01 ± 0.08 | 6.00 | 28.00 | 49.25 ± 2.71 | 47.00 | 53.00 | 52,121 ± 274 | 0.508 ± 0.002 |
| Policy: process + file | 50 | 10.10 ± 1.16 | 8.00 | 28.00 | 53.22 ± 0.35 | 51.00 | 54.00 | 53,097 ± 368 | 0.497 ± 0.004 |
| Policy: process + network + file | 50 | 10.90 ± 0.53 | 9.00 | 28.00 | 52.44 ± 0.74 | 49.00 | 55.00 | 52,466 ± 192 | 0.503 ± 0.002 |
BPF-LSM, Redis: full results
| Scenario | Users | CPU avg (m) | CPU min (m) | CPU max (m) | Mem avg (MiB) | Mem min (MiB) | Mem max (MiB) | Throughput (req/s) | Latency (ms) |
|---|---|---|---|---|---|---|---|---|---|
| Without KubeArmor | 50 | N/A | N/A | N/A | N/A | N/A | N/A | 43,407 ± 998 | 0.728 ± 0.032 |
| Visibility: none | 50 | 1.68 ± 0.27 | 1.00 | 13.00 | 152.48 ± 1.10 | 150.00 | 163.00 | 41,553 ± 668 | 0.762 ± 0.018 |
| Visibility: process | 50 | 4.63 ± 0.17 | 3.00 | 25.00 | 157.71 ± 3.87 | 154.00 | 170.00 | 42,402 ± 1,531 | 0.736 ± 0.041 |
| Visibility: process + network | 50 | 7.06 ± 0.27 | 5.00 | 27.00 | 159.32 ± 0.64 | 156.00 | 161.00 | 42,149 ± 1,264 | 0.739 ± 0.041 |
| Visibility: process + file | 50 | 11.76 ± 0.69 | 9.00 | 48.00 | 161.89 ± 0.22 | 160.00 | 163.00 | 42,253 ± 736 | 0.737 ± 0.028 |
| Visibility: process + network + file | 50 | 12.90 ± 1.00 | 10.00 | 38.00 | 163.53 ± 0.32 | 161.00 | 166.00 | 42,328 ± 641 | 0.736 ± 0.019 |
| Policy: process | 50 | 4.71 ± 0.36 | 3.00 | 18.00 | 155.22 ± 0.70 | 154.00 | 174.00 | 45,482 ± 1,300 | 0.662 ± 0.024 |
| Policy: process + network | 50 | 7.61 ± 0.71 | 6.00 | 27.00 | 158.68 ± 0.83 | 156.00 | 161.00 | 45,524 ± 342 | 0.655 ± 0.007 |
| Policy: process + file | 50 | 11.65 ± 0.78 | 9.00 | 46.00 | 163.30 ± 1.84 | 161.00 | 168.00 | 44,805 ± 955 | 0.675 ± 0.018 |
| Policy: process + network + file | 50 | 13.18 ± 0.62 | 10.00 | 43.00 | 163.66 ± 1.77 | 161.00 | 166.00 | 44,895 ± 70 | 0.675 ± 0.005 |
BPF-LSM policy stress, Online Boutique: full results
| Scenario | Users | CPU avg (m) | CPU min (m) | CPU max (m) | Mem avg (MiB) | Mem min (MiB) | Mem max (MiB) | Throughput (req/s) | Latency (ms) |
|---|---|---|---|---|---|---|---|---|---|
| Without KubeArmor | 100 | N/A | N/A | N/A | N/A | N/A | N/A | 117 ± 0 | 28.85 ± 5.23 |
| Visibility: none | 100 | 1.82 ± 0.31 | 1.00 | 12.00 | 154.47 ± 3.31 | 151.00 | 178.00 | 117 ± 1 | 32.45 ± 6.04 |
| Process, 1 policy | 100 | 4.72 ± 0.39 | 4.00 | 17.00 | 157.05 ± 1.46 | 154.00 | 159.00 | 117 ± 1 | 32.10 ± 6.13 |
| Process, 50 policies | 100 | 5.29 ± 0.56 | 3.00 | 39.00 | 164.56 ± 2.34 | 155.00 | 172.00 | 118 ± 1 | 24.01 ± 9.72 |
| Process, 100 policies | 100 | 5.28 ± 1.89 | 1.00 | 48.00 | 168.39 ± 2.09 | 162.00 | 175.00 | 117 ± 2 | 26.54 ± 11.38 |
| File, 1 policy | 100 | 11.24 ± 0.22 | 6.00 | 33.00 | 164.44 ± 0.06 | 162.00 | 166.00 | 117 ± 1 | 28.60 ± 8.77 |
| File, 50 policies | 100 | 13.68 ± 1.67 | 9.00 | 64.00 | 170.81 ± 1.52 | 169.00 | 174.00 | 117 ± 0 | 28.58 ± 4.85 |
| File, 100 policies | 100 | 14.00 ± 2.76 | 8.00 | 66.00 | 178.25 ± 2.65 | 168.00 | 185.00 | 117 ± 1 | 31.47 ± 9.27 |
| Network, 1 policy | 100 | 18.90 ± 1.57 | 14.00 | 41.00 | 166.00 ± 0.98 | 161.00 | 167.00 | 116 ± 1 | 39.22 ± 5.69 |
| Network, 50 policies | 100 | 19.11 ± 3.39 | 12.00 | 52.00 | 170.12 ± 1.38 | 168.00 | 172.00 | 117 ± 2 | 31.52 ± 11.24 |
| Network, 100 policies | 100 | 22.73 ± 1.27 | 18.00 | 69.00 | 173.39 ± 1.64 | 168.00 | 177.00 | 117 ± 1 | 26.80 ± 11.95 |
| Process + network + file, 50 each | 100 | 30.31 ± 3.26 | 20.00 | 140.00 | 183.95 ± 1.64 | 179.00 | 187.00 | 117 ± 0 | 29.51 ± 2.23 |