I'm using ghostscript to render some documents on-the-fly on the server. We do about one single render per week, which isn't very frequent.

Unfortunately, that single ghostscript render is rather CPU intensive and lasts for 15 seconds. Ok, you may say that 15 seconds per week aren't a lot...

but speed isn't of the essence here, thus i don't mind lowering the process priority to idle. That could make the render last twice or more than before but as i mentioned we aren't in a hurry and i'd like to let the server do more important things.

phew.. now to the question:

is it possible to run "nice -n 19 gs <params>" under PHP and actualy work? Will the server allow me to use nice to lower the priority?

Is there a better way to do this?