Limiting CPU on some processes on web server

Polytropon freebsd at
Wed Mar 11 13:50:02 UTC 2015

On Wed, 11 Mar 2015 13:42:32 +0000, opendaddy at wrote:
> On 11. mars 2015 at 1:04 PM, "Polytropon" <freebsd at> wrote:
> >
> >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.
> >
> Thanks, will give that a go.
> Any idea how it compares to though?

The main differnce in functionality is that ulimit -t defines
the limit as time, whereas cpulimit defines it as percentage
of CPU resources used.

Another difference is that ulimit comes with FreeBSD's default
scripting shell, whereas cpulimit is a Linux program that has
to be compiled from source, after porting it, of course. :-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list