On Jan 14, 2008 9:27 AM, Andreas Kahari <[EMAIL PROTECTED]> wrote: > It is not quite the same because a process, even running at niceness > level 20, will grab as much CPU as it can (unless it has to wait for > data). > > What I mean is what I wrote in my first email: "For example, I would > want the build of the qt4 port to use a maximum of 25% of the > available CPU, leaving the CPU 75% idle if nothing else is happening > on the machine." >
This is impossible in OpenBSD, and afaik it's also impossible in any other *nix. Just curious: why would you want the cpu to stay 75% idle when nothing else is running? What you're specifically asking for is impossible, but I believe what you want is possible (and quite common). > Again, maybe no-one has these kind of requirements in real life? Some of us have some very similar requirements, but we accomplish them differently. For example, to keep firefox from bringing my box to a crawl, I'll usually run it with a priority (nice) much lower than normal. When I'm not doing anything else, firefox still uses nearly 100% of the cpu, but that's only because *nothing* else is running. When I alt-tab over to an xterm and kick-off a large compile (or something of the sort), the build job will then eat up most of the cpu and firefox will be reduced to only a few percent. Bottom line: firefox doesn't slow anything else down (at least not too much), since it has a lower scheduling priority. Good use of nice(1) and renice(8) are what allows one to run processes that do not interfere (too much) with other processes, which is what I believe you are wanting. Apologies if I misunderstood you. -ryan

