I am using the taskset tool to set CPU affinity for my multithreaded Rust program which queries data from MongoDB:
taskset -c 16-31 cargo run
When I run this command, I find that the program will also run on other CPUs as observed from htop
. What went wrong and how to I solve this?