You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2008/06/07 01:16:24 UTC
DO NOT REPLY [Bug 45154] New: Support sendfile with NIO and SSL
https://issues.apache.org/bugzilla/show_bug.cgi?id=45154
Summary: Support sendfile with NIO and SSL
Product: Tomcat 6
Version: 6.0.16
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: mmcclain@uplogix.com
Created an attachment (id=22092)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=22092)
Patch for Tomcat 6.0.16
We upgraded to Tomcat 6.0 to take advantage of NIO.
We have a couple servlets which use SSL for secure download
of very large files and needed it to scale.
Disappointed that the sendfile functionality didn't work
with NIO when using SSL, I dug in until I got something to
work.
I'm attaching a patch.
The part that I'm least comfortable was the change to SecureNioChannel
because I didn't know why the check was there to begin with.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 45154] Support sendfile with NIO and SSL
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45154
--- Comment #2 from M McClain <mm...@uplogix.com> 2008-08-21 18:05:15 PST ---
I understand what you're saying about doing too much
in the poller thread.
I was trying to accomplish handling hundreds of clients
that could simultaneously download a 200 MB file without
tying up a separate thread per client on blocking I/O.
And I hoped the NIO mechanism would additionally use
less RAM.
Unfortunately, from the servlet layer we only have
access to an OutputStream.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 45154] Support sendfile with NIO and SSL
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45154
Filip Hanik <fh...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Filip Hanik <fh...@apache.org> 2008-08-21 16:15:10 PST ---
Hi Mr McClain,
the benefit of sendfile is that you can transfer data from one channel to
another without reading the data into the java heap.
this is not possible with SSL, since you have to do the encryption in memory,
so the effort is wasted, and doing it this way, you will be wasting poller CPU
cycles on SSL encryption, potentially slowing down the system's reaction time
to IO events.
so the transferTo is supposed to read from the one buffer to another without
reading data into memory (the java heap), this effort doesn't work with NIO
ssl.
what would have to be done here, is that we moved the send file to a separate
thread, but it still wouldn't be a true send file.
Filip
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 45154] Support sendfile with NIO and SSL
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45154
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
--- Comment #3 from Mark Thomas <ma...@apache.org> 2008-11-08 18:01:01 PST ---
Changing this to an enhancement since there isn't anything broken here. Patches
along the lines of Filip's suggestion welcome.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 45154] Support sendfile with NIO and SSL
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45154
--- Comment #5 from Filip Hanik <fh...@apache.org> 2009-01-14 16:21:16 PST ---
This has been fixed in 6.0.x and will be included in 6.0.19 onwards.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 45154] Support sendfile with NIO and SSL
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45154
Filip Hanik <fh...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |FIXED
--- Comment #4 from Filip Hanik <fh...@apache.org> 2008-11-26 12:35:27 PST ---
Proposal for inclusion and performance improvement is added here
http://svn.apache.org/viewvc?rev=720724&view=rev
http://svn.apache.org/viewvc?rev=720728&view=rev
The important thing is to never call a blocking method within the poller
Proposal for inclusion in 6.0.x branch has been created.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org