Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Mar 2015 14:13:47 +0100
From:      Polytropon <freebsd@edvax.de>
To:        opendaddy@hushmail.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Limiting CPU on some processes on web server
Message-ID:  <20150311141347.1013d42d.freebsd@edvax.de>
In-Reply-To: <20150311122656.96F2020341@smtp.hushmail.com>
References:  <20150311122656.96F2020341@smtp.hushmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 11 Mar 2015 12:26:56 +0000, opendaddy@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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150311141347.1013d42d.freebsd>