User: Password:
|
|
Subscribe / Log in / New account

Interactive versus batch processes

Interactive versus batch processes

Posted Dec 9, 2010 14:34 UTC (Thu) by epa (subscriber, #39769)
Parent article: Group scheduling and alternatives

Con Kolivas's suggestion makes sense, and is mostly orthogonal to group scheduling. Clearly, the requirements for 'gcc' or 'tar' are quite different to those for interactive processes. From gcc's point of view it matters little whether it gets a second of CPU time in a single lump and is then suspended for a whole second. Throughput is important, latency is not. Even a simple flag for 'this is a batch process' would work.


(Log in to post comments)

Interactive versus batch processes

Posted Dec 9, 2010 16:16 UTC (Thu) by sync (guest, #39669) [Link]

> Even a simple flag for 'this is a batch process' would work.

Already exists (since 2.6.16): SCHED_BATCH
See sched_setscheduler(2), chrt(1)

Interactive versus batch processes

Posted Dec 9, 2010 18:15 UTC (Thu) by walters (subscriber, #7396) [Link]

Okay, so figuring out the shell script usage of "chrt" was totally not obvious (the man page desperately needs examples): But so, here's the answer if you want your compile jobs to not take over the machine:

chrt --idle 0 ionice -c 3 make -j 64

Interactive versus batch processes

Posted Dec 10, 2010 14:51 UTC (Fri) by nix (subscriber, #2304) [Link]

-j 64 seems likely to slow your compiles down due to cache thrashing and/or simple swapping. -j (num of cores + a few) is generally recommended.

Interactive versus batch processes

Posted Dec 10, 2010 15:18 UTC (Fri) by walters (subscriber, #7396) [Link]

Right; actually, what I use is a little build tool "metabuild" here:

http://fedorapeople.org/gitweb?p=walters/public_git/homeg...

I picked a high number to emphasize the point basically, but yes, one needs to pick a good -j value.

make -j level

Posted Dec 10, 2010 20:59 UTC (Fri) by giraffedata (subscriber, #1954) [Link]

And if you have an exceptionally slow filesystem, also multiply by the expansion factor (single thread total time / CPU time). One one system I use, with a single CPU, I found -j6 gave minimum elapsed time.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds