You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gabriel Huerta Araujo <hu...@hildebrando.com> on 2013/05/25 03:43:22 UTC

Apache tomcat thread's issue

Hi everyone
I developed an application using two threads where in one of them I started to run one socket to ask for information and in the another, application runs a serversocket to receive the data. In STS runs perfectly(Windows) but when I run this application on Solaris. threads do not run asynchronously. My question is does this have to do with -Xms and -Xmx settings which I have to adjust? If yes,  are these values correct?
-Xms1024M -Xmx1024M

Regards


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


Re: Apache tomcat thread's issue

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

Gabriel,

On 5/24/13 9:43 PM, Gabriel Huerta Araujo wrote:
> I developed an application using two threads where in one of them
> I started to run one socket to ask for information and in the
> another, application runs a serversocket to receive the data. In
> STS runs perfectly(Windows) but when I run this application on
> Solaris, threads do not run asynchronously.

What makes you say that?

> My question is does this have to do with -Xms and -Xmx settings
> which I have to adjust?

Almost certainly not: the -Xmx and -Xms settings are for sizing your
heap, and you appear to have a threading/synchronization problem.

> If yes,  are these values correct? -Xms1024M -Xmx1024M

That depends upon your requirements: my "biggest" JVM runs with a
512MiB heap because we simply don't need a huge heap to handle our
transactions and user load. Other systems I've worked on in the past
have needed multi-GiB heaps for their purposes.

The only way to determine your proper heap size is to collect lots of
data about your environment.

One could argue that setting your heap to the largest size that
doesn't interfere with other services running on the same machine is a
good idea: GC delays are related to the number of /live/ objects in
the heap, and not (directly) to the size of the heap itself. If you
subscribe to this view, then take as much heap as you can get.

- -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/

iQIcBAEBCAAGBQJRpRbyAAoJEBzwKT+lPKRYLuQQAMUfpalGzpH2DpIoOfrQNsPA
SAw2M+aW4vFu442otvcNjyG4eWntI2d+fLvT5ZcieZdWpz/xh2DHlCDf9iqt/OLN
SJtQ/s0A4DUJoKZ8QJTrnhv0NNvPXsHftdz2muERIZyP6yr0BnOjPxfZv84E3G1I
x8GVDH7BmpwTMrXrA3VEH1t8e7yAl1j7vbCmkYNJpIiusgHJwDxiGwLxyrPb5qVF
kq3YXLGsYYnyNAxVsw1bmxlv50O/R7WI1bM4PBDBkWoxAfks9WiGyRlw+tdk3WbI
Ttu3E5jR5f8XSP2+ZwVH0nwgB6UvuVTG1Kv6FjIYp/dQm2wcj9lDiKvL/Wxm0jf3
EyTpNsBglSdVCHI1SRcwnuIqWTZGvnsaIql82rJ34XeH5LMG7BrU122M+7G6/0KV
tzxeEFcoK2s52ueHjN42JokockTK80kElIMPI8yRQ0xabpbdDU4tcT48FiQT6udy
BKzszkXBDsj3EmxaO8IvbgebOOLhLt6XRvdLfVNJsBbW+T5660BeHH3xN6SKpDv+
aWT/4iNEBmVQxgjlZsWbvRcJWx7pBT1h1V96HccxsVEK9GXkVXOAj3z20eVZaCt1
5Mlm8gzNsO7y3xU6ytGKzGQw8pMPDhnuukXeWt8oFWUDdnsDNtAvkWc66deQ3JLr
aOfFXpQQTOuuoRNbQumi
=5DIx
-----END PGP SIGNATURE-----

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