4 ms·
Wow this list is tremendous! It's fun to still discover new commands after all these years. I actually used `taskset -c` just recently, when I was running lots
by pjungwir 10y ago
Wow this list is tremendous! It's fun to still discover new commands after all these years.
I actually used `taskset -c` just recently, when I was running lots of sidekiq processes and wanted to make sure they all used different cores. It helped me get full utilization out of the box, whereas before I would frequently see some sidekiqs competing for a core while other cores sat idle.
- rdtsc 10y agoBe careful with taskset and chrt, assigning realtime priority to processes and pinning on them on CPUs might lead to un-expected behavior, priority inversion or your system locking down (say if you pgrep some kernel tasks/threads in there as well by accident, I've done before).
- pjungwir 10y agoThank you for the warning! I can see how that could happen with chrt. I can't work out how it could happen with just taskset. Are you saying to be careful when combining them? That would make sense to me. Also I can't figure out what pgrap is. Do you mean pgrep? I think you must mean something else, because I don't see what pgrep has to do with priority inversion. But it shares a manpage with pkill. . . . I don't do real-time work, but I've always been curious to know more about it. And priority inversion seems like an interesting and challenging problem.
- rdtsc 10y ago> Also I can't figure out what pgrap is. Do you mean pgrep? Sorry meant pgrep. > I don't see what pgrep has to do with priority inversion. Grepping processes doesn't have anything to do with priority inversions and locking your system. But grepping processes then setting them to realtime priority sched_fifo 99 or could wreck havok > I don't do real-time work, but I've always been curious to know more about it. And priority inversion seems like an interesting and challenging problem. It can be fun. It is kind of a separate world on its own. Interestingly most of the popular OS-es by default are tuned for throughput not low latency. So configuring and getting everything just right is an interesting challenge (sometimes involving applying kernel patches, although lately that might not be necessary as some have been mainlined).