getting fair share of CPU for processes

Bill Moran wmoran at potentialtech.com
Thu Aug 2 17:36:51 UTC 2007


In response to Zbigniew Szalbot <zbigniew at szalbot.homedns.org>:
> 
> Hi Bill and all,
> 
> >> So I am wondering it it is OK for me to limit the spamd user to how much
> >> CPU power it can get? I saw in the Handbook that it is possible to limit
> >> resources per user. Do you think it is a good thing to do? Will I be
> > better
> >> off limiting spamd user or will it make the situation worse because SA
> >> will/may choke? Many thanks for any advice you can give me. I really
> >> appreciate it!
> > 
> > The most typical method of handling this would be nice(1) (see the man
> > page for details).
> 
> Thanks - I will do some reading.
> 
> > Also, I'm not clear as to what problem you're tyring to solve.  High load
> > on a busy server certainly isn't a problem, so where is the problem?
> 
> The problem that sometimes, though for a very short period of time, the
> load goes above 14.

That's only a problem if services are suffering as a result.  If the box
has a lot of work to do, the load is going to go up.  If it can still
get the work done in an acceptable amount of time, and if you have enough
cooling to keep the CPUs from overheating, there's probably not a problem.

> I should have asked this first. Is this OK? I was probably unnecessarily
> concerned that the load gets too high. Of course, were it to happen for a
> prolonged time, I would take steps to improving hardware but as the load
> peaks are periodic and fairly short I thought I would make it easier for
> the machine to live :) Judging from your answer I can see I shouldn't worry
> all that much.

I wouldn't.  Sounds like your mail service hits sporadic periods of high
activity, which isn't unusual.  The ability to handle spike loads can be
complicated to plan for, but with email you're probably better off not
worrying about it.  Some emails might take a little longer to get through
(couple of seconds instead of nearly instantly) but I doubt that's an
issue.

An area where high spike loads may be a concern is (for example) and e-
commerce web site.  If you've suddenly got a really popular product, the
last thing you want is for your online shopping cart system to get slow
right when people are the most eager to buy ...

-- 
Bill Moran
http://www.potentialtech.com


More information about the freebsd-questions mailing list