3 ms·
You can do it on one processor with a process/thread scheduler. This is what makes multitasking possible in general.
by lupire 6y ago
You can do it on one processor with a process/thread scheduler. This is what makes multitasking possible in general.
- nicoburns 6y agoWell yes, but presumably this impacts responsiveness. The whole point of this strategy is to keep cores free for interactive tasks.
- mnw21cam 6y agoThis is extraordinarily basic stuff. We knew how to do this kind of multitasking, with priorities, back in the 80s (or earlier). Yet people still don't understand it. As an example, a while back I ran a multi-threaded process on a shared work server with 24 cores. It used zero I/O and almost no RAM, but had to spend a couple of days with 24 threads to get the result. I ran it inside "chrt -i", which makes Linux only run it when there is absolutely nothing else it could do. I had someone email and complain about how I was hogging the server, because something like 90% of the CPU time was being spent on my process. That's because their processes spent 90% of their time waiting for disc/network. My process had zero impact on theirs, but it took some explaining.
- StavrosK 6y agoThat's a useful command to know, thanks! However, shouldn't `nice` be handling that sort of stuff? Do you know why there are two commands for the same thing (as far as I can see)?
- mnw21cam 6y agoI would love to know why nice doesn't do this, and why top/ps doesn't show something more sensible when you do.