httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nilesh Govindarajan <li...@itech7.com>
Subject Re: [users@httpd] mod_autoindex is hogging my CPU
Date Fri, 12 Mar 2010 17:00:25 GMT
On Fri, Mar 12, 2010 at 10:07 PM, Robert Dahlem <Robert.Dahlem@gmx.net> wrote:
> Hi,
>
> my http server has a directory with 250+ subdirectories. There is no
> index.html, so mod_autoindex does the job. A reload takes about 40
> seconds on a Xeon E3110 with 3 GHz, meanwhile one core is hit with 100%
> load by a process named httpd2-prefork.
>
> That is way. too. slow. :-)
>
> The system runs openSUSE 11.0, the RPM is apache2-2.2.8-28.8.
>
> The relevant parts of the configuration are:
>
> =================================================================
> IndexOptions +FoldersFirst
> Options None
> <Directory />
>        AuthDBMType DB
>        AuthDBMUserFile /www/auth/userbase_dbm
>        AuthzDBMType DB
>        AuthDBMGroupFile /www/auth/userbase_dbm
>        Require valid-user
> </Directory>
>
> DocumentRoot /www/htdocs
> <Directory "/www/htdocs">
>        Options +FollowSymLinks
> </Directory>
>
> <Directory "/www/htdocs/transfer">
>        Options +Indexes
>        Require group myadmin
>
>        # FIXME: shall prevent users to put an index.html
>        # into a subdirectory which will be displayed by
>        # members of group myadmin.
>        # Need to find a better way to do this.
>        DirectoryIndex ..........
> </Directory>
> =================================================================
>
> I attached an strace of all the things httpd2-prefork does for each
> subdirectory.
>
> I looks like a lot of the load comes from reading userbase_dbm over and
> over (8 times for each subdirectory). If that's correct: is there a way
> to get httpd to cache the contents of AuthDBMUserFile/AuthDBMGroupFile?
>
> Regards,
>        Robert
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

If a file is accessed frequently, the kernel automatically caches it.
But this doesn't seem to work in your case (maybe SuSe has disabled it
?????).

Another option is that, you run a script which will generate an
index.html periodically as per the change frequency.

-- 
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message