Limiting CPU on some processes on web server
Polytropon
freebsd at edvax.de
Wed Mar 11 13:13:57 UTC 2015
On Wed, 11 Mar 2015 12:26:56 +0000, opendaddy at hushmail.com wrote:
> Hi!
>
> I run this web app that depends on ImageMagick to process images and ffmpeg to process videos. These processes, unfortunately, consume 100% of my CPU, rendering my web app unusable (gateway timeout).
>
> Tried `nice -n 19` but to no avail.
>
> What other options do I have?
You can try ulimit. See "man sh" for ulimit parameters,
for example:
-t time
The maximal amount of CPU time to be used by each
process, in seconds.
There are other restrictions you can apply, like memory
locking or simultaneous processes.
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list