httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cliff Woolley" <>
Subject Re: [PATCH] vhost hostname in scoreboard not useful when using
Date Tue, 04 Jan 2000 22:39:42 GMT
>>> Jim Jagielski <> 01/04/00 04:57PM >>>
>it's because (usually) they have a lot of vhosts or want a
>simpler conf file or want on-the-fly activation, with the
>end goal being a leaner faster server. And string copies don't
>help that :)

Fair enough.  But you're already doing string copies for the client
information in the same block of code... so you're not gaining much at
all as far as "faster" goes.  By using mod_vhost_alias in the first
place you've already saved yourself a *lot* of memory by not having all
those vhost structs floating around.  A few extra bytes per scoreboard
entry only adds up to a KB or so at the most, total, which is nothing
compared to standard NameVirtualHost-style virtual hosts in the same
situation, so I don't think "leaner" is hurt much by this change. 
Besides, IMHO the real advantage to mod_vhost_alias (besides saving the
multiple megabytes of memory required for thousands of vhost records,
which you're still saving) is in the ease of configuration, which is
again not harmed.

I would say "well, we'll just cache one copy of the hostname for each
new virtual host and have the scoreboard point to that", but you then
lose all of the benefits I just mentioned.

I think a few bytes of ap_cpystrn per request is a very small price to
pay for useful status displays, personally.  Assume you were an ISP that
had a thousand mass virtual hosts... would you want to have mod_status
report the same vhost name for every request, regardless of which
logical host it actually got served by?  I think not.  It makes
mod_status pretty much useless.

Of course, using the vhost record's hostname works perfectly well as
long as you're not using mod_vhost_alias... maybe we should compromise
and allow a directive to turn on "detailed hostname reporting"?  That
way, we only populate the ss->hostname if the user wants us to.  People
who either don't use mod_vhost_alias or who just plain don't care about
mod_status's output wouldn't be penalized by keeping that extra copy of
the hostname lying around.  But that seems like a terrible complication
to me that is completely unjustified simply to save a copy of <= 33
bytes per request.  <shrug>

Just my $0.02.


View raw message