You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by laredotornado <la...@gmail.com> on 2010/10/14 18:05:36 UTC

Where do files served get logged?

Hi,

I'm using Tomcat 6.0.26.  Where is it configured, or where do I look to see
what files Tomcat has served?  I'm trying to make sure Tomcat is not serving
static files that Apache can serve more efficiently.

Thanks, - Dave
-- 
View this message in context: http://old.nabble.com/Where-do-files-served-get-logged--tp29963979p29963979.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Where do files served get logged?

Posted by Pid <pi...@pidster.com>.
On 14/10/2010 17:05, laredotornado wrote:
> 
> Hi,
> 
> I'm using Tomcat 6.0.26.  Where is it configured, or where do I look to see
> what files Tomcat has served?  I'm trying to make sure Tomcat is not serving
> static files that Apache can serve more efficiently.

[I'm wincing & extending a cordial offer of some sandbags]


Getting the actual question out of the way first: you're looking for an
access log, which is (usually) defined inside the Host element, as per:

 http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Access_Log_Valve

The logs are usually found in your tomcat/logs directory.


Addressing the indirect assertion second: Tomcat can serve static files
just as efficiently as Apache HTTPD, it's an old, out-of-date belief
that it can't.

There's a distinct possibility that this thread will shortly contain a
series of messages which explain how & why...


p


> Thanks, - Dave


Re: Where do files served get logged?

Posted by Pid <pi...@pidster.com>.
On 14/10/2010 17:58, laredotornado wrote:
> 
> I haven't done any benchmarks, and I'm assuming some of the folks on this
> thread are the Tomcat developers and can speak first hand to the speed.  If
> so, I would encourage you to update the wiki ...
> 
> http://wiki.apache.org/tomcat/FAQ/Connectors
> 
> because it mentions that Apache is faster at serving static content than
> Tomcat for high-traffic sites.  - Dave

It says:

"Apache is faster at serving static content than Tomcat. But unless you
have a high traffic site, this point is useless. But in some scenarios,
tomcat can be faster than Apache httpd. So benchmark YOUR site."

If you read the rest of it, it also says (in bold):

"Tomcat can perform at httpd speeds when using the proper connector (APR
with sendFile enabled). Speed should not be considered a factor when
choosing between Apache httpd and Tomcat "


p


> Jeff Hubbs-2 wrote:
>>
>>   On 10/14/10 12:08 PM, Caldarale, Charles R wrote:
>>>
>>>> I'm trying to make sure Tomcat is not serving static
>>>> files that Apache can serve more efficiently.
>>> Why do you think httpd can serve them more efficiently?
>> I recall from reading about Slashdot's architecture some years ago 
>> (Perl/MySQL at the time) that they had separate servers running Tux for 
>> static content...
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
> 


Re: Where do files served get logged?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave,

On 10/14/2010 12:58 PM, laredotornado wrote:
> I haven't done any benchmarks, and I'm assuming some of the folks on this
> thread are the Tomcat developers and can speak first hand to the speed.

While I am not a Tomcat developer, I can speak to the performance of
Tomcat with regard to static files: if you use the APR or NIO connectors
with sendFile="true", your performance will be on par with Apache httpd.
The blocking (default) connector has pretty horrible performance,
comparably.

That being said, I have tested a variety of static file sizes, and if
you have files that are less than about 64KiB in size, it doesn't matter
what connector you use.

*I'll repeat that for emphasis: all connectors perform the same with
static files up to about 64KiB in size.*

My tests were done against Tomcat 6.0.20 and Apache httpd 2.2.11.

> If so, I would encourage you to update the wiki...
> 
> http://wiki.apache.org/tomcat/FAQ/Connectors
> 
> because it mentions that Apache is faster at serving static content than
> Tomcat for high-traffic sites.

It says that "historically, Apache httpd has been faster".
Unfortunately, it does not say that this is no longer true.

There's also another piece of this puzzle: the use of Apache httpd makes
all your dynamic requests that must be proxied to Tomcat slower. So, the
question is this: do you get more static of dynamic requests? If you get
more static requests than dynamic requests, maybe running Apache httpd
out front might make sense. If you have only a few static requests and
mostly dynamic ones, you may be optimizing 1% of your traffic and
de-optimizing 99% of it.

There is also another option: use an image server. Don't put your static
files on the same server as your (dynamic) webapp. Then, have that other
server serve those files hopefully faster.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAky3UrgACgkQ9CaO5/Lv0PC5sQCfbd9VQh10Fj93LwcTB1x4wAmg
dBkAoMQGaQUFPyntawbVDaFSt4YTThCK
=CQ2+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Where do files served get logged?

Posted by laredotornado <la...@gmail.com>.
I haven't done any benchmarks, and I'm assuming some of the folks on this
thread are the Tomcat developers and can speak first hand to the speed.  If
so, I would encourage you to update the wiki ...

http://wiki.apache.org/tomcat/FAQ/Connectors

because it mentions that Apache is faster at serving static content than
Tomcat for high-traffic sites.  - Dave





Jeff Hubbs-2 wrote:
> 
>   On 10/14/10 12:08 PM, Caldarale, Charles R wrote:
>>
>>> I'm trying to make sure Tomcat is not serving static
>>> files that Apache can serve more efficiently.
>> Why do you think httpd can serve them more efficiently?
> I recall from reading about Slashdot's architecture some years ago 
> (Perl/MySQL at the time) that they had separate servers running Tux for 
> static content...
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Where-do-files-served-get-logged--tp29963979p29964522.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Where do files served get logged?

Posted by Jeff Hubbs <jh...@att.net>.
  On 10/14/10 12:08 PM, Caldarale, Charles R wrote:
>
>> I'm trying to make sure Tomcat is not serving static
>> files that Apache can serve more efficiently.
> Why do you think httpd can serve them more efficiently?
I recall from reading about Slashdot's architecture some years ago 
(Perl/MySQL at the time) that they had separate servers running Tux for 
static content...

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Where do files served get logged?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: laredotornado [mailto:laredotornado@gmail.com] 
> Subject: Where do files served get logged?

> Where is it configured, or where do I look to see what files 
> Tomcat has served?

You can enable the AccessLogValve in conf/server.xml, and tailor it to your liking.

> I'm trying to make sure Tomcat is not serving static
> files that Apache can serve more efficiently.

Why do you think httpd can serve them more efficiently?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org