You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Sam Minning <sa...@live.com> on 2010/01/11 18:19:47 UTC

[users@httpd] Appending or replacing html/text output

hello apache community,



I am using Apache 2.2, combined with PHP via fastcgi
Additionally there is mod_deflate in use, as well as gzip-compression via PHP.

I would like to append a string and/or replace the body-tag of any served
document, no matter if it is plain .html or parsed .php and no matter whether
GZIP is enabled at PHP. mod_deflate is always used by default.

The idea is to replace the closing body-tag of any document and if there is none
found, to append one, with some additional text.


I have tried several modules, e.g. mod_substitute or similar, but none was
able to fit my needs, mostly not supported compression from mod_deflate or
gzip caused problems, so I was unable to implement this at all.

Maybe there are some modules, even unofficial ones, out there I do not know
of, which could solve this issue. Any ideas about such modules or any suggestions
on how to accomplish this?


thanks very much in advance,
Sam

 		 	   		  
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009

RE: [users@httpd] Re: Apache vs LiteSpeed

Posted by Oliver Schoenborn <sc...@cae.com>.
> From: LuKreme [mailto:kremels@kreme.com]
> Sent: January 15, 2010 11:45 AM
> 
> On 15-Jan-2010, at 09:29, Jarrod Slick wrote:
> > I'm curious -- why do you think that the results will be
> inconsistent?  If anything I would be inclined to think that using
> localhost would improve consistency as extraneous variables like
> network congestion at the time of testing would not be present.
> 
> 
> Are all your webpages going to be served only to localhost users? If
> not, then the test is completely invalid and only serves to show how
> the servers respond in a very narrow and very specific and largely
> useless setup that does not reflect the real world use in any
> meaningful way.
> 
> Sure, it's nice to think that 'eliminating network congestion' will
> make the servers serve 'faster', but faster in an artificial setup does
> not imply actual speed in a real world installation.

I don't agree. The OP wants to compare the speed of two applications. The network congestion (for instance) is extraneous to those applications. Ie how fast they can accept, process and respond to a request has nothing to do with congestion -- congestion affects how fast the network can transport the response to the user. If you run the two apps simultaneously over long enough period of time, then the impact "congestion", available bandwidth, and other extraneous factors will be the same for both apps and hence will appear as a common denominator that can be thrown out. 

I think that for the OP's purpose it is perfectly valid and sensible to use localhost, assuming the host isn't in use by other users/server apps (but again this would just lead to a common offset for the timings). Why complicate your testing? throw it out from the start.

Oliver


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Apache vs LiteSpeed

Posted by Jarrod Slick <ja...@e-sensibility.com>.
On Jan 15, 2010, at 10:44 AM, LuKreme wrote:
> Run thousands of test across multiple connections from multiple  
> sources for each server if you want to see what the performance is  
> ACTUALLY like.
>
Unfortunately multiple sources is impractical for me unless you want  
to donate some hardware.  That said, I think I can muster an  
additional 2x Quad machine to be the client on which the benchmarking  
tool resides.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Apache vs LiteSpeed

Posted by LuKreme <kr...@kreme.com>.
On 15-Jan-2010, at 09:29, Jarrod Slick wrote:
> I'm curious -- why do you think that the results will be inconsistent?  If anything I would be inclined to think that using localhost would improve consistency as extraneous variables like network congestion at the time of testing would not be present.


Are all your webpages going to be served only to localhost users? If not, then the test is completely invalid and only serves to show how the servers respond in a very narrow and very specific and largely useless setup that does not reflect the real world use in any meaningful way.

Sure, it's nice to think that 'eliminating network congestion' will make the servers serve 'faster', but faster in an artificial setup does not imply actual speed in a real world installation.

Run thousands of test across multiple connections from multiple sources for each server if you want to see what the performance is ACTUALLY like.

-- 
'They think they want good government and justice for all, Vimes, yet what is it they really crave, deep in their hearts? Only that things go on as normal and tomorrow is pretty much like today.' --Feet of Clay


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Apache vs LiteSpeed

Posted by LuKreme <kr...@kreme.com>.
On 15-Jan-2010, at 12:38, Scott Gifford wrote:
> I think using a LAN/VLAN connection would be a fair measure.  You could also
> consider running the tests as instances on Amazon EC2, which will let you
> lease a small pool of servers for a few hours for $20 or so.


That's a good idea. I'd forgotten about EC2.

-- 
Im finding's you'r mis'use of apostrophe's disturbing.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache vs LiteSpeed

Posted by Scott Gifford <sg...@suspectclass.com>.
On Fri, Jan 15, 2010 at 12:08 PM, Jarrod Slick <ja...@e-sensibility.com>wrote:
[ ... ]

> And another question: how would you do it differently?  Sure, in an ideal
> world I could assemble my own botnet and then blast my corporate network
> with a gigabit of distributed traffic multiple times for each webserver --
> but obviously in the real world that's not going to happen.


IMO it's not necessary to simulate different connections from all over the
world, but it is true that the benchmark client will consume a substantial
amount of resources, which will affect your result.  Both should be skewed
about the same, so it should be a fair comparison, but things like
"requests/sec" will not be meaningful.

Using the live Internet may cause your network connection to be the
bottleneck, too, which could give bad results.

I think using a LAN/VLAN connection would be a fair measure.  You could also
consider running the tests as instances on Amazon EC2, which will let you
lease a small pool of servers for a few hours for $20 or so.

---Scott.

[users@httpd] Re: Apache vs LiteSpeed

Posted by LuKreme <kr...@kreme.com>.
On 15-Jan-2010, at 10:34, Jarrod Slick wrote:
>>> So, I should be more specific with my question:  to the end of determining strictly which webserver is more efficient do you see any problems with this type of setup?
>> 
>> More 'efficient' I think you mean.
> 
> Is that not exactly what I said?

My quotes were meant to indicate that the 'efficient' you are testing really has nothing to do with actual efficiency.

>>> And another question: how would you do it differently?  Sure, in an ideal world I could assemble my own botnet and then blast my corporate network with a gigabit of distributed traffic multiple times for each webserver -- but obviously in the real world that's not going to happen.
>> 
>> The question you have to ask yourself is what are you wanting to test? A completely artificial metric with no real-world correlation? If so, then you're on the right track.
> 
> Instead of dancing around the issue can you please provide some suggestions?

I did provide suggestions, you said they weren't possible.


> Or do you just like to be contrary?

That too.


-- 
Well, if crime fighters fight crime and fire fighters fight fire, 
	what do freedom fighters fight? They never mention that part to 
	us, do they? 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Apache vs LiteSpeed

Posted by Jarrod Slick <ja...@e-sensibility.com>.
>
>
>> So, I should be more specific with my question:  to the end of  
>> determining strictly which webserver is more efficient do you see  
>> any problems with this type of setup?
>
> More 'efficient' I think you mean.

Is that not exactly what I said?

>
>> And another question: how would you do it differently?  Sure, in an  
>> ideal world I could assemble my own botnet and then blast my  
>> corporate network with a gigabit of distributed traffic multiple  
>> times for each webserver -- but obviously in the real world that's  
>> not going to happen.
>
> The question you have to ask yourself is what are you wanting to  
> test? A completely artificial metric with no real-world correlation?  
> If so, then you're on the right track.

Instead of dancing around the issue can you please provide some  
suggestions?  Or do you just like to be contrary?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Apache vs LiteSpeed

Posted by LuKreme <kr...@kreme.com>.
On 15-Jan-2010, at 10:08, Jarrod Slick wrote:
> On Jan 15, 2010, at 11:03 AM, Eric Covener wrote:
>> On Fri, Jan 15, 2010 at 12:00 PM, Jarrod Slick <ja...@e-sensibility.com> wrote:
>> 
>>> What about having a private VLAN between a testing machine and the apache
>>> machine.  I suppose that would solve the resource separation problem between
>>> the benchmarking tool and the web server.  Can you think of any problems
>>> with this type of setup?
>> 
>> It doesn't model the traffic real clients would generate very well,
>> unless you expect them to be on the same vlan too.
> 
> Yes, but the mission is just to see which webserver is "better" in terms of performance.

"better" in terms of what KIDN of performance? Serving web pages to real users or serving a completely artificial set of non-real world users with a completely artificial set of non-real world pages?

If this is simply an epeen contest then it's pretty worthless and no one is lily to be very interested.
 
> So, I should be more specific with my question:  to the end of determining strictly which webserver is more efficient do you see any problems with this type of setup?

More 'efficient' I think you mean. 

> And another question: how would you do it differently?  Sure, in an ideal world I could assemble my own botnet and then blast my corporate network with a gigabit of distributed traffic multiple times for each webserver -- but obviously in the real world that's not going to happen.

The question you have to ask yourself is what are you wanting to test? A completely artificial metric with no real-world correlation? If so, then you're on the right track.

-- 
I love as only I can, with all my heart


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache vs LiteSpeed

Posted by Jarrod Slick <ja...@e-sensibility.com>.
On Jan 15, 2010, at 11:03 AM, Eric Covener wrote:

> On Fri, Jan 15, 2010 at 12:00 PM, Jarrod Slick <jarrod@e-sensibility.com 
> > wrote:
>
>> What about having a private VLAN between a testing machine and the  
>> apache
>> machine.  I suppose that would solve the resource separation  
>> problem between
>> the benchmarking tool and the web server.  Can you think of any  
>> problems
>> with this type of setup?
>
> It doesn't model the traffic real clients would generate very well,
> unless you expect them to be on the same vlan too.

Yes, but the mission is just to see which webserver is "better" in  
terms of performance.  So, I should be more specific with my  
question:  to the end of determining strictly which webserver is more  
efficient do you see any problems with this type of setup?

And another question: how would you do it differently?  Sure, in an  
ideal world I could assemble my own botnet and then blast my corporate  
network with a gigabit of distributed traffic multiple times for each  
webserver -- but obviously in the real world that's not going to happen.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache vs LiteSpeed

Posted by Eric Covener <co...@gmail.com>.
On Fri, Jan 15, 2010 at 12:00 PM, Jarrod Slick <ja...@e-sensibility.com> wrote:

> What about having a private VLAN between a testing machine and the apache
> machine.  I suppose that would solve the resource separation problem between
> the benchmarking tool and the web server.  Can you think of any problems
> with this type of setup?

It doesn't model the traffic real clients would generate very well,
unless you expect them to be on the same vlan too.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache vs LiteSpeed

Posted by Jarrod Slick <ja...@e-sensibility.com>.
On Jan 15, 2010, at 10:45 AM, Tom Evans wrote:

> On Fri, Jan 15, 2010 at 4:29 PM, Jarrod Slick <jarrod@e-sensibility.com 
> > wrote:
>> I'm curious -- why do you think that the results will be  
>> inconsistent?  If
>> anything I would be inclined to think that using localhost would  
>> improve
>> consistency as extraneous variables like network congestion at the  
>> time of
>> testing would not be present.
>>
>
> There is no way you can fully load a webserver using a single instance
> of a testing tool running on the same box. For starters, the testing
> tool will end up consuming more CPU than the webserver, invalidating
> your test results.
>
> For a followup point, I would think that you would need multiple
> instances of the testing tool, running on multiple boxes, to fully
> load a server.
>
> Certainly, you would need multiple instances of ab (which is what
> LiteSpeed used to do their tests), as ab is not particularly good. A
> better tool is Apache flood, or siege, either of which will stress the
> server much harder than ab.
>
> Network congestion/latencies could also affect the test result, which
> is why you would run these tests multiple times, using a dedicated
> switch (ie not connected to anything else).
>
> Cheers
>
> Tom
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server  
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

What about having a private VLAN between a testing machine and the  
apache machine.  I suppose that would solve the resource separation  
problem between the benchmarking tool and the web server.  Can you  
think of any problems with this type of setup?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache vs LiteSpeed

Posted by Tom Evans <te...@googlemail.com>.
On Fri, Jan 15, 2010 at 4:29 PM, Jarrod Slick <ja...@e-sensibility.com> wrote:
> I'm curious -- why do you think that the results will be inconsistent?  If
> anything I would be inclined to think that using localhost would improve
> consistency as extraneous variables like network congestion at the time of
> testing would not be present.
>

There is no way you can fully load a webserver using a single instance
of a testing tool running on the same box. For starters, the testing
tool will end up consuming more CPU than the webserver, invalidating
your test results.

For a followup point, I would think that you would need multiple
instances of the testing tool, running on multiple boxes, to fully
load a server.

Certainly, you would need multiple instances of ab (which is what
LiteSpeed used to do their tests), as ab is not particularly good. A
better tool is Apache flood, or siege, either of which will stress the
server much harder than ab.

Network congestion/latencies could also affect the test result, which
is why you would run these tests multiple times, using a dedicated
switch (ie not connected to anything else).

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache vs LiteSpeed

Posted by "Tommy M. McGuire" <mc...@crsr.net>.
Jarrod Slick wrote:
> On Jan 15, 2010, at 10:25 AM, Tommy M. McGuire wrote:
> 
>> Jarrod Slick wrote:
>>>
>>> All tests will be performed on localhost.
>>
>> I did not want to comment since I am not an Apache nor LiteSpeed
>> performance expert,
>> but I rather suspect that will invalidate any results you get. At
>> least it will make it
>> much harder to get any kind of consistent results.
> 
> I'm curious -- why do you think that the results will be inconsistent? 
> If anything I would be inclined to think that using localhost would
> improve consistency as extraneous variables like network congestion at
> the time of testing would not be present.

Check Tom Evans' reply, but the basic problem would be that the test tool
would be consuming the same resources that the web server needs to use.
Ideally, you would want the server on a quiescent machine, connected to a
dedicated, otherwise quiescent network, in turn connected to the testing host
or hosts.

I wouldn't worry too much about "modeling the traffic real clients would
generate", and as long as the network has enough free bandwidth to saturate
the servers, it should be fine. But what you want to avoid is directly
perturbing the webserver processes.

-- 
Tommy M. McGuire
mcguire@crsr.net

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache vs LiteSpeed

Posted by Jarrod Slick <ja...@e-sensibility.com>.
On Jan 15, 2010, at 10:25 AM, Tommy M. McGuire wrote:

> Jarrod Slick wrote:
>>
>> All tests will be performed on localhost.
>
> I did not want to comment since I am not an Apache nor LiteSpeed  
> performance expert,
> but I rather suspect that will invalidate any results you get. At  
> least it will make it
> much harder to get any kind of consistent results.
>
>
> -- 
> Tommy M. McGuire
> mcguire@crsr.net
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server  
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

I'm curious -- why do you think that the results will be  
inconsistent?  If anything I would be inclined to think that using  
localhost would improve consistency as extraneous variables like  
network congestion at the time of testing would not be present.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache vs LiteSpeed

Posted by "Tommy M. McGuire" <mc...@crsr.net>.
Jarrod Slick wrote:
> 
> All tests will be performed on localhost.

I did not want to comment since I am not an Apache nor LiteSpeed performance expert,
but I rather suspect that will invalidate any results you get. At least it will make it
much harder to get any kind of consistent results.


-- 
Tommy M. McGuire
mcguire@crsr.net

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache vs LiteSpeed

Posted by Jorge Schrauwen <jo...@gmail.com>.
Sounds interesting,

You may also want to test things like requesting protected resources (basic,
digest)...
Maybe some other things like WebDAV (of all servers support it),...


~Jorge


On Wed, Jan 13, 2010 at 8:08 AM, Jarrod Slick <ja...@e-sensibility.com>wrote:

>
> On Jan 13, 2010, at 12:47 AM, Scott Gifford wrote:
>
> On Wed, Jan 13, 2010 at 1:31 AM, Jarrod Slick <ja...@e-sensibility.com>wrote:
>
>> Apache Users,
>>
>> As some of you may or may not know a fairly prominent commercial
>> webserver, LiteSpeed, claims to outperform even a well configured Apache
>> 2.2.x installation by orders of magnitude.  They have some internal
>> benchmarks that appear to back this up, but, being a natural skeptic, I
>> wanted to test it out for myself.  So I've agreed to pit Apache and
>> LiteSpeed (as well as a few other webservers) against one another in
>> benchmarking tests on a 2x Xeon 5520 machine.  I, and hopefully others, will
>> be configuring Apache.  LiteSpeed will be configuring their product.
>>
>
> What is the workload you are benchmarking?  Static pages, PHP/mod_perl
> code, CGI, etc.?  Is the client a benchmark tool or a browser, and where on
> the network is it relative to the server?  How are you measuring performance
> (page load times, requests/second, etc.)?
>
> -----Scott.
>
>
> Scott,
>
> I'm open to suggestions on all fronts, but as it stands we were going to do
> the following with the ab tool:
>
> -small static pages test
> -large static pages test
> -hello world php test
>
> And we were going to also benchmark a wordpress/joomla site in a more
> "real-world" load simulation test using the tool "siege".
>
> All tests will be performed on localhost.
>
> There are some more details present in the WHT thread I originally linked,
> also.
>
> Thanks,
> Jarrod
>
>

Re: [users@httpd] Apache vs LiteSpeed

Posted by Jarrod Slick <ja...@e-sensibility.com>.
> On Fri, Jan 15, 2010 at 10:56 AM, Scott Gifford <sgifford@suspectclass.com 
> > wrote:
> On Wed, Jan 13, 2010 at 2:08 AM, Jarrod Slick <jarrod@e-sensibility.com 
> > wrote:
>
> On Jan 13, 2010, at 12:47 AM, Scott Gifford wrote:
>
>> On Wed, Jan 13, 2010 at 1:31 AM, Jarrod Slick <jarrod@e-sensibility.com 
>> > wrote:
>> Apache Users,
>>
>> As some of you may or may not know a fairly prominent commercial  
>> webserver, LiteSpeed, claims to outperform even a well configured  
>> Apache 2.2.x installation by orders of magnitude.  They have some  
>> internal benchmarks that appear to back this up, but, being a  
>> natural skeptic, I wanted to test it out for myself.  So I've  
>> agreed to pit Apache and LiteSpeed (as well as a few other  
>> webservers) against one another in benchmarking tests on a 2x Xeon  
>> 5520 machine.  I, and hopefully others, will be configuring  
>> Apache.  LiteSpeed will be configuring their product.
>>
>> What is the workload you are benchmarking?  Static pages, PHP/ 
>> mod_perl code, CGI, etc.?  Is the client a benchmark tool or a  
>> browser, and where on the network is it relative to the server?   
>> How are you measuring performance (page load times, requests/ 
>> second, etc.)?
>>
>> -----Scott.
>>
>
> Scott,
>
> I'm open to suggestions on all fronts, but as it stands we were  
> going to do the following with the ab tool:
>
> -small static pages test
> -large static pages test
> -hello world php test
>
> And we were going to also benchmark a wordpress/joomla site in a  
> more "real-world" load simulation test using the tool "siege".
>
> For smaller static content that will be fetched multiple times  
> without changing, consider mod_mem_cache, which will avoid most disk  
> I/O for that content.  For larger content or content that will just  
> be fetched once or change frequently, consider enabling sendfile or  
> mmap for sending it.  For PHP, use a PHP accelerator, such as  
> eAccelerator, APC, or Zend.  For larger applications, do your best  
> to configure the different components appropriately, for example  
> with Drupal configure the static Javascript and CSS files to be  
> cached with mod_mem_cache, use the PHP accelerator for the code, and  
> if you have any large files make sure you have sendfile or mmap  
> available.  If the benchmark client will do any caching, make sure  
> expiration is configured to allow a long cache time.   
> Disable .htaccess unless you need it, so Apache doesn't have to look  
> for it.
>
> Do a dry run while running top and iostat to see where your  
> bottleneck is.  Try running Apache under strace to see what it's  
> doing at each request, and get it doing as little as possible.  If  
> it is serving a file from the memory cache or with a static mmap,  
> strace should show it making practically no system calls.
>
> If you google around for Apache benchmark tuning I'm sure you'll  
> find some other ideas and examples.
>
> Good luck!
>
> ----Scott.
>
>

On Jan 15, 2010, at 12:57 AM, Arnab Ganguly wrote:

> Basic query, is LiteSpeed an open source ? Can we write our own  
> plugins equivalent to Apache modules which will talk to LiteSpeed ?
> Thanks in advance.
> -A

Arnab,

I'm not the type to flame, but others surely will -- so don't top post.

As for the extensibility of litespeed, there very well may be ways to  
build modules for it.  It's not open source, though.

Re: [users@httpd] Apache vs LiteSpeed

Posted by Arnab Ganguly <ag...@gmail.com>.
Basic query, is LiteSpeed an open source ? Can we write our own plugins
equivalent to Apache modules which will talk to LiteSpeed ?
Thanks in advance.
-A

On Fri, Jan 15, 2010 at 10:56 AM, Scott Gifford
<sg...@suspectclass.com>wrote:

> On Wed, Jan 13, 2010 at 2:08 AM, Jarrod Slick <ja...@e-sensibility.com>wrote:
>
>>
>> On Jan 13, 2010, at 12:47 AM, Scott Gifford wrote:
>>
>> On Wed, Jan 13, 2010 at 1:31 AM, Jarrod Slick <ja...@e-sensibility.com>wrote:
>>
>>> Apache Users,
>>>
>>> As some of you may or may not know a fairly prominent commercial
>>> webserver, LiteSpeed, claims to outperform even a well configured Apache
>>> 2.2.x installation by orders of magnitude.  They have some internal
>>> benchmarks that appear to back this up, but, being a natural skeptic, I
>>> wanted to test it out for myself.  So I've agreed to pit Apache and
>>> LiteSpeed (as well as a few other webservers) against one another in
>>> benchmarking tests on a 2x Xeon 5520 machine.  I, and hopefully others, will
>>> be configuring Apache.  LiteSpeed will be configuring their product.
>>>
>>
>> What is the workload you are benchmarking?  Static pages, PHP/mod_perl
>> code, CGI, etc.?  Is the client a benchmark tool or a browser, and where on
>> the network is it relative to the server?  How are you measuring performance
>> (page load times, requests/second, etc.)?
>>
>> -----Scott.
>>
>>
>> Scott,
>>
>> I'm open to suggestions on all fronts, but as it stands we were going to
>> do the following with the ab tool:
>>
>> -small static pages test
>> -large static pages test
>> -hello world php test
>>
>> And we were going to also benchmark a wordpress/joomla site in a more
>> "real-world" load simulation test using the tool "siege".
>>
>
> For smaller static content that will be fetched multiple times without
> changing, consider mod_mem_cache, which will avoid most disk I/O for that
> content.  For larger content or content that will just be fetched once or
> change frequently, consider enabling sendfile or mmap for sending it.  For
> PHP, use a PHP accelerator, such as eAccelerator, APC, or Zend.  For
> larger applications, do your best to configure the different components
> appropriately, for example with Drupal configure the static Javascript and
> CSS files to be cached with mod_mem_cache, use the PHP accelerator for the
> code, and if you have any large files make sure you have sendfile or mmap
> available.  If the benchmark client will do any caching, make sure
> expiration is configured to allow a long cache time.  Disable .htaccess
> unless you need it, so Apache doesn't have to look for it.
>
> Do a dry run while running top and iostat to see where your bottleneck is.
>  Try running Apache under strace to see what it's doing at each request, and
> get it doing as little as possible.  If it is serving a file from the memory
> cache or with a static mmap, strace should show it making practically no
> system calls.
>
> If you google around for Apache benchmark tuning I'm sure you'll find some
> other ideas and examples.
>
> Good luck!
>
> ----Scott.
>
>

Re: [users@httpd] Apache vs LiteSpeed

Posted by Scott Gifford <sg...@suspectclass.com>.
On Wed, Jan 13, 2010 at 2:08 AM, Jarrod Slick <ja...@e-sensibility.com>wrote:

>
> On Jan 13, 2010, at 12:47 AM, Scott Gifford wrote:
>
> On Wed, Jan 13, 2010 at 1:31 AM, Jarrod Slick <ja...@e-sensibility.com>wrote:
>
>> Apache Users,
>>
>> As some of you may or may not know a fairly prominent commercial
>> webserver, LiteSpeed, claims to outperform even a well configured Apache
>> 2.2.x installation by orders of magnitude.  They have some internal
>> benchmarks that appear to back this up, but, being a natural skeptic, I
>> wanted to test it out for myself.  So I've agreed to pit Apache and
>> LiteSpeed (as well as a few other webservers) against one another in
>> benchmarking tests on a 2x Xeon 5520 machine.  I, and hopefully others, will
>> be configuring Apache.  LiteSpeed will be configuring their product.
>>
>
> What is the workload you are benchmarking?  Static pages, PHP/mod_perl
> code, CGI, etc.?  Is the client a benchmark tool or a browser, and where on
> the network is it relative to the server?  How are you measuring performance
> (page load times, requests/second, etc.)?
>
> -----Scott.
>
>
> Scott,
>
> I'm open to suggestions on all fronts, but as it stands we were going to do
> the following with the ab tool:
>
> -small static pages test
> -large static pages test
> -hello world php test
>
> And we were going to also benchmark a wordpress/joomla site in a more
> "real-world" load simulation test using the tool "siege".
>

For smaller static content that will be fetched multiple times without
changing, consider mod_mem_cache, which will avoid most disk I/O for that
content.  For larger content or content that will just be fetched once or
change frequently, consider enabling sendfile or mmap for sending it.  For
PHP, use a PHP accelerator, such as eAccelerator, APC, or Zend.  For larger
applications, do your best to configure the different components
appropriately, for example with Drupal configure the static Javascript and
CSS files to be cached with mod_mem_cache, use the PHP accelerator for the
code, and if you have any large files make sure you have sendfile or mmap
available.  If the benchmark client will do any caching, make sure
expiration is configured to allow a long cache time.  Disable .htaccess
unless you need it, so Apache doesn't have to look for it.

Do a dry run while running top and iostat to see where your bottleneck is.
 Try running Apache under strace to see what it's doing at each request, and
get it doing as little as possible.  If it is serving a file from the memory
cache or with a static mmap, strace should show it making practically no
system calls.

If you google around for Apache benchmark tuning I'm sure you'll find some
other ideas and examples.

Good luck!

----Scott.

Re: [users@httpd] Apache vs LiteSpeed

Posted by Jarrod Slick <ja...@e-sensibility.com>.
On Jan 13, 2010, at 12:47 AM, Scott Gifford wrote:

> On Wed, Jan 13, 2010 at 1:31 AM, Jarrod Slick <jarrod@e-sensibility.com 
> > wrote:
> Apache Users,
>
> As some of you may or may not know a fairly prominent commercial  
> webserver, LiteSpeed, claims to outperform even a well configured  
> Apache 2.2.x installation by orders of magnitude.  They have some  
> internal benchmarks that appear to back this up, but, being a  
> natural skeptic, I wanted to test it out for myself.  So I've agreed  
> to pit Apache and LiteSpeed (as well as a few other webservers)  
> against one another in benchmarking tests on a 2x Xeon 5520  
> machine.  I, and hopefully others, will be configuring Apache.   
> LiteSpeed will be configuring their product.
>
> What is the workload you are benchmarking?  Static pages, PHP/ 
> mod_perl code, CGI, etc.?  Is the client a benchmark tool or a  
> browser, and where on the network is it relative to the server?  How  
> are you measuring performance (page load times, requests/second,  
> etc.)?
>
> -----Scott.
>

Scott,

I'm open to suggestions on all fronts, but as it stands we were going  
to do the following with the ab tool:

-small static pages test
-large static pages test
-hello world php test

And we were going to also benchmark a wordpress/joomla site in a more  
"real-world" load simulation test using the tool "siege".

All tests will be performed on localhost.

There are some more details present in the WHT thread I originally  
linked, also.

Thanks,
Jarrod


Re: [users@httpd] Apache vs LiteSpeed

Posted by Scott Gifford <sg...@suspectclass.com>.
On Wed, Jan 13, 2010 at 1:31 AM, Jarrod Slick <ja...@e-sensibility.com>wrote:

> Apache Users,
>
> As some of you may or may not know a fairly prominent commercial webserver,
> LiteSpeed, claims to outperform even a well configured Apache 2.2.x
> installation by orders of magnitude.  They have some internal benchmarks
> that appear to back this up, but, being a natural skeptic, I wanted to test
> it out for myself.  So I've agreed to pit Apache and LiteSpeed (as well as a
> few other webservers) against one another in benchmarking tests on a 2x Xeon
> 5520 machine.  I, and hopefully others, will be configuring Apache.
>  LiteSpeed will be configuring their product.
>

What is the workload you are benchmarking?  Static pages, PHP/mod_perl code,
CGI, etc.?  Is the client a benchmark tool or a browser, and where on the
network is it relative to the server?  How are you measuring performance
(page load times, requests/second, etc.)?

-----Scott.

[users@httpd] Apache vs LiteSpeed

Posted by Jarrod Slick <ja...@e-sensibility.com>.
Apache Users,

As some of you may or may not know a fairly prominent commercial  
webserver, LiteSpeed, claims to outperform even a well configured  
Apache 2.2.x installation by orders of magnitude.  They have some  
internal benchmarks that appear to back this up, but, being a natural  
skeptic, I wanted to test it out for myself.  So I've agreed to pit  
Apache and LiteSpeed (as well as a few other webservers) against one  
another in benchmarking tests on a 2x Xeon 5520 machine.  I, and  
hopefully others, will be configuring Apache.  LiteSpeed will be  
configuring their product.

I'm a proponent of open source software and a long time admin, but I'm  
by no means a foremost expert in terms of Apache optimization.  What  
I'm looking for is some advice on how to configure Apache so that it  
gives LiteSpeed a run for its money (and hopefully wins).  So if you  
think you can help, either by giving written advice or actually  
helping to tune the apache install, please either reply to this  
message with your ideas, or reply on WHT where this challenge  
originated:

http://www.webhostingtalk.com/showthread.php?t=918355.

I hope I get some type of response on this, because I'm afraid that  
I'm not going to represent Apache very well if I end up being the only  
one to configure it.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Appending or replacing html/text output

Posted by Nilesh Govindarajan <li...@itech7.com>.
On 01/13/2010 09:36 AM, Devraj Mukherjee wrote:
> If you are using Apache 2.x then mod_substitute is your friend.
>
> 2010/1/12 Sam Minning<sa...@live.com>:
>> hello apache community,
>>
>>
>>
>> I am using Apache 2.2, combined with PHP via fastcgi
>> Additionally there is mod_deflate in use, as well as gzip-compression via
>> PHP.
>>
>> I would like to append a string and/or replace the body-tag of any served
>> document, no matter if it is plain .html or parsed .php and no matter
>> whether
>> GZIP is enabled at PHP. mod_deflate is always used by default.
>>
>> The idea is to replace the closing body-tag of any document and if there is
>> none
>> found, to append one, with some additional text.
>>
>>
>> I have tried several modules, e.g. mod_substitute or similar, but none was
>> able to fit my needs, mostly not supported compression from mod_deflate or
>> gzip caused problems, so I was unable to implement this at all.
>>
>> Maybe there are some modules, even unofficial ones, out there I do not know
>> of, which could solve this issue. Any ideas about such modules or any
>> suggestions
>> on how to accomplish this?
>>
>>
>> thanks very much in advance,
>> Sam
>>
>>
>> ________________________________
>> Windows Live: Make it easier for your friends to see what you’re up to on
>> Facebook.
>
>
>

He has clearly said that mod_substitute didn't fit his needs, so why are 
you suggesting that to him ?

-- 
Nilesh Govindarajan
Site & Server Adminstrator
www.itech7.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Appending or replacing html/text output

Posted by Devraj Mukherjee <de...@gmail.com>.
If you are using Apache 2.x then mod_substitute is your friend.

2010/1/12 Sam Minning <sa...@live.com>:
> hello apache community,
>
>
>
> I am using Apache 2.2, combined with PHP via fastcgi
> Additionally there is mod_deflate in use, as well as gzip-compression via
> PHP.
>
> I would like to append a string and/or replace the body-tag of any served
> document, no matter if it is plain .html or parsed .php and no matter
> whether
> GZIP is enabled at PHP. mod_deflate is always used by default.
>
> The idea is to replace the closing body-tag of any document and if there is
> none
> found, to append one, with some additional text.
>
>
> I have tried several modules, e.g. mod_substitute or similar, but none was
> able to fit my needs, mostly not supported compression from mod_deflate or
> gzip caused problems, so I was unable to implement this at all.
>
> Maybe there are some modules, even unofficial ones, out there I do not know
> of, which could solve this issue. Any ideas about such modules or any
> suggestions
> on how to accomplish this?
>
>
> thanks very much in advance,
> Sam
>
>
> ________________________________
> Windows Live: Make it easier for your friends to see what you’re up to on
> Facebook.



-- 
Follow me on Twitter, http://twitter.com/mdevraj

"The secret impresses no-one, the trick you use it for is everything"
- Alfred Borden (The Prestiege)

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Appending or replacing html/text output

Posted by Eric Covener <co...@gmail.com>.
2010/1/13 Sam Minning <sa...@live.com>:
> this leaves one problem at hand: mod_substitute just
> replaces content, it is unable to append it when there is
> no closing body-tag detected.

mod_sed or mod_ext_filter are other options.
-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Appending or replacing html/text output

Posted by Sam Minning <sa...@live.com>.
hello community,
hello Eric Covener,


I have just the same setup, regardless of this some sites
still do not have the replaced content. I assume this is
due to compression which is done via PHP - I have seen
this on pretty large sites (Joomla CMS and some forums),
it may be hard to determine what exactly causes this, but
still - this leaves one problem at hand: mod_substitute just
replaces content, it is unable to append it when there is 
no closing body-tag detected.

I played around with many regex, even with help from guys
in #regex irc channels, obvioulsy we either failed (mostly
causing apache to eat up 99% of RAM, there seems to be
a bug or some kind of endless loop?) or it is simply not 
supported in that fashion we tried.


kind regards,
Sam

 		 	   		  
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009

Re: [users@httpd] Appending or replacing html/text output

Posted by Eric Covener <co...@gmail.com>.
2010/1/11 Sam Minning <sa...@live.com>:

> I have tried several modules, e.g. mod_substitute or similar, but none was
> able to fit my needs, mostly not supported compression from mod_deflate or
> gzip caused problems, so I was unable to implement this at all.

You should be able to order the filters such that either
mod_substitute comes first, or if your stuff is pre-compressed outside
of the Apache filters, you can eg. SetOutputFilter
INFLATE;SUBSTITUTE;DEFLATE

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org