apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Holsman <I...@Holsman.net>
Subject Re: routines for fetching load average?
Date Wed, 11 Feb 2004 21:03:40 GMT
SE Toolkit (http://www.setoolkit.com/) holds the promise of doing this 
in a multi platform manner, but besides from some very basic things, I 
don't think there is a 1:1 mapping in what metrics a kernel/OS grabs.

The other problem with grabing performance metrics is that instant 
measurements can be misleading, your better off with a method which can 
collect them over a time period and agregate them.

have you considered running a seperate deamon/cron job which does the 
collection/aggregation for you and sticks the result into a 
file/sharedmem (ie..
critical, warning, ok) and have you module use that?

then you can get really sophisticated on your more popular systems, and
use cpu% on the machines you can't get anything else out of.

Bill Stoddard wrote:
> Ben Laurie wrote:
>> Bill Stoddard wrote:
>>> Rodent of Unusual Size wrote:
>>>> Rodent of Unusual Size wrote:
>>>>> would anyone have any thoughts about the idea of adding an
>>>>> api to obtain the system load average?  i ask because i need
>>>>> it for an httpd module i'm writing, and i've now got code
>>>>> for linux, freebsd, os x, sunos, and t64u..
>>>> no thoughts, uh.
>>> load average is nice but it seems rather specialized and it doesn't 
>>> really fit anywhere in apr[-util] that I see.  load average is one 
>>> performance metric; I can see where it might be useful to have a 
>>> common interface for collecting all sorts of performance metrics. For 
>>> example, if Apache is being used as a load balancer, you could 
>>> collect performance state metrics from the servers being load 
>>> balanced, feed that info back to the apache load balancer (on an HTTP 
>>> response header field, via a special purpose HTTP POST request or out 
>>> of band) and use it in your load balancing/routing algorithms.
>> Errr - mod_backhand?
> Yes,like mod_backhand. mod_backhand is a load balancer that uses 
> feedback from the server(s) it is load balancing. The types of 
> performance metrics that can be APR'ized is quite large: memory usage, 
> memory usage characteristics of specific applications, memory 
> utilization of different aspects of different applications ('aspect' as 
> in 'aspect oriented programs'), CPU usage for same, data arrival and 
> departure rates, TCP layer performance (lost packet rate, thru-put, 
> etc), application response time, relative capability of servers being 
> load balanced (ie, CPU speed, bus speed, memory access speed, etc), blah 
> blah... the list is virtually endless.
> My point: The range of performance metrics that may be of interest to, 
> say, mod_backhand suggests it might be interesting to create a dedicated 
> APR subproject for these types of APIs if we can forsee now that we will 
> be adding more than just load average (count me as interested in such a 
> project). I see goodness in adding a load average API to APR. However, 
> aggressively going for a full suite of performance metric APIs would add 
> bloat to APR, most of which would not be particularly useful to the 
> majority of the APR user community.
> Bill

View raw message