Re: mod_autoindex is hogging my CPU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 12, 2010 at 10:07 PM, Robert Dahlem <Robert.Dahlem@xxxxxxx> 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@xxxxxxxxxxxxxxxx
>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>

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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux