# Limit CPU and other resources while port build



## surlyjake (Feb 4, 2009)

Building my ports on a 500mhz sparc processor takes A LOT of time, and will usually unbearably slow down my webserver while the new builds takes place. Is there any way to tell the make command to give itself a low priority so that it doesn't interrupt the other operations on the server?


----------



## ale (Feb 4, 2009)

nice(1)


----------



## kamikaze (Feb 4, 2009)

Nice has no noticeable effect on FreeBSD. As far as I understand from past mailing list discussions about scheduling, the schedulers don't give it a lot of credit.

What you can do is impose limits in your login.conf. But maybe that should be done in a jail. I do not know the consequences of imposing such limits on the root user.


----------



## surlyjake (Jun 3, 2009)

*nice works!*

Running 'nice +20 make buildworld' did have a noticeable afect on my last update from 7.1 to 7.2.the server was slower, but much better than without it.


----------



## ale (Jun 3, 2009)

I'm glad it helped


----------



## richardpl (Jun 3, 2009)

rtprio(), idprio()


----------



## bsdvm (Jun 3, 2009)

*Limiting CPU utility*

I used to limit CPU resources on Linux boxes with cpulimit utility.
I wonder if there is something similar to it for BSDs..


----------



## richardpl (Jun 4, 2009)

It looks overall simplistic and use renice and procfs.
It should be easy but not trivial to port it.


----------

