PacketFence
Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001204PacketFenceperformancepublic2011-04-04 17:502011-10-25 09:01
Reporterobilodeau 
Assigned Toobilodeau 
PrioritynormalSeverityminorReproducibilityrandom
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9.0 
Target Version2.2.0Fixed in Version2.2.0 
Summary0001204: Dynamic apache configuration based on system resources
DescriptionPacketFence runs on a lot of different systems out there and even though we have minimum hardware requirements we know that it runs in production from simple P3 with 1Gb of RAM (below our specs) up to dual octo-cores with 24Gb of RAM.

Our aging default apache configuration has not been re-evaluated since we've switched to mod_perl (a change which implied a dramatic performance gain at the cost of keeping more stuff in memory).

Lately, while running a 700 users registration sprint in an hour or so, we saw the consequence of our bad apache defaults. Apache spawned more childs than the memory could handle and the system started to swap which killed the box.

When I started to consider a fix I've quickly realized that we will need to dynamically adjust the number of childs based on system memory. A fixed configuration would have been over-utilizing modest hardware and under-using more capable systems.

So what I'll do is we'll check for an average memory consumption per thread in the systems we have access to and build a formula that will determine how to adjust httpd.conf's MaxClients, StartServers and MinSpareServers statements.
Additional InformationNeed to think of:
x86 vs x86_64

ps -eo rss,cmd --sort -rss | less
TagsNo tags attached.
fixed in git revision
fixed in mtn revision72f89c1e24c816eb856dfe0e829f02b9aa90d6ed
Attached Files

- Relationships

-  Notes
(0002019)
obilodeau (reporter)
2011-04-08 13:55

After some discussions / research:

MaxClients = (total ram - (total ram x 0.25 + 300)) / 50
with a hard limit of 256.

StartServers = MaxClients / 2
MinSpareServers = MaxClients / 4
(0002024)
obilodeau (reporter)
2011-04-11 14:57

implemented as discussed earlier

- Issue History
Date Modified Username Field Change
2011-04-04 17:50 obilodeau New Issue
2011-04-04 17:50 obilodeau Status new => assigned
2011-04-04 17:50 obilodeau Assigned To => obilodeau
2011-04-06 15:29 obilodeau Additional Information Updated
2011-04-08 13:55 obilodeau Note Added: 0002019
2011-04-11 14:57 obilodeau mtn revision => 72f89c1e24c816eb856dfe0e829f02b9aa90d6ed
2011-04-11 14:57 obilodeau Note Added: 0002024
2011-04-11 14:57 obilodeau Status assigned => resolved
2011-04-11 14:57 obilodeau Fixed in Version => trunk
2011-04-11 14:57 obilodeau Resolution open => fixed
2011-05-04 11:33 obilodeau Fixed in Version trunk => 2.2.0
2011-05-04 11:40 obilodeau Status resolved => closed
2011-10-25 09:01 obilodeau Target Version +1 => 2.2.0


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker