www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject Re: general/1428: Increasing number of non-IP virtual hosts drastically increases memory demands (fwd)
Date Tue, 18 Nov 1997 22:00:02 GMT
The following reply was made to PR general/1428; it has been noted by GNATS.

From: Marc Slemko <marcs@znep.com>
To: Apache bugs database <apbugs@apache.org>
Cc:  Subject: Re: general/1428: Increasing number of non-IP virtual hosts drastically increases
memory demands (fwd)
Date: Tue, 18 Nov 1997 14:43:08 -0700 (MST)

 ---------- Forwarded message ----------
 Date: Tue, 18 Nov 1997 16:28:32 -0500
 From: Brian Atkins <brian@NS.hypermart.net>
 To: Marc Slemko <marcs@znep.com>
 Subject: Re: general/1428: Increasing number of non-IP virtual hosts drastically increases
memory demands
 
 Marc Slemko wrote:
 > 
 > On 18 Nov 1997, Brian Atkins wrote:
 > 
 > >  A followup on this critical bug: The same behavior has been
 > >  observered in 1.3b2. Both grow to over 50MEGs of malloc'ed
 > >  mem when using 1250 or so non-IP virtual hosts. After about
 > >  that many, neither of them will even start up (even with all
 > >  shell limits unlimited), failing with the error:
 > >  "Ouch!  malloc failed in malloc_block()"
 > 
 > Most of that memory is shared between processes on any reasonable OS, ie.
 > you only have one copy of it.  Many systems, however, still expect you to
 > have enough swap to allocate swap so that you would have enough if they
 > were all different.
 > 
 > >
 > >  As long as this problem remains, the promise of non-IP hosting
 > >  will not be realized, and ISPs will remain shackled to having
 > >  a small number of virtual domains per physical NIC/server.
 > >  Steps should be taken to fix the problem, and to allow Apache
 > >  to host a minimum of 10,000 non-IP domains.
 > 
 > Say you needed 2k of data structures for each virtual domain.  That is
 > perfectly reasonable.  Then you will still need 20 megs per process for
 > 10000 non-IP virtual hosts.  You are likely using it in a very
 > specialized application: you probably have nearly identical config
 > settings for each vhost.  There is going to be overhead per virtual host.
 > You would need to modify Apache specifically for your setup if you wanted
 > to
 
 Well, I know a little C but am by no means good enough to modify
 the Apache source... I really don't see where all the mem is going
 though- we have very minimal virtual host definitions, just a
 server name, IP, document root, and a cgi-bin scriptalias. Seems
 like all that together would be less than 500 bytes?
 
 > 
 > A virtual server is just that: a virtual server, configurable nearly as
 > much as the main server.  That takes overhead.  Hostnames aren't really
 > good substitutions for directories.
 
 Well, would it be possible to create something like "lite" virtual
 hosts that could be a lot more memory efficient?
 
 > 
 > You may be able to scrap all the vhosts, keep the hostnames, then use
 > mod_rewrite to internally rewrite user.domain to domain/user or
 > domain/~user or whatever.  Would have to think about that one.
 
 That really would be unacceptable...
 
 > 
 > There are a few more things to be said about this WRT how copy on write is
 > working in this situation, how it would be nice if it worked, and what
 > Apache could do to work around it, but I don't have time right now.  I
 > will comment more later.
 
 I'd appreciate any help or further advice you might have. Thanks
 -- 
 The future has arrived; it's just not evenly distributed.
                                                        -William Gibson
 ______________________________________________________________________
 Visit Hypermart at http://www.hypermart.net for free virtual hosting!
 

Mime
View raw message