The following reply was made to PR general/1428; it has been noted by GNATS.
From: Marc Slemko <[EMAIL PROTECTED]> To: Brian Atkins <[EMAIL PROTECTED]> Cc: Apache bugs database <[EMAIL PROTECTED]> Subject: Re: general/1428: Increasing number of non-IP virtual hosts drastically increases memory demands Date: Tue, 18 Nov 1997 13:34:02 -0700 (MST) 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 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. 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. 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.
