httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50002] New: Restart with many vhosts taking forever [patch]
Date Sat, 25 Sep 2010 09:04:13 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50002

           Summary: Restart with many vhosts taking forever [patch]
           Product: Apache httpd-2
           Version: 2.2.16
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: andrew@cloudaccess.net


Created an attachment (id=26073)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26073)
Patch that kind-of fixes this issue

Hello,

I've noticed that after adding 10 000 vhosts or more, Apache is taking
abnormally long time to restart. I've ran oprofile when restart was running and
here is where it spent 94% of its time:

http://gdr.pastebin.pl/28191

It was looking for the last non-null element of a leaf list in directive tree. 

Please note that I know that the patch I'm proposing probably isn't applicable
to mainline source, it's more that I want to indicate that there is a problem.
Anyway, patch description follows:

Because changing the tree structure to some else would break compatibility with
modules, I've decided to address it by extending ap_directive_t with an extra
field, "last".

In the first leaf on a given level, leaf->last keeps a pointer to last known
non-null element. It may not be the last non-null element in that list, but
it's still closer to the end than first element.

It decreased restart time from minutes to several seconds (6 secs for 30k
vhosts).

If you would rather browse source than read patch, it's at
http://github.com/gjedeer/httpd

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message