Bug 45356 - ab: optionally reduce resource usage (qsort and memory)
Summary: ab: optionally reduce resource usage (qsort and memory)
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: support (show other bugs)
Version: 2.5-HEAD
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on: 45355
Blocks:
  Show dependency tree
 
Reported: 2008-07-07 11:07 UTC by Rainer Jung
Modified: 2008-07-07 11:10 UTC (History)
0 users



Attachments
Use incremental statistics for min/max/total (15.63 KB, patch)
2008-07-07 11:08 UTC, Rainer Jung
Details | Diff
Add "-Q" to disable qsort() (6.58 KB, patch)
2008-07-07 11:09 UTC, Rainer Jung
Details | Diff
Add '-s' to disable keeping all request data in memory (3.91 KB, patch)
2008-07-07 11:09 UTC, Rainer Jung
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Jung 2008-07-07 11:07:17 UTC
1) qsort() CPU usage

At the end of a run, ab uses qsort() a couple of times to sort result data. This is only needed if one wants to get confidence data, or percentile data.

Modern machines easily handle millions of requests in a very few minutes. The qsort() processing time at the end of the run gets to long for such big numbers.

Add a flag to disable qsort runs (automatically also disables confidence and percentile data, since they rely on sorting the request data).

2) memory usage

ab saves detail data for each request in memory during the run. Again for huge numbers of requests, this gets expensive.

Add a flag to disable request data saving. All statistics, that are available via incremental computations still get produced (min/max/mean/total).

All patches are based on the final result of the patches in issue 45355.

https://issues.apache.org/bugzilla/show_bug.cgi?id=45355

I can provide patches against trunk, but 45355 makes the changes nicer.
Comment 1 Rainer Jung 2008-07-07 11:08:46 UTC
Created attachment 22232 [details]
Use incremental statistics for min/max/total
Comment 2 Rainer Jung 2008-07-07 11:09:13 UTC
Created attachment 22233 [details]
Add "-Q" to disable qsort()
Comment 3 Rainer Jung 2008-07-07 11:09:48 UTC
Created attachment 22234 [details]
Add '-s' to disable keeping all request data in memory