Caveats: Runs on my machine. Might not work on yours. If it does, you accept all responsibility for any system damage from running it or any version with typos.
Other notes: This doesn’t actually lock each process to a specific processor, but the system ought to spread the load anyway. taskset --cpu-list $i before the dd if you absolutely have to have that.
For research purposes, any way to parallelize across all cores?
for((i=0;i<$(grep -c '^processor' /proc/cpuinfo);i++)); do dd if=/dev/urandom of=/dev/null & donekillall ddif you want to kill themCaveats: Runs on my machine. Might not work on yours. If it does, you accept all responsibility for any system damage from running it or any version with typos.
Other notes: This doesn’t actually lock each process to a specific processor, but the system ought to spread the load anyway.
taskset --cpu-list $ibefore theddif you absolutely have to have that.dude,
for i in 1..$(nproc); doGood question. I only know of the
nicecommand, which only manipulates affinity and priority. I wonder how to target multiple cores from the CLI.Gnu parallel would probably be the way to go but I’m not very familiar with it
Looks like a good place to start!
Source: https://en.wikipedia.org/wiki/GNU_parallel