apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Stoddard <b...@wstoddard.com>
Subject Re: routines for fetching load average?
Date Wed, 11 Feb 2004 16:39:04 GMT
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

Mime
View raw message