Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I run a game server. Every 12 hours or so we have to generate a map of the server for our website. The process takes about 20 minutes and burns the CPU hard the entire time, which lags my game server. Booo.

I've already got my game server running at niceness -20, and the generator running at 19, but my game server still seems to be lagging. Is there anything else I can do to limit the CPU time the generator can eat up? There's no tight schedule for the generator, so it's fine if it takes forever as long as it's not lagging the game server the entire time.

share|improve this question
It may be telling if you can give us a description of what this generator does. If it is a script that runs other commands, running the script with lower priority may not give the expected result. If for instance, you're running a script which launches some kind of search that indexes to a flat file, it'll likely be necessary to go through this script and see if it launches anything - and adjust the script so that those processes are run in lower pri too. – sandroid Aug 6 '11 at 9:41
up vote 3 down vote accepted

cpulimit can help. Notice that limits are expressed in percentage, not in cpu time.

share|improve this answer

Oh, minecraft. I shut my server down a while ago. So much of a relief. Maybe run two servers, and when you need to generate a new map, switch the players to the other one with DNS or NAT.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.