The following reply was made to PR general/1428; it has been noted by GNATS.
From: Dean Gaudet <[EMAIL PROTECTED]> To: Brian Atkins <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] Subject: Re: general/1428: Increasing number of non-IP virtual hosts drastically increases memory demands Date: Tue, 18 Nov 1997 13:38:18 -0800 (PST) Yeah that's it then. Do this: <VirtualHost _default_> ServerName www.hypermart.net ... yadda yadda, the rest of your www.hypermart.net config </VirtualHost> Er, well that might not exactly be what you want, if www.hypermart.net has the same ip as the non-ip hosts. If that's the case, then with a 1.3 server what you want is to put: <VirtualHost www.hypermart.net> ... </VirtualHost> as the *first* host on that IP. With 1.2 you want it to be the *last* host on that IP. Essentially you want to arrange it so that none of those 2500 scriptaliases are inherited by the non-ip virtual hosts. Note you might also be able to use mod_rewrite to reduce the 2500 scriptaliases down to a more manageable number. Dean On Tue, 18 Nov 1997, Brian Atkins wrote: > Ooh that might be it- we have about 2500 scriptaliases in the > srm.conf. But I thought those would only apply to the main > www.hypermart.net server- at least that was what I intended. > I'm not sure what you mean about a default server ? > > Dean Gaudet wrote: > > > > Do you have many Aliases or ScriptAliases in the main server? because as > > soon as you add a ScriptAlias to a vhost you end up with a copy of all the > > main server mod_alias settings in addition to the one new setting. > > There's essentially no easy way to change this. But you can usually work > > around it by ensuring that only the minimal settings are present in the > > main server. Perhaps you can use a _default_ server to replace the main > > server for example. > > > > Dean > > > > On Tue, 18 Nov 1997, Brian Atkins wrote: > > > > > Dean Gaudet wrote: > > > > > > > > I suspect this is an issue with your config only and not a general > > > > problem. For example, I just created a server with 2000 non-IP virtual > > > > hosts and it only consumes 4.5Mb RSS, 5.3Mb SZ. Most of that is also > > > > shared between the servers... which works well on linux which has > > > > optimistic memory allocation; but probably chews swap which is never > > > > used > > > > on other operating systems (which use pessimistic allocation). > > > > > > > > If you're duplicating configuration a lot rather than inheriting it > > > > from > > > > the main server then you're bound to chew a lot of memory, and there is > > > > absolutely nothing we can do about it. Your vhosts should be extremely > > > > minimal, like this: > > > > > > > > <VirtualHost a.b.c.d> > > > > ServerName foo.com > > > > ServerAlias *.foo.com > > > > ServerAdmin [EMAIL PROTECTED] > > > > DocumentRoot /www/docroot/foo.com > > > > </VirtualHost> > > > > > > > > Dean > > > > > > That is exactly how we have it, plus one ScriptAlias for a > > > cgi-bin. Isn't there any way to make Apache more memory > > > efficient when dealing with non-IP virtual hosts? > > > -- > > > The future has arrived; it's just not evenly distributed. > > > -William Gibson > > > ______________________________________________________________________ > > > Visit Hypermart at http://www.hypermart.net for free virtual hosting! > > > > > -- > The future has arrived; it's just not evenly distributed. > -William Gibson > ______________________________________________________________________ > Visit Hypermart at http://www.hypermart.net for free virtual hosting! >
