Closed jkbonfield closed 2 years ago
I put a (Linux only) fix for this in the dev branch, in version 1.1dev.1. I'll be in the big 1.1 update when we release it.
If you want to try it out and make sure it works, just build the dev version. You'll need to rebuild your index if you do because we changed the format between 1.0 and 1.1.
I'll close this issue when 1.1 releases.
Fixed in 2.0.
Snap-aligner uses
sched_setaffinity
with the processor number coming from threadNum. This means for N threads it uses CPU 0 to N-1. At the very least this behaviour would be good to document.Unfortunately if I run "taskset -c 30,37 snap-aligner -t8" that means it'll (by default) still end up on CPUs 0 to 7. This has had me chasing my tail all afternoon as to why the speed is so variable (on a shared host with batch scheduling allocating CPUs).
I am aware that
--b
can disable this feature, but it's on by default. Could it callsched_getaffinity
first and if not a default mask of all CPUs, disable this feature and honour the environment instead?