You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by frenchc44 <fr...@gmail.com> on 2013/12/31 18:44:09 UTC

max_packet_size for data in mod_jk

Due to large payloads, we wanted to increase the max_packet size of the
mod_jk/ajp layer in order to see if it will help with performance. However,
it appears the max_packet_size for non- header requests is capped at 8192
bytes despite the documentation stating that it should be 65536. I am using
mod_jk version 1.2.31 

[Tue Dec 31 11:54:09 2013][12492:12640] [debug]
ajp_connection_tcp_send_message::jk_ajp_common.c (1145): sending to ajp13
pos=4 len=8192 max=16384

Here is some code from jk_ajp_common.c that sets the max size but appears to
ignore the max_packet_size...

Line 1708:  if (ae->left_bytes_to_send > 0) {
            int len = AJP13_MAX_SEND_BODY_SZ;
            if (ae->left_bytes_to_send <
(jk_uint64_t)AJP13_MAX_SEND_BODY_SZ) {
                len = (int)ae->left_bytes_to_send;
            }

Any help would be much appreciated. 



--
View this message in context: http://tomcat.10.x6.nabble.com/max-packet-size-for-data-in-mod-jk-tp5009929.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: max_packet_size for data in mod_jk

Posted by Rainer Jung <ra...@kippdata.de>.
On 02.01.2014 15:42, frenchc44 wrote:
> Thanks Rainer.  To be honest, we don't really know what to expect from a
> larger packet size, but we think it could only help since it would reduce
> round trips between apache/tomcat.  My main objective with this thread is to
> confirm my suspicion that the max_packet_size is not for request post data
> and rather for header. 

Confirmed, used for request header and for response packets.

I added it today also for request bodies, but did not yet really test
it. It will be part of version 1.2.38. It would be nice if you could
give it a try:

http://people.apache.org/~rjung/mod_jk-dev/tomcat-connectors-1.2.38-dev-1555414-src.tar.gz

That is not a release but just a snapshot tarball, that can be build
just like a release.

Thanks for pushing it until here and possible further tests and feedback.

Regards,

Rainer


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


Re: max_packet_size for data in mod_jk

Posted by frenchc44 <fr...@gmail.com>.
Hi, we ended up not making the change.

On Friday, June 13, 2014, Krishna Surabhi [via Tomcat] <
ml-node+s10n5018705h52@n6.nabble.com> wrote:

> Did you see any improvement or degradation after you made this change ?.
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://tomcat.10.x6.nabble.com/max-packet-size-for-data-in-mod-jk-tp5009929p5018705.html
>  To unsubscribe from max_packet_size for data in mod_jk, click here
> <http://tomcat.10.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5009929&code=ZnJlbmNoY0BnbWFpbC5jb218NTAwOTkyOXwxODMzOTQwNDE4>
> .
> NAML
> <http://tomcat.10.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://tomcat.10.x6.nabble.com/max-packet-size-for-data-in-mod-jk-tp5009929p5018706.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

Re: max_packet_size for data in mod_jk

Posted by frenchc44 <fr...@gmail.com>.
Thanks Rainer.  To be honest, we don't really know what to expect from a
larger packet size, but we think it could only help since it would reduce
round trips between apache/tomcat.  My main objective with this thread is to
confirm my suspicion that the max_packet_size is not for request post data
and rather for header. 



--
View this message in context: http://tomcat.10.x6.nabble.com/max-packet-size-for-data-in-mod-jk-tp5009929p5009990.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: max_packet_size for data in mod_jk

Posted by Rainer Jung <ra...@kippdata.de>.
On 31.12.2013 18:44, frenchc44 wrote:
> Due to large payloads, we wanted to increase the max_packet size of the
> mod_jk/ajp layer in order to see if it will help with performance. However,
> it appears the max_packet_size for non- header requests is capped at 8192
> bytes despite the documentation stating that it should be 65536. I am using
> mod_jk version 1.2.31 
> 
> [Tue Dec 31 11:54:09 2013][12492:12640] [debug]
> ajp_connection_tcp_send_message::jk_ajp_common.c (1145): sending to ajp13
> pos=4 len=8192 max=16384
> 
> Here is some code from jk_ajp_common.c that sets the max size but appears to
> ignore the max_packet_size...
> 
> Line 1708:  if (ae->left_bytes_to_send > 0) {
>             int len = AJP13_MAX_SEND_BODY_SZ;
>             if (ae->left_bytes_to_send <
> (jk_uint64_t)AJP13_MAX_SEND_BODY_SZ) {
>                 len = (int)ae->left_bytes_to_send;
>             }
> 
> Any help would be much appreciated. 

That's quite possible. The original problem that was solved with
max_packet_size was big headers, because the AJP protocol needs to fit
all headers into one AJP packet. The problem arose when people were
using https and client certs and wanted to forward client cert details
from Apache to Tomcat. Then often 8KB were not enough.

Are you sure, that bigger AJP packets will be a significant win in your
situation? Request and response bodies are streamed, so there is no
obvious limitation and packets will be relayed as data comes in.

I'm willing to look into how easy it would be to making max_packet_size
work even for other packets (in combination with packetSize on the
Tomcat side), but would like to first understand better why you think it
would make a noticeable difference for you.

Regards,

Rainer


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