You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ethen John <jo...@googlemail.com> on 2015/07/30 12:52:24 UTC

memory trace of the server with 2 instances of tomcat 7 running

hi all,

I have a linux server which is running 2 similar instances of Tomcats 7.

Each of the tomcat instances has the exact same web application (.war)
deployed.

The application is not actively used by the users, but the behavior of the
application on both the tomcat instances is looking very sluggish.

I checked the memory utilization of the server machine, which is as
follows:

top - 12:47:20 up 182 days, 43 min, 1 user, load average: 0.09, 0.16, 0.15
Tasks: 226 total, 1 running, 225 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 15529M total, 11474M used, 4054M free, 485M buffers
Swap: 16383M total, 0M used, 16383M free, 9633M cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7866 root 0 -20 43036 12m 2640 S 12 0.1 2479:02 scopeux
1 root 20 0 10548 824 692 S 0 0.0 1:41.80 init
2 root 20 0 0 0 0 S 0 0.0 0:00.16 kthreadd
3 root 20 0 0 0 0 S 0 0.0 3:09.18 ksoftirqd/0
5 root 20 0 0 0 0 S 0 0.0 15:56.61 kworker/u:0
…
=========================

yyy@xxx:~> free -m
total used free shared buffers cached
Mem: 15529 11469 4059 0 485 9633
-/+ buffers/cache: 1350 14178
Swap: 16383 0 16383

======================

yyy@xxx:~> df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg00-rootvol 5.0G 1.4G 3.4G 29% /
udev 7.6G 220K 7.6G 1% /dev
tmpfs 24G 0 24G 0% /dev/shm
/dev/sda1 510M 48M 437M 10% /boot
/dev/mapper/vg00-homevol 992M 12M 929M 2% /home
/dev/mapper/vg00-tmpvol 2.0G 201M 1.7G 11% /tmp
/dev/mapper/vg00-varvol 7.9G 319M 7.2G 5% /var
/dev/mapper/vg00-crashvol 2.0G 68M 1.9G 4% /crashdump
/dev/mapper/vg00-auditvol 248M 11M 226M 5% /var/log/audit
/dev/mapper/vg00-optvol 12G 1.5G 9.8G 13% /opt
/dev/mapper/vg00-webdienste 99G 3.7G 95G 4% /webdienste

-- 

Does the information above provide any pointers that can be addressed
further.

The strange thing is the used memory consumption of 11474M:

Mem: 15529M total, 11474M used, 4054M free, 485M buffers

I am also planning to have Lymbda probe installed on each of the tomcat
instances to get more details.

Afterwords, I am also planning to restart the server machine.

The application works fine on the other earlier version (5) of Tomcat
instance. It's just that we have now migrated the application to Tomcat 7
with Java 6 and experiencing this behavior.

The new server machine only running 2 tomcat 7 instances and nothing else.

Any help shall he appreciated.

thanks.

Re: memory trace of the server with 2 instances of tomcat 7 running

Posted by André Warnier <aw...@ice-sa.com>.
Ethen John wrote:
> hi all,
> 
> I have a linux server which is running 2 similar instances of Tomcats 7.
> 
> Each of the tomcat instances has the exact same web application (.war)
> deployed.
> 
> The application is not actively used by the users, but the behavior of the
> application on both the tomcat instances is looking very sluggish.
> 
> I checked the memory utilization of the server machine, which is as
> follows:
> 
> top - 12:47:20 up 182 days, 43 min, 1 user, load average: 0.09, 0.16, 0.15
> Tasks: 226 total, 1 running, 225 sleeping, 0 stopped, 0 zombie
> Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
> Mem: 15529M total, 11474M used, 4054M free, 485M buffers
> Swap: 16383M total, 0M used, 16383M free, 9633M cached
> 
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 7866 root 0 -20 43036 12m 2640 S 12 0.1 2479:02 scopeux
> 1 root 20 0 10548 824 692 S 0 0.0 1:41.80 init
> 2 root 20 0 0 0 0 S 0 0.0 0:00.16 kthreadd
> 3 root 20 0 0 0 0 S 0 0.0 3:09.18 ksoftirqd/0
> 5 root 20 0 0 0 0 S 0 0.0 15:56.61 kworker/u:0
> …

Just a little thing here : under "top", if you enter "F" and then "n", it will show the 
processes in the order of memory usage. Did you do that ?
(I am asking because I see no "java" processes above, and they tend to come on top of the 
list when there are any).

> =========================
> 
> yyy@xxx:~> free -m
> total used free shared buffers cached
> Mem: 15529 11469 4059 0 485 9633
> -/+ buffers/cache: 1350 14178
> Swap: 16383 0 16383
> 
> ======================
> 
> yyy@xxx:~> df -kh
> Filesystem Size Used Avail Use% Mounted on
> /dev/mapper/vg00-rootvol 5.0G 1.4G 3.4G 29% /
> udev 7.6G 220K 7.6G 1% /dev
> tmpfs 24G 0 24G 0% /dev/shm
> /dev/sda1 510M 48M 437M 10% /boot
> /dev/mapper/vg00-homevol 992M 12M 929M 2% /home
> /dev/mapper/vg00-tmpvol 2.0G 201M 1.7G 11% /tmp
> /dev/mapper/vg00-varvol 7.9G 319M 7.2G 5% /var
> /dev/mapper/vg00-crashvol 2.0G 68M 1.9G 4% /crashdump
> /dev/mapper/vg00-auditvol 248M 11M 226M 5% /var/log/audit
> /dev/mapper/vg00-optvol 12G 1.5G 9.8G 13% /opt
> /dev/mapper/vg00-webdienste 99G 3.7G 95G 4% /webdienste
> 


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


Re: memory trace of the server with 2 instances of tomcat 7 running

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

Ethen,

On 7/30/15 6:52 AM, Ethen John wrote:
> I have a linux server which is running 2 similar instances of
> Tomcats 7.
> 
> Each of the tomcat instances has the exact same web application
> (.war) deployed.
> 
> The application is not actively used by the users, but the behavior
> of the application on both the tomcat instances is looking very
> sluggish.

What are you using as your performance metric?

> I checked the memory utilization of the server machine, which is
> as follows:
> 
> top - 12:47:20 up 182 days, 43 min, 1 user, load average: 0.09,
> 0.16, 0.15 Tasks: 226 total, 1 running, 225 sleeping, 0 stopped, 0
> zombie Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi,
> 0.0%si, 0.0%st Mem: 15529M total, 11474M used, 4054M free, 485M
> buffers Swap: 16383M total, 0M used, 16383M free, 9633M cached

So you have a system with 16GiB of RAM.

16GiB of swap seems like a lot. I think Java tries very hard not to
get swapped-out (might prohibit the OS from doing it), so you may find
that you never use all that.

The machine looks completely idle to me.

> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 7866 root 0
> -20 43036 12m 2640 S 12 0.1 2479:02 scopeux 1 root 20 0 10548 824
> 692 S 0 0.0 1:41.80 init 2 root 20 0 0 0 0 S 0 0.0 0:00.16
> kthreadd 3 root 20 0 0 0 0 S 0 0.0 3:09.18 ksoftirqd/0 5 root 20 0
> 0 0 0 S 0 0.0 15:56.61 kworker/u:0

So... that's the useless part of the output. What about your JVM
processes?

> =========================
> 
> yyy@xxx:~> free -m total used free shared buffers cached Mem: 15529
> 11469 4059 0 485 9633 -/+ buffers/cache: 1350 14178 Swap: 16383 0
> 16383

Okay, nothing new here -- top included this already.

> ======================
> 
> yyy@xxx:~> df -kh Filesystem Size Used Avail Use% Mounted on 
> /dev/mapper/vg00-rootvol 5.0G 1.4G 3.4G 29% / udev 7.6G 220K 7.6G
> 1% /dev tmpfs 24G 0 24G 0% /dev/shm /dev/sda1 510M 48M 437M 10%
> /boot /dev/mapper/vg00-homevol 992M 12M 929M 2% /home 
> /dev/mapper/vg00-tmpvol 2.0G 201M 1.7G 11% /tmp 
> /dev/mapper/vg00-varvol 7.9G 319M 7.2G 5% /var 
> /dev/mapper/vg00-crashvol 2.0G 68M 1.9G 4% /crashdump 
> /dev/mapper/vg00-auditvol 248M 11M 226M 5% /var/log/audit 
> /dev/mapper/vg00-optvol 12G 1.5G 9.8G 13% /opt 
> /dev/mapper/vg00-webdienste 99G 3.7G 95G 4% /webdienste

The disk stats don't matter much.

> Does the information above provide any pointers that can be
> addressed further.

Can you give us any information other than "I've got a server with a
bunch of RAM and my application feels slow"?

- From what you've shown us, there is no problem: the server is idle.

> The strange thing is the used memory consumption of 11474M:

Why is that strange? Memory exists to be used. Unused memory is a
waste of silicon and power.

What are the memory-related parameters for your JVMs?

> Mem: 15529M total, 11474M used, 4054M free, 485M buffers
> 
> I am also planning to have Lymbda probe installed on each of the
> tomcat instances to get more details.

Or you can just use "ps", but feel free to get heap-level information.

> Afterwords, I am also planning to restart the server machine.

That usually doesn't have a measurable effect on performance.

> The application works fine on the other earlier version (5) of
> Tomcat instance. It's just that we have now migrated the
> application to Tomcat 7 with Java 6 and experiencing this
> behavior.

Glad to see you're all up-to-date for deployment in 2011.

> The new server machine only running 2 tomcat 7 instances and
> nothing else.

It appears to be sitting idle. What's the problem?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVulA4AAoJEBzwKT+lPKRYFH4QAJZsWHe+vtgMWSXFub/QmkFx
bggJNpcVxlDJrs3PBTjWTYuhuttsb++K1IUWeCE3Jc+W3YKwMAFYeSuHiOY0vVcT
95/b0sW9ePrbWWP4TFFx2xX52Bhnoc3Kij2jZuMvQBN/rtpD595J9NusssZcIu6I
CR/mGxzpsU42cDtWyB7Q9WYm0dQnhq3qA6LN+GwYPUvR4IaTfCn+e0WLShbH+i/k
qW0SIUIvFh7Rz/wnFa8BGRCmlpWp5QPbsnNsS7SF4cqU/riWXtj+f1vt521wNlpj
xEUXn5f3kDsIVu1LFvNd0IvqpmWvRpdLbPH3D7EYJafo2sA3me3LyJRq+YfGZHVg
tTRNG4TrlQ/oiXs1QDerSgehCYvpMkp4dK1NMD5kfei9vCYAJXQJfNc1Pqec5ko3
ETt22jg4oflwxP0kw2i2F+KgLjm1xqFgVxr8g/NODjRvEs+mglxYEchrm2loPSdT
sU0xQE0ipvf+2S6M1MaimKFb2E7LqnbDSqU/UtNh0hRmUTrYBnbaXXfV1LUKs48Q
BWinFrie+auNMohLHmpD3moVO8VWQaalJa9JthMfw4GoNKIi6FgZHMEc3pKhEZSI
TMZLR1vxu1sur3DmmUaIZ9Jn/oHYMVpG6fsLXVbS9TseAjCbqptiOxOeHNvSk0kK
OMvZKeLtD65uyw/sTSGV
=JtMt
-----END PGP SIGNATURE-----

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