feat(server): NUMA awareness#2412
Conversation
47e5efe to
76199f4
Compare
|
I have Here's my numa topology (i just printed |
|
But if i run this program on my PC: use hwlocality::object::types::ObjectType;
use hwlocality::topology::Topology;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let topo = Topology::new()?;
let numa_count = topo.objects_with_type(ObjectType::NUMANode).len();
println!("NUMA nodes: {numa_count}");
Ok(())
}I get: |
|
Thanks @hubcio. It is indeed one node. The reason is that I put the wrong logic in the print info. The log means using Node number 0, not 0 nodes. Let me update that |
|
I checked your PR on AWS, unfortunately i'm not able to book ec2 instances with numa nodes > 1, however on my PC it works fine. I'm gonna need you to fix one more thing: when building for [target.'cfg(target_env = "musl")'.dependencies]
hwlocality = { version = "1.0.0-alpha.11", features = ["vendored"] }
[target.'cfg(not(target_env = "musl"))'.dependencies]
hwlocality = { version = "1.0.0-alpha.11" }Other than that LGTM. |
Thanks @hubcio, I have updated it, along with the CI fix |

Flow
This PR addressing #2387
Benchmark
I was trying to launch an EC2 machine with multiple NUMA cores, but they wouldn't allow me to do so. They require me to submit a ticket and wait for approval.
Here is the bench on my local machine:
Intel(R) Core(TM) Ultra 9 285HBench cmd:
target/release/iggy-bench -m 200 -r 800MB pp tcpBefore:
2025-11-26T07:22:39.247127Z INFO bench_report::prints: \x1b[34mBenchmark: Pinned Producer, 8 producers, 8 streams, 1 topic per stream, 1 partitions per topic, 8000000 messages, 1000 messages per batch, 8000 message batches, 100 bytes per message, 800MB of data processed
\x1b[0m
2025-11-26T07:22:39.247182Z INFO bench_report::prints: \x1b[32mProducers Results: Total throughput: 790.38 MB/s, 7903786 messages/s, average throughput per Producer: 98.80 MB/s, p50 latency: 0.80 ms, p90 latency: 1.30 ms, p95 latency: 1.45 ms, p99 latency: 1.80 ms, p999 latency: 2.49 ms, p9999 latency: 15.00 ms, average latency: 0.84 ms, median latency: 0.80 ms, min: 0.26 ms, max: 8.52 ms, std dev: 0.06 ms, total time: 1.11 s\x1b[0m
After:
x1b[34mBenchmark: Pinned Producer, 8 producers, 8 streams, 1 topic per stream, 1 partitions per topic, 8000000 messages, 1000 messages per batch, 8000 message batches, 100 bytes per message, 800MB of data processed
\x1b[0m
2025-11-26T07:29:38.128852Z INFO bench_report::prints: \x1b[32mProducers Results: Total throughput: 798.21 MB/s, 7982140 messages/s, average throughput per Producer: 99.78 MB/s, p50 latency: 0.46 ms, p90 latency: 0.77 ms, p95 latency: 0.92 ms, p99 latency: 1.83 ms, p999 latency: 3.58 ms, p9999 latency: 4.32 ms, average latency: 0.51 ms, median latency: 0.46 ms, min: 0.17 ms, max: 1.78 ms, std dev: 0.04 ms, total time: 1.00 s\x1b[0m