"Caldarale, Charles R" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
>> Subject: Re: Performance of Native library
>
>Thanks for the insight (not just the snippet below).
>
>> If you serve a lot of large static files, then it is likely to
>> be faster on most OSs (due to being able to use sendfile).
>
>How does APR stack up against the NIO connector for sendfile usage since
>both support that mode?  Does the JNI transition penalty outweigh any
>gains of using native code?
>

Well, they will both have to use native code to access the sendfile system 
call ;).

I haven't benchmarked it myself (my sites tend to be mostly dynamic, with 
maybe a few small gifs), and haven't seen benchmarks posted on either here 
or [EMAIL PROTECTED]  I'm guessing that in most cases it will be close to a tie 
(possibly NIO winning slightly).  But it really depends on how well your JVM 
provider has implimented sendfile in NIO on your platform (also how well 
Apache has done the same).  Sun has put in some backdoors in their JVM to 
allow native methods in the core Java code to avoid the hit (can't tell you, 
'couse I don't know, you'll have to checkout the source code and find out ;) 
.

But it will still probably depend on your app, so you should benchmark it 
yourself.  It is pretty easy to to with either ab or JMeter (depending on 
what you expect the access pattern to be:  ab if a single page requests lots 
of large files, JMeter if it is more like a slide-show with delays between 
requests).

> - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to