httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: Patch/kludge to mod_userdir
Date Thu, 30 Jul 1998 20:43:43 GMT


On Thu, 30 Jul 1998, Dave O'Neill wrote:

> 
> On Wed, 29 Jul 1998, Dean Gaudet wrote:
> 
> > Don't you see a large blowup in RAM usage under heavy load?  each child
> > has to cache the names individually... 
> 
> Not really... the cache is a linked list, with each node containing a 9
> character string (the username), pointers to previous and next nodes, and
> a pointer to a passwd struct...  it adds up to about 61 bytes per node.
> Even with 200 children running, and a 50-node cache for each, it's only
> ~600K of total cache.  
> Like I said before, though, there may be better ways to do it.  

That would be larger than the L2 ... with lots of duplicated data... it'd
really affect the machine's performance. 

Another option is to download the entire passwd table at restart time, and
then send SIGUSR1 to the server once an hour or so.  (Of course if you've
got multiple servers you want to stagger their restarts so you don't melt
the NIS server on the hour :)

> > Under high loads I'd think something like "UserDir /home/*/public_html" 
> > would be far more effective.  Then the cache is in the filesystem and
> > shared between all processes. 
> 
> It would, if we could do that...  on one of our main servers (15000
> student accounts), the home directories are located in a rather bizzare
> directory structure (/filesXX/<machinename>/YY/<username>, where XX and YY
> are two different numbers) that's completely unfindable without a
> getpwent().

Right yeah I figured something like this.  I still tend to prefer symlink
trees to deal with it... /home/a/b/abner or somesuch.  mod_rewrite handles
multilevel hashes like that pretty well. 

Dean



Mime
View raw message