You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stefan Magnus Landrø <st...@gmail.com> on 2013/07/11 15:04:51 UTC

[Tomcat 7.x] Tuning the connector for large requests / response

Hi there,

We're developing a web service application that will have to handle
mulitpart requests/responses of up 10 MB.

I've looked at the config reference found here

http://tomcat.apache.org/tomcat-7.0-doc/config/http.html

but I'm not sure which values to tune. Probably the buffers, right?

Any pointers would be great.

Cheers

Stefan

Re: [Tomcat 7.x] Tuning the connector for large requests / response

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

Chris,

On 7/11/13 11:20 AM, chris derham wrote:
> On Thu, Jul 11, 2013 at 11:35 AM, Stefan Magnus Landrø 
> <st...@gmail.com> wrote:
>> 
>> 
>> Den 11. juli 2013 kl. 15:44 skrev chris derham
>> <ch...@derham.me.uk>:
>> 
>>> Stefan,
>>> 
>>>> but I'm not sure which values to tune. Probably the buffers,
>>>> right?
>>>> 
>>>> Any pointers would be great.
>>> 
>>> If you want to tune an application, first you need to create a 
>>> repeatable test load using any tool you like.
>> 
>> Agreed. That's exactly what I'm doing (using Gatling actually)
> 
> Ok never heard of it - will have a look
> 
>>> Then measure the application under load, and identify where
>>> there are problems.
>> 
>> Performing a thread dump I see most threads are doing io stuff
>> reading from the socket and consuming lots of CPU.
> 
> Can you post the thread dumps? That might help people on the list
> get a feel for where the problem lies? Do you hit this problem when
> you target a specific url, or only when you have a broad range of
> request types hitting the server

+1

Also, what is your <Connector> configuration. Are you using SSL? Are
you using APR? Compression of any kind? How much is "lots of CPU"?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJR4FxzAAoJEBzwKT+lPKRYlKcP/R+hb+Tnra43WHrh/7r5kVex
xe3w8aUe+lp3hg3aPnWNnTV5uCz/iCtCfBHKpqLoESJ8v+4fQ3xT5VeiZavtVOZE
NxatY1S+kU30HXwYPB8yMseeyk/dY8JmvqBYFWG1sJdu+em5uc8MNCZf+ZH0VHL5
74PMZd25n/VXISMuJY9aP1RQhu7Tr41K5f919Aa2Nr8Vu9aigOLlfCx631PfhjTW
WOr+G9OU7xF6YIB/XmyeBX/3IuAVDQkPu0bPnb9tTuSO7bPrQKwo8m1dScbgIz0e
YeJ0Aarg69SdkmSr1vt19tQQndzOPByL06nPwtZ8OMrPlupBCoZkg7mO2sO/oFc1
q4LCzFX8XPztcOolB+UgVSofv/iQXgwKuXF+eloI2eeTA4o0zdKrJPVNi5DZGfoS
uXWAgPk951Or+Kk5lhC9nChUNHPjwg8u/jWltzngLuKfjkL6nCItqIAo73LAf8+T
Bl2KX5HngyqGIcLR/Dwi+UQnNNddippHvfWe23KWAfYTVYIJy5qBJVfMiaAXldH5
GTj6eHKARty6MgqmnyyIYwSmIWFy2tU1yE78JoyCXa3QoxF+cVETIPinZOvLAArP
a2lv5PdL0hDhrWenpA29P9tNBy+pNn19eaNrfMrFHjsPW+wEoj2nqJ0/nfAt00GH
l0omKdPbaXj1PTUpd3Qu
=YnZu
-----END PGP SIGNATURE-----

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


Re: [Tomcat 7.x] Tuning the connector for large requests / response

Posted by chris derham <ch...@derham.me.uk>.
On Thu, Jul 11, 2013 at 11:35 AM, Stefan Magnus Landrø
<st...@gmail.com> wrote:
>
>
> Den 11. juli 2013 kl. 15:44 skrev chris derham <ch...@derham.me.uk>:
>
>> Stefan,
>>
>>> but I'm not sure which values to tune. Probably the buffers, right?
>>>
>>> Any pointers would be great.
>>
>> If you want to tune an application, first you need to create a
>> repeatable test load using any tool you like.
>
> Agreed. That's exactly what I'm doing (using Gatling actually)

Ok never heard of it - will have a look

>> Then measure the
>> application under load, and identify where there are problems.
>
> Performing a thread dump I see most threads are doing io stuff reading from the socket and consuming lots of CPU.

Can you post the thread dumps? That might help people on the list get
a feel for where the problem lies? Do you hit this problem when you
target a specific url, or only when you have a broad range of request
types hitting the server

Chris

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


Re: [Tomcat 7.x] Tuning the connector for large requests / response

Posted by Stefan Magnus Landrø <st...@gmail.com>.

Den 11. juli 2013 kl. 15:44 skrev chris derham <ch...@derham.me.uk>:

> Stefan,
> 
>> but I'm not sure which values to tune. Probably the buffers, right?
>> 
>> Any pointers would be great.
> 
> If you want to tune an application, first you need to create a
> repeatable test load using any tool you like.

Agreed. That's exactly what I'm doing (using Gatling actually)

> Then measure the
> application under load, and identify where there are problems.

Performing a thread dump I see most threads are doing io stuff reading from the socket and consuming lots of CPU.

> Once
> you have done this, come back to the list and explain specifically
> where the problems lie. Then the people on the list will be able to
> help point out settings that might improve load. Right now with the
> information provided, there is no way to know where the problem would
> lie. Also if you did change something, you would have no way of
> knowing if the change had made a positive or negative effect
> 
> HTH
> 
> Chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

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


Re: [Tomcat 7.x] Tuning the connector for large requests / response

Posted by chris derham <ch...@derham.me.uk>.
Stefan,

> but I'm not sure which values to tune. Probably the buffers, right?
>
> Any pointers would be great.

If you want to tune an application, first you need to create a
repeatable test load using any tool you like. Then measure the
application under load, and identify where there are problems. Once
you have done this, come back to the list and explain specifically
where the problems lie. Then the people on the list will be able to
help point out settings that might improve load. Right now with the
information provided, there is no way to know where the problem would
lie. Also if you did change something, you would have no way of
knowing if the change had made a positive or negative effect

HTH

Chris

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


Re: [Tomcat 7.x] Tuning the connector for large requests / response

Posted by Stefan Magnus Landrø <st...@gmail.com>.
No. We're using apache cxf. 
It works ok but io seems to consume a lot of CPU. 


Den 11. juli 2013 kl. 15:39 skrev Konstantin Kolinko <kn...@gmail.com>:

> 2013/7/11 Stefan Magnus Landrø <st...@gmail.com>:
>> Hi there,
>> 
>> We're developing a web service application that will have to handle
>> mulitpart requests/responses of up 10 MB.
>> 
>> I've looked at the config reference found here
>> 
>> http://tomcat.apache.org/tomcat-7.0-doc/config/http.html
>> 
>> but I'm not sure which values to tune. Probably the buffers, right?
>> 
>> Any pointers would be great.
> 
> Are you going to use Servlet 3.0 file upload support?
> 
> If so, you would have to configure values in '<multipart-config>'
> element in your app's WEB-INF/web.xml.
> 
> Look into Tomcat Manager webapp for an example.
> 
> I see no need to change configuration of HTTP connectors.
> 
> Best regards,
> Konstantin Kolinko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

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


Re: [Tomcat 7.x] Tuning the connector for large requests / response

Posted by Konstantin Kolinko <kn...@gmail.com>.
2013/7/11 Stefan Magnus Landrø <st...@gmail.com>:
> Hi there,
>
> We're developing a web service application that will have to handle
> mulitpart requests/responses of up 10 MB.
>
> I've looked at the config reference found here
>
> http://tomcat.apache.org/tomcat-7.0-doc/config/http.html
>
> but I'm not sure which values to tune. Probably the buffers, right?
>
> Any pointers would be great.
>

Are you going to use Servlet 3.0 file upload support?

If so, you would have to configure values in '<multipart-config>'
element in your app's WEB-INF/web.xml.

Look into Tomcat Manager webapp for an example.

I see no need to change configuration of HTTP connectors.

Best regards,
Konstantin Kolinko

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