Re: process priorities and performance

2002-08-21 Thread James G Smith

Jim Helm [EMAIL PROTECTED] wrote:
Everything I've read as an SA (for Solaris at least - though I would
expect the other *nices to be similar) was to never set a user space
(non O/S) process to less than -15.  Other than that, it's another of
those YMMV, measure before and after, and if it helps great.  Trying to
second guess process schedulers is a tricky business though, and you
really need to intimately know how your system behaves before trying it.

 -Original Message-

 Alexey Zvyagin has suggested a use of Unix process priorities 
 to improve 
 the performance of the web services during the peak hours:
 
 Alex writes:
 -

 [snip]

 The CPU priorities help to handle an increased traffic on the 
 overloaded 
 server.
 -

I think the key here is the fact that the system is
overloaded/overcommitted.  Too many processes are competeing for
CPU.

Putting my SA hat on, I would say the processes need to be split
across multiple pieces of hardware or a new machine needs to replace
the current system.  That's the only real long-term solution for a
system in this state.

The priorities as described help set a relative importance between
the processes--the front-end is more important than the database with
the larger server processes in the middle.  This is not
unreasonable.  But a serious solution to the problem of an overloaded
system is to put in more system.  The priorities might be helpful for
the few minutes/hours/days needed to get the new hardware on the
floor.

Imho, a web server should be designed for the expected peak normal
usage plus a fudge factor thrown in for safety and multiplied by a
small integer greater than one for growth (I'm optimistic).

Conclusion of my thoughts: putting in a blurb about priorities being
able to set relative importance of processes is fine, but don't cast
it as a solution (just as swap space is not a solution to constrained
memory).  It's a bit of a band-aid that can help until the problem
can be fixed.
-- 
James Smith [EMAIL PROTECTED], 979-862-3725
Texas AM CIS Operating Systems Group, Unix



RE: process priorities and performance

2002-08-20 Thread Jim Helm

Sorry for the late reply - been away for a bit.

Everything I've read as an SA (for Solaris at least - though I would
expect the other *nices to be similar) was to never set a user space
(non O/S) process to less than -15.  Other than that, it's another of
those YMMV, measure before and after, and if it helps great.  Trying to
second guess process schedulers is a tricky business though, and you
really need to intimately know how your system behaves before trying it.

--Jim 

 -Original Message-
 From: Stas Bekman [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, August 06, 2002 9:55 PM
 To: [EMAIL PROTECTED]; Alexey Zvyagin
 Subject: process priorities and performance
 
 
 Alexey Zvyagin has suggested a use of Unix process priorities 
 to improve 
 the performance of the web services during the peak hours:
 
 Alex writes:
 -
 The Unix priorities help to improve perfomance :
 
 The MySQL server has a -20 Unix priority:
 
 /usr/bin/nice -n -20 /usr/local/bin/safe_mysqld --user=mysql
 
 The backend apache server has the -10 priority:
 /usr/bin/nice -n -10 /usr/local/apache_new/bin/apachectl 
 start  /dev/null
 
 The frontend apache server has the -5 priority
 /usr/bin/nice -n -5 /usr/local/accel/bin/apachectl start  /dev/null
 
 The CPU priorities help to handle an increased traffic on the 
 overloaded 
 server.
 -
 
 Has any of you experimented with this technique and found it 
 useful? If 
 you do we could add the tip to the guide's performance 
 chapter. But we 
 need some meat to have a useful section.
 
 Thanks.
 
 __
 Stas BekmanJAm_pH -- Just Another mod_perl Hacker
 http://stason.org/ mod_perl Guide --- http://perl.apache.org
 mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
 http://modperlbook.org http://apache.org   http://ticketmaster.com