Number of memory channels

Hello,

I would need to obtain an information about hardware: how many physical memory channels are available on PC.
I'm doing some memory intensive work in parallel. On my development PC I have Quad channel architecture and running more than 4 threads is wasting of resources because memory is a bottleneck. Execution time does not decrease with increasing number of threads over 4. Maybe slightly with 5. My CPU has 12 cores. For other CPU and memory info I'm using heim (https://github.com/heim-rs/heim) crate. I would need this primarily for Windows, however plan to use it on Linux, too.
I'm not aware of any crate which can provide information about hardware RAM channels.
Any help would be appreciated.
Thanks!

So in cases where there's no existing crate for the problem, you have to look at how to do that task in C, and then use FFI.

1 Like

Thanks for the answer. I hope this is a common problem and have a rust solution somewhere. I will continue looking for it before start digging in FFI direction.
Thanks again.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.