You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eric Chua <in...@yahoo.com.INVALID> on 2017/03/17 03:01:31 UTC

Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

I am running tomcat 8.0.121.  When I start my tomcat, it seems to be eating up all the memory on my system.  I have 16 GB, and it keeps on going.  Then when I try to kill the process, it dies but 12 GB is still being used even though everything is turn off.  The only way to reclaim the memory is to reboot.  I am running on redhat 6.5 and can't figure out what could be causing this.  I run the tomcat as a local user, and I know there aren't any other processes running as the local user.  I am running a spring MVC 4/Java 8/ struts web application. I have two of them with the same issue.  Any help would be appreciated. When I try to view all the running processes I cannot see where most of the 12 gb are being used.   The system came up with 2.2 gb used and after I start one web application it goes to 14-15gb.   The funny thing is that I can kill it to reclaim the memory. Only a reboot works.  I am running a VMware instance with vcenter version 6.5.  This does not happen with Java 7 with tomcat 7. Any help would be appreciate.



Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Aurélien Terrestris <at...@gmail.com>.
"I think you are chasing a ghost that isn't actually there."

I agree with Chris. You should try to clean the caches and I believe that
you will see your memory back "free". Have a look at how to do it here :
http://unix.stackexchange.com/questions/87908/how-do-you-empty-the-buffers-and-cache-on-a-linux-system

2017-03-20 20:27 GMT+01:00 Eric Chua <in...@yahoo.com.invalid>:

>  blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px
> #715FFA solid !important; padding-left:1ex !important;
> background-color:white !important; } When I run my application in a windows
> environment I use a few hundred megabytes.  When I use RHL, it takes up the
> entire 16gb of memory in QA with one user within minutes.  The memory is
> also unaccounted for.  My user says I am using a few gigabytes and root
> doesn't own hardly anything.
>
>
> Sent from Yahoo Mail for iPhone
>
>
> On Monday, March 20, 2017, 2:11 PM, Thomas Meyer <th...@m3y3r.de> wrote:
>
>
>
>
> With kind regards
> Thomas
> > Am 17.03.2017 um 14:54 schrieb Christopher Schultz <
> chris@christopherschultz.net>:
> >> Note that Java *never* gives any memory back to the OS, even when the
> > heap-usage goes down. This is a Java thing, not a Tomcat thing.
> >
>
> Are you sure about this? I think I've read otherwise somewhere. A quick
> google showed up this: http://stackoverflow.com/a/30464183
>
> With kind regards
> Thomas
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>

Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Eric Chua <in...@yahoo.com.INVALID>.
 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } When I run my application in a windows environment I use a few hundred megabytes.  When I use RHL, it takes up the entire 16gb of memory in QA with one user within minutes.  The memory is also unaccounted for.  My user says I am using a few gigabytes and root doesn't own hardly anything.


Sent from Yahoo Mail for iPhone


On Monday, March 20, 2017, 2:11 PM, Thomas Meyer <th...@m3y3r.de> wrote:




With kind regards
Thomas
> Am 17.03.2017 um 14:54 schrieb Christopher Schultz <ch...@christopherschultz.net>:
>> Note that Java *never* gives any memory back to the OS, even when the
> heap-usage goes down. This is a Java thing, not a Tomcat thing.
> 

Are you sure about this? I think I've read otherwise somewhere. A quick google showed up this: http://stackoverflow.com/a/30464183

With kind regards
Thomas



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




Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Thomas Meyer <th...@m3y3r.de>.


With kind regards
Thomas
> Am 17.03.2017 um 14:54 schrieb Christopher Schultz <ch...@christopherschultz.net>:
>> Note that Java *never* gives any memory back to the OS, even when the
> heap-usage goes down. This is a Java thing, not a Tomcat thing.
> 

Are you sure about this? I think I've read otherwise somewhere. A quick google showed up this: http://stackoverflow.com/a/30464183

With kind regards
Thomas



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


Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Eric Chua <in...@yahoo.com.INVALID>.
 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } I need some direction.  It seems like the solution was to use 
-XX:MinHeapFreeRatio=25 -XX:MaxheapFreeRatio=50
While looking at the net,  are there specific parameters for red hat Linux?  If so,  where do you find them?  RHL has some parameters for JBoss but can't find much for tomcat.
Eric

Sent from Yahoo Mail for iPhone


On Monday, March 20, 2017, 7:55 PM, Eric Chua <in...@yahoo.com> wrote:

I use free -m , ps and top.  I have three separate web applications.  One that runs one Tomcat7/Java 7, one built on Java8/Tomcat8 and one that  was converted from Java7/Tomcat7 to Java8/tomcat8.  When running our Java 7 application, it takes very little memory running on windows and Linux. For the Java8/Tomcat 8 applications, the memory balloons for both to the point all other applications slow down. We are running seeing this issue in QA right now.  We noticed that our UAT didn't have this issue so we moved the code over to QA and pointed to the UAT DB environment.  The problem seems to go away but when we take the same UAT Code on QA server and point to the QA DB, the problem (memory ballooning) came back. We are still testing but noticed that we do a monthly patch. Our QA server which was recently patched has a newer patch than our UAT environment.  We are going to try to recreate the same problem with our UAT environment tomorrow.  It is strange that the QA db seems to trigger the issue but it might be because QA has many more records.  What can't be explained is the memory that disappears. We attempted to clear the memory cache by freeing it up(Aurelien Suggestion) and it doesn't seem to work.  The memory is being held or utilized.  I am not the unix admin so I have to keep going back and forth with him and we are constantly rebooting the server to recover the memory to try to figure out this issue.

QA Server - Linux QA 2.6.32-642.15.1.el6.x86_64
UAT - Linux UAT 2.6.32-642.13.1.el6.x86_64

The administrator is pointing to our application and says he believes we have a memory leak. We are using JProfiler, and can't find any leak.  We have a garbage collection log. Would that help to identify the issue?
Thanks for everyone's input.  Still looking. Hoping tomorrow we get a more definitive answer on the source of the issue.

 

    On Monday, March 20, 2017 5:08 PM, calder <ca...@gmail.com> wrote:
 

 On Mon, Mar 20, 2017 at 4:46 PM, Eric Chua <in...@yahoo.com.invalid> wrote:

> siteadm@mavs01web11q:/data/tools/jvmtop $ top -U siteadm
>
> top - 12:41:20 up 19 min,  3 users,  load average: 1.25, 1.24, 0.87
>
> Tasks: 130 total,  1 running, 129 sleeping,  0 stopped,  0 zombie
> Cpu(s): 98.5%us,  1.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.5%si,  0.0%st
> Mem:  16334352k total, 15623536k used,  710816k free,    84096k buffers
> Swap:  4128764k total,        0k used,  4128764k free,  339484k cached
>
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 2019 siteadm  20  0 6054m 4.1g  17m S 98.0 26.5  11:29.56 java
> 2523 siteadm  20  0 19288 1452 1080 R  0.3  0.0  0:00.02 top
> 1950 siteadm  20  0  105m 2100 1560 S  0.0  0.0  0:00.14 bash
>
> On Monday, March 20, 2017, 10:21 AM, Eric Chua <in...@yahoo.com> wrote:
>
> siteadm  2007    1  7 11:04 pts/0    00:00:00 /data/java/jdk1.8.0_121/bin/java -

[snip]
>
> My kernel is 2.6.32-642.15.1.elf.x86_64
> Memory gets all allocated and  after I kill it only a portion is recovered.  Any ideas?
>
> top - 11:18:36 up 16 min,  2 users,  load average: 1.92, 1.39, 0.68
> Tasks: 123 total,  1 running, 122 sleeping,  0 stopped,  0 zombie
> Cpu(s):  0.7%us,  0.0%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
> Mem:  16334352k total, 11215624k used,  5118728k free,    33788k buffers
> Swap:  4128764k total,        0k used,  4128764k free,  313940k cached

>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 1931 siteadm  20  0  105m 2120 1568 S  0.0  0.0  0:00.10 bash
> 2319 siteadm  20  0 19288 1460 1092 R  0.0  0.0  0:00.09 top

Please do not top-post - if that term is unfamiliar to you, please
read this before posting again.
http://www.idallen.com/topposting.html

"top" is simply a "ps" that refreshes its output every so often.
A word of warning - for "ps" (and of course "top"), the output of VSZ
and RSS are almost **always wrong**.    If that statement is doubtful
to anyone, choose a process in the ps list and run "pmap -d <pid#>"
and compare the results - you will see that the ps output is usually
over-inflated (we'll not get into the why's here).

If you are worried about the "Mem: 16334352k total, 11215624k used,
5118728k free" output from ps/top, don't be - Linux will take up RAM
to use for caching, and in many cases, you may see a Linux (or Unix)
system where there is almost NO available memory.  But don't be
alarmed, because Linux will provide memory from the pool at new
processes are launched.

I firmly believe someone is mis-interpreting the output of ps/top on
this machine. I have worked with many a Linux "admins" who don't quite
understand how to interpret the output data of the various utilities
or how the Kernel works.

Let's look at your "before and after" ps output just above. You have a
Java process (PID 2019) running and in the second output, we see the
Java process is now gone (and no zombies).  I think what ya'll are
concerned about is that the "11215624k used" hasn't dropped much.  As
I stated earlier, don't fret over that - that's standard Linux
behavior.

As I stated in my previous post, if you REALLY want to see if there is
some rogue Java process, run
"ps aux | grep java" (best as superuser),
and see if you find more than one Java process.  But it's my opinion
that the ps/top output is confusing folks.


BTW, how are you killing the Java process? "kill -9"? if yes, not the
best way. The best way to stop a Tomcat Java process on a Linux system
is (adjust the shutdown port # if it is not 8005)
$ printf "SHUTDOWN" | nc localhost 8005

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



   



Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Eric Chua <in...@yahoo.com.INVALID>.
I use free -m , ps and top.  I have three separate web applications.  One that runs one Tomcat7/Java 7, one built on Java8/Tomcat8 and one that  was converted from Java7/Tomcat7 to Java8/tomcat8.  When running our Java 7 application, it takes very little memory running on windows and Linux. For the Java8/Tomcat 8 applications, the memory balloons for both to the point all other applications slow down. We are running seeing this issue in QA right now.  We noticed that our UAT didn't have this issue so we moved the code over to QA and pointed to the UAT DB environment.  The problem seems to go away but when we take the same UAT Code on QA server and point to the QA DB, the problem (memory ballooning) came back. We are still testing but noticed that we do a monthly patch. Our QA server which was recently patched has a newer patch than our UAT environment.  We are going to try to recreate the same problem with our UAT environment tomorrow.  It is strange that the QA db seems to trigger the issue but it might be because QA has many more records.  What can't be explained is the memory that disappears. We attempted to clear the memory cache by freeing it up(Aurelien Suggestion) and it doesn't seem to work.  The memory is being held or utilized.  I am not the unix admin so I have to keep going back and forth with him and we are constantly rebooting the server to recover the memory to try to figure out this issue.

QA Server - Linux QA 2.6.32-642.15.1.el6.x86_64
UAT - Linux UAT 2.6.32-642.13.1.el6.x86_64

The administrator is pointing to our application and says he believes we have a memory leak. We are using JProfiler, and can't find any leak.  We have a garbage collection log. Would that help to identify the issue?
Thanks for everyone's input.  Still looking. Hoping tomorrow we get a more definitive answer on the source of the issue.

 

    On Monday, March 20, 2017 5:08 PM, calder <ca...@gmail.com> wrote:
 

 On Mon, Mar 20, 2017 at 4:46 PM, Eric Chua <in...@yahoo.com.invalid> wrote:

> siteadm@mavs01web11q:/data/tools/jvmtop $ top -U siteadm
>
> top - 12:41:20 up 19 min,  3 users,  load average: 1.25, 1.24, 0.87
>
> Tasks: 130 total,  1 running, 129 sleeping,  0 stopped,  0 zombie
> Cpu(s): 98.5%us,  1.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.5%si,  0.0%st
> Mem:  16334352k total, 15623536k used,  710816k free,    84096k buffers
> Swap:  4128764k total,        0k used,  4128764k free,  339484k cached
>
>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 2019 siteadm  20  0 6054m 4.1g  17m S 98.0 26.5  11:29.56 java
> 2523 siteadm  20  0 19288 1452 1080 R  0.3  0.0  0:00.02 top
> 1950 siteadm  20  0  105m 2100 1560 S  0.0  0.0  0:00.14 bash
>
> On Monday, March 20, 2017, 10:21 AM, Eric Chua <in...@yahoo.com> wrote:
>
> siteadm  2007    1  7 11:04 pts/0    00:00:00 /data/java/jdk1.8.0_121/bin/java -

[snip]
>
> My kernel is 2.6.32-642.15.1.elf.x86_64
> Memory gets all allocated and  after I kill it only a portion is recovered.  Any ideas?
>
> top - 11:18:36 up 16 min,  2 users,  load average: 1.92, 1.39, 0.68
> Tasks: 123 total,  1 running, 122 sleeping,  0 stopped,  0 zombie
> Cpu(s):  0.7%us,  0.0%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
> Mem:  16334352k total, 11215624k used,  5118728k free,    33788k buffers
> Swap:  4128764k total,        0k used,  4128764k free,  313940k cached

>  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 1931 siteadm  20  0  105m 2120 1568 S  0.0  0.0  0:00.10 bash
> 2319 siteadm  20  0 19288 1460 1092 R  0.0  0.0  0:00.09 top

Please do not top-post - if that term is unfamiliar to you, please
read this before posting again.
http://www.idallen.com/topposting.html

"top" is simply a "ps" that refreshes its output every so often.
A word of warning - for "ps" (and of course "top"), the output of VSZ
and RSS are almost **always wrong**.    If that statement is doubtful
to anyone, choose a process in the ps list and run "pmap -d <pid#>"
and compare the results - you will see that the ps output is usually
over-inflated (we'll not get into the why's here).

If you are worried about the "Mem: 16334352k total, 11215624k used,
5118728k free" output from ps/top, don't be - Linux will take up RAM
to use for caching, and in many cases, you may see a Linux (or Unix)
system where there is almost NO available memory.  But don't be
alarmed, because Linux will provide memory from the pool at new
processes are launched.

I firmly believe someone is mis-interpreting the output of ps/top on
this machine. I have worked with many a Linux "admins" who don't quite
understand how to interpret the output data of the various utilities
or how the Kernel works.

Let's look at your "before and after" ps output just above. You have a
Java process (PID 2019) running and in the second output, we see the
Java process is now gone (and no zombies).  I think what ya'll are
concerned about is that the "11215624k used" hasn't dropped much.  As
I stated earlier, don't fret over that - that's standard Linux
behavior.

As I stated in my previous post, if you REALLY want to see if there is
some rogue Java process, run
"ps aux | grep java" (best as superuser),
and see if you find more than one Java process.  But it's my opinion
that the ps/top output is confusing folks.


BTW, how are you killing the Java process? "kill -9"? if yes, not the
best way. The best way to stop a Tomcat Java process on a Linux system
is (adjust the shutdown port # if it is not 8005)
$ printf "SHUTDOWN" | nc localhost 8005

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



   

Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by calder <ca...@gmail.com>.
On Mon, Mar 20, 2017 at 4:46 PM, Eric Chua <in...@yahoo.com.invalid> wrote:

> siteadm@mavs01web11q:/data/tools/jvmtop $ top -U siteadm
>
> top - 12:41:20 up 19 min,  3 users,  load average: 1.25, 1.24, 0.87
>
> Tasks: 130 total,   1 running, 129 sleeping,   0 stopped,   0 zombie
> Cpu(s): 98.5%us,  1.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.5%si,  0.0%st
> Mem:  16334352k total, 15623536k used,   710816k free,    84096k buffers
> Swap:  4128764k total,        0k used,  4128764k free,   339484k cached
>
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 2019 siteadm   20   0 6054m 4.1g  17m S 98.0 26.5  11:29.56 java
> 2523 siteadm   20   0 19288 1452 1080 R  0.3  0.0   0:00.02 top
> 1950 siteadm   20   0  105m 2100 1560 S  0.0  0.0   0:00.14 bash
>
> On Monday, March 20, 2017, 10:21 AM, Eric Chua <in...@yahoo.com> wrote:
>
> siteadm   2007     1  7 11:04 pts/0    00:00:00 /data/java/jdk1.8.0_121/bin/java -

[snip]
>
> My kernel is 2.6.32-642.15.1.elf.x86_64
> Memory gets all allocated and  after I kill it only a portion is recovered.  Any ideas?
>
> top - 11:18:36 up 16 min,  2 users,  load average: 1.92, 1.39, 0.68
> Tasks: 123 total,   1 running, 122 sleeping,   0 stopped,   0 zombie
> Cpu(s):  0.7%us,  0.0%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
> Mem:  16334352k total, 11215624k used,  5118728k free,    33788k buffers
> Swap:  4128764k total,        0k used,  4128764k free,   313940k cached

>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 1931 siteadm   20   0  105m 2120 1568 S  0.0  0.0   0:00.10 bash
> 2319 siteadm   20   0 19288 1460 1092 R  0.0  0.0   0:00.09 top

Please do not top-post - if that term is unfamiliar to you, please
read this before posting again.
http://www.idallen.com/topposting.html

"top" is simply a "ps" that refreshes its output every so often.
A word of warning - for "ps" (and of course "top"), the output of VSZ
and RSS are almost **always wrong**.    If that statement is doubtful
to anyone, choose a process in the ps list and run "pmap -d <pid#>"
and compare the results - you will see that the ps output is usually
over-inflated (we'll not get into the why's here).

If you are worried about the "Mem: 16334352k total, 11215624k used,
5118728k free" output from ps/top, don't be - Linux will take up RAM
to use for caching, and in many cases, you may see a Linux (or Unix)
system where there is almost NO available memory.  But don't be
alarmed, because Linux will provide memory from the pool at new
processes are launched.

I firmly believe someone is mis-interpreting the output of ps/top on
this machine. I have worked with many a Linux "admins" who don't quite
understand how to interpret the output data of the various utilities
or how the Kernel works.

Let's look at your "before and after" ps output just above. You have a
Java process (PID 2019) running and in the second output, we see the
Java process is now gone (and no zombies).  I think what ya'll are
concerned about is that the "11215624k used" hasn't dropped much.  As
I stated earlier, don't fret over that - that's standard Linux
behavior.

As I stated in my previous post, if you REALLY want to see if there is
some rogue Java process, run
"ps aux | grep java" (best as superuser),
and see if you find more than one Java process.   But it's my opinion
that the ps/top output is confusing folks.


BTW, how are you killing the Java process? "kill -9"? if yes, not the
best way. The best way to stop a Tomcat Java process on a Linux system
is (adjust the shutdown port # if it is not 8005)
$ printf "SHUTDOWN" | nc localhost 8005

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


Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Eric Chua <in...@yahoo.com.INVALID>.
 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } I took a based configuration right from the tar file and started tomcat.  I only changed the http and ajp port numbers. I started the tomcat container and dropped my war file.  I have the same problem.  I am going to try to set the memory options .  Does my options look reasonable? Any suggestions would be appreciated.
export  CATALINA_OPTS="-XX:MaxMetaspaceSize=1g -XX:+UseG1GC -XX:MaxDirectMemorySize=1g -Xms256m -Xmx3500m "



Sent from Yahoo Mail for iPhone


On Monday, March 20, 2017, 12:53 PM, Eric Chua <in...@yahoo.com.INVALID> wrote:

 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } Also the configuration files were taken from tomcat 7.  Could there be an issue there?


Sent from Yahoo Mail for iPhone


On Monday, March 20, 2017, 12:17 PM, Eric Chua <in...@yahoo.com.INVALID> wrote:

 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } That is correct and baffling.  My user doesn't own that memory and the unix admin keeps saying it is an issue with a memory leak but if that was so wouldn't my user own the memory?
Your thoughts would be helpful.  Sorry about the formatting.


Sent from Yahoo Mail for iPhone


On Monday, March 20, 2017, 12:07 PM, André Warnier (tomcat) <aw...@ice-sa.com> wrote:

Hi.

I will exceptionally contravene the usual rules of this list, which are to not top-post.
But your message below is so badly-formatted, that a comment in the middle would be 
difficut to read otherwise.

One thing attracted my attention below : you mention that "the entire memory was being 
used", which seems substantiated by a part of the "top" display :

 > Mem:  16334352k total, 15623536k used,  710816k free,    84096k buffers

But, in the subsequent per-process top display, it shows this :

 > 2019 siteadm  20  0 6054m 4.1g  17m S 98.0 26.5  11:29.56 java

So, this java process is using 4.1 GB of real memory.
Where did the other 11.9 GB go ?

You might want to run your Java application, and "top" again (without "-U"), and this time 
enter an "M" when top is running, to sort the processes by memory usage.


On 20.03.2017 17:46, Eric Chua wrote:
>  blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } I used jvmtop.  The web application used the entire 16gb and the allocated heap.  The report I was running never finished
>
> ARGS: start
>
> VMARGS: -Djava.util.logging.config.file=/data/tomcat/AgencyWebApp/conf/lo[...]
>
> VM: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 1.8.0_121
>
> UP:  0:13m  #THR: 41  #THRPEAK: 42  #THRCREATED: 49  USER: siteadm
>
> GC-Time:  0: 5m  #GC-Runs: 75        #TotalLoadedClasses: 12440
>
> CPU: 91.16% GC:  0.00% HEAP:3590m /3855m NONHEAP: 115m /  n/a
>
>
>
>    TID  NAME                                    STATE    CPU  TOTALCPU BLOCKEDBY
>
>      42 ajp-nio-8011-exec-8                  RUNNABLE 69.88%    4.63%
>
>      35 ajp-nio-8011-exec-1                  RUNNABLE 19.04%    15.49%
>
>      55 RMI TCP Connection(9)-127.0.0.      RUNNABLE  1.60%    0.20%
>
>      54 JMX server connection timeout  TIMED_WAITING  0.09%    0.01%
>
>      12 NioBlockingSelector.BlockPolle      RUNNABLE  0.07%    0.14%
>
>      47 ajp-nio-8011-AsyncTimeout      TIMED_WAITING  0.02%    0.02%
>
>      32 http-nio-8086-ClientPoller-0        RUNNABLE  0.00%    0.05%
>
>      45 ajp-nio-8011-ClientPoller-0          RUNNABLE  0.00%    0.10%
>
>      11 NioBlockingSelector.BlockPolle      RUNNABLE  0.00%    0.01%
>
>      34 http-nio-8086-AsyncTimeout      TIMED_WAITING  0.00%    0.01%
>
> Note: Only top 10 threads (according cpu load) are shown!
>
> Mar 20, 2017 12:39:28 PM ClientCommunicatorAdmin Checker-run
>
> WARNING: Failed to check the connection: java.net.SocketTimeoutException: Read timed out
>
> ^[[A^C^C^C^C^C^C^C^C^C
>
>
>
> siteadm@mavs01web11q:/data/tools/jvmtop $ top -U siteadm
>
> top - 12:41:20 up 19 min,  3 users,  load average: 1.25, 1.24, 0.87
>
> Tasks: 130 total,  1 running, 129 sleeping,  0 stopped,  0 zombie
>
> Cpu(s): 98.5%us,  1.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.5%si,  0.0%st
>
> Mem:  16334352k total, 15623536k used,  710816k free,    84096k buffers
>
> Swap:  4128764k total,        0k used,  4128764k free,  339484k cached
>
>
>
>    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>
> 2019 siteadm  20  0 6054m 4.1g  17m S 98.0 26.5  11:29.56 java
>
> 2523 siteadm  20  0 19288 1452 1080 R  0.3  0.0  0:00.02 top
>
> 1950 siteadm  20  0  105m 2100 1560 S  0.0  0.0  0:00.14 bash
>
>
> Sent from Yahoo Mail for iPhone
>
>
> On Monday, March 20, 2017, 10:21 AM, Eric Chua <in...@yahoo.com> wrote:
>
>
> siteadm  2007    1  7 11:04 pts/0    00:00:00 /data/java/jdk1.8.0_121/bin/java -Djava.util.logging.config.file=/data/tomcat/AgencyWebApp/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Daccuity.servername=mavs01web11q -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -classpath /data/tomcat/apache-tomcat/bin/bootstrap.jar:/data/tomcat/apache-tomcat/bin/tomcat-juli.jar -Dcatalina.base=/data/tomcat/AgencyWebApp -Dcatalina.home=/data/tomcat/apache-tomcat -Djava.io.tmpdir=/data/tomcat/AgencyWebApp/temp org.apache.catalina.startup.Bootstrap start
>
>
> My kernel is 2.6.32-642.15.1.elf.x86_64
> Memory gets all allocated and  after I kill it only a portion is recovered.  Any ideas?
>
> top - 11:18:36 up 16 min,  2 users,  load average: 1.92, 1.39, 0.68
>
> Tasks: 123 total,  1 running, 122 sleeping,  0 stopped,  0 zombie
>
> Cpu(s):  0.7%us,  0.0%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
>
> Mem:  16334352k total, 11215624k used,  5118728k free,    33788k buffers
>
> Swap:  4128764k total,        0k used,  4128764k free,  313940k cached
>
>
>
>    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>
> 1931 siteadm  20  0  105m 2120 1568 S  0.0  0.0  0:00.10 bash
>
> 2319 siteadm  20  0 19288 1460 1092 R  0.0  0.0  0:00.09 top
>
>
>
> Sent from Yahoo Mail for iPhone
>
>
> On Friday, March 17, 2017, 8:54 AM, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Eric,
>
> On 3/16/17 11:01 PM, Eric Chua wrote:
>> I am running tomcat 8.0.121.  When I start my tomcat, it seems to
>> be eating up all the memory on my system.  I have 16 GB, and it
>> keeps on going.
>
> What are your memory-related parameters when you launch the JVM?
>
> Note that Java *never* gives any memory back to the OS, even when the
> heap-usage goes down. This is a Java thing, not a Tomcat thing.
>
>> Then when I try to kill the process, it dies but 12 GB is still
>> being used even though everything is turn off.
>
> That makes no sense at all. Please provide some evidence this is
> happening.
>
>> The only way to reclaim the memory is to reboot.
>
> If this is true, then you have some kind of awful kernel bug.
>
>> I am running on redhat 6.5 and can't figure out what could be
>> causing this.  I run the tomcat as a local user, and I know there
>> aren't any other processes running as the local user.  I am running
>> a spring MVC 4/Java 8/ struts web application. I have two of them
>> with the same issue.  Any help would be appreciated. When I try to
>> view all the running processes I cannot see where most of the 12 gb
>> are being used.  The system came up with 2.2 gb used and after I
>> start one web application it goes to 14-15gb.
>
> Ok.
>
>> The funny thing is that I can kill it to reclaim the memory. Only
>> a reboot works.
>
> You mean you CAN'T kill in to reclaim memory, right?
>
>> I am running a VMware instance with vcenter version 6.5.  This
>> does not happen with Java 7 with tomcat 7. Any help would be
>> appreciate.
>
> Something tells me you are reading or interpreting something
> incorrectly, here. Can you please share your raw data, and where you
> got that raw data? Something like reports from free/ps/top/sar/etc.?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJYy+qWAAoJEBzwKT+lPKRYd38P/34EhmWZaueHBR2cLJeitXa9
> SOd5pf1XrtgVyyx6FebFQkNlckzUVV3LCrPMkL+OudWjezqU0c7O/F1sRlVJk18V
> A767jMpcSRI183QpDPBmbHKv6zsoVVibyXwMTbTDRAKzV+7JEGA4SrMEzEoyTcIv
> gak5ctUvAH6t+jQrLiuVCCIpsKnvDwoYmsbDo0fXmZ+mQgIHYSr3D4UCCEPBtsar
> o5uDJrwbGZRtKsHSvRoCxTGXlXIlD8SUE/+SlPsHo+R79AXN0cyI2GYSh8OfAW12
> 7gLzvrGpRzwyD34V/uFhoTugIx5OnNuN0Pw2jGBjrlRsDvBETiy/1CRKwMDe7u59
> 7ev9emoq5WpNRrDJuBN4MMzrFtBNOM/o04MPg5KVoM0clHyXOJrXbHJ1EkYWIkLr
> fdHr9ejfS9mQhYSYKXXSbjEDGOGGLrLmPbUJ6gfAg5PqsyNTYTYW24+bvpt1MykZ
> dkQXAB1CQ0YdNm6YIipYMD/d9kEYVpbXEKuVGT7QWTHRD3z/Pdcfp4hb05ckw0a3
> UIa8Jk1yh8Z+f4pjAKFPi1VhhbaGU8VjGXKpdVcso/Ljohe/SzKs+IWuSJ/H97tE
> VzEwgYaMEPdtfSnBG5Hf/6HtnME4TCXSBn8rBcGCgn4/rvUIMJZOlXePRT0BLBOt
> /vhOk/rN/5h1XOrqVaqF
> =hBJ4
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Eric Chua <in...@yahoo.com.INVALID>.
 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } Also the configuration files were taken from tomcat 7.  Could there be an issue there?


Sent from Yahoo Mail for iPhone


On Monday, March 20, 2017, 12:17 PM, Eric Chua <in...@yahoo.com.INVALID> wrote:

 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } That is correct and baffling.  My user doesn't own that memory and the unix admin keeps saying it is an issue with a memory leak but if that was so wouldn't my user own the memory?
Your thoughts would be helpful.  Sorry about the formatting.


Sent from Yahoo Mail for iPhone


On Monday, March 20, 2017, 12:07 PM, André Warnier (tomcat) <aw...@ice-sa.com> wrote:

Hi.

I will exceptionally contravene the usual rules of this list, which are to not top-post.
But your message below is so badly-formatted, that a comment in the middle would be 
difficut to read otherwise.

One thing attracted my attention below : you mention that "the entire memory was being 
used", which seems substantiated by a part of the "top" display :

 > Mem:  16334352k total, 15623536k used,  710816k free,    84096k buffers

But, in the subsequent per-process top display, it shows this :

 > 2019 siteadm  20  0 6054m 4.1g  17m S 98.0 26.5  11:29.56 java

So, this java process is using 4.1 GB of real memory.
Where did the other 11.9 GB go ?

You might want to run your Java application, and "top" again (without "-U"), and this time 
enter an "M" when top is running, to sort the processes by memory usage.


On 20.03.2017 17:46, Eric Chua wrote:
>  blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } I used jvmtop.  The web application used the entire 16gb and the allocated heap.  The report I was running never finished
>
> ARGS: start
>
> VMARGS: -Djava.util.logging.config.file=/data/tomcat/AgencyWebApp/conf/lo[...]
>
> VM: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 1.8.0_121
>
> UP:  0:13m  #THR: 41  #THRPEAK: 42  #THRCREATED: 49  USER: siteadm
>
> GC-Time:  0: 5m  #GC-Runs: 75        #TotalLoadedClasses: 12440
>
> CPU: 91.16% GC:  0.00% HEAP:3590m /3855m NONHEAP: 115m /  n/a
>
>
>
>    TID  NAME                                    STATE    CPU  TOTALCPU BLOCKEDBY
>
>      42 ajp-nio-8011-exec-8                  RUNNABLE 69.88%    4.63%
>
>      35 ajp-nio-8011-exec-1                  RUNNABLE 19.04%    15.49%
>
>      55 RMI TCP Connection(9)-127.0.0.      RUNNABLE  1.60%    0.20%
>
>      54 JMX server connection timeout  TIMED_WAITING  0.09%    0.01%
>
>      12 NioBlockingSelector.BlockPolle      RUNNABLE  0.07%    0.14%
>
>      47 ajp-nio-8011-AsyncTimeout      TIMED_WAITING  0.02%    0.02%
>
>      32 http-nio-8086-ClientPoller-0        RUNNABLE  0.00%    0.05%
>
>      45 ajp-nio-8011-ClientPoller-0          RUNNABLE  0.00%    0.10%
>
>      11 NioBlockingSelector.BlockPolle      RUNNABLE  0.00%    0.01%
>
>      34 http-nio-8086-AsyncTimeout      TIMED_WAITING  0.00%    0.01%
>
> Note: Only top 10 threads (according cpu load) are shown!
>
> Mar 20, 2017 12:39:28 PM ClientCommunicatorAdmin Checker-run
>
> WARNING: Failed to check the connection: java.net.SocketTimeoutException: Read timed out
>
> ^[[A^C^C^C^C^C^C^C^C^C
>
>
>
> siteadm@mavs01web11q:/data/tools/jvmtop $ top -U siteadm
>
> top - 12:41:20 up 19 min,  3 users,  load average: 1.25, 1.24, 0.87
>
> Tasks: 130 total,  1 running, 129 sleeping,  0 stopped,  0 zombie
>
> Cpu(s): 98.5%us,  1.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.5%si,  0.0%st
>
> Mem:  16334352k total, 15623536k used,  710816k free,    84096k buffers
>
> Swap:  4128764k total,        0k used,  4128764k free,  339484k cached
>
>
>
>    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>
> 2019 siteadm  20  0 6054m 4.1g  17m S 98.0 26.5  11:29.56 java
>
> 2523 siteadm  20  0 19288 1452 1080 R  0.3  0.0  0:00.02 top
>
> 1950 siteadm  20  0  105m 2100 1560 S  0.0  0.0  0:00.14 bash
>
>
> Sent from Yahoo Mail for iPhone
>
>
> On Monday, March 20, 2017, 10:21 AM, Eric Chua <in...@yahoo.com> wrote:
>
>
> siteadm  2007    1  7 11:04 pts/0    00:00:00 /data/java/jdk1.8.0_121/bin/java -Djava.util.logging.config.file=/data/tomcat/AgencyWebApp/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Daccuity.servername=mavs01web11q -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -classpath /data/tomcat/apache-tomcat/bin/bootstrap.jar:/data/tomcat/apache-tomcat/bin/tomcat-juli.jar -Dcatalina.base=/data/tomcat/AgencyWebApp -Dcatalina.home=/data/tomcat/apache-tomcat -Djava.io.tmpdir=/data/tomcat/AgencyWebApp/temp org.apache.catalina.startup.Bootstrap start
>
>
> My kernel is 2.6.32-642.15.1.elf.x86_64
> Memory gets all allocated and  after I kill it only a portion is recovered.  Any ideas?
>
> top - 11:18:36 up 16 min,  2 users,  load average: 1.92, 1.39, 0.68
>
> Tasks: 123 total,  1 running, 122 sleeping,  0 stopped,  0 zombie
>
> Cpu(s):  0.7%us,  0.0%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
>
> Mem:  16334352k total, 11215624k used,  5118728k free,    33788k buffers
>
> Swap:  4128764k total,        0k used,  4128764k free,  313940k cached
>
>
>
>    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>
> 1931 siteadm  20  0  105m 2120 1568 S  0.0  0.0  0:00.10 bash
>
> 2319 siteadm  20  0 19288 1460 1092 R  0.0  0.0  0:00.09 top
>
>
>
> Sent from Yahoo Mail for iPhone
>
>
> On Friday, March 17, 2017, 8:54 AM, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Eric,
>
> On 3/16/17 11:01 PM, Eric Chua wrote:
>> I am running tomcat 8.0.121.  When I start my tomcat, it seems to
>> be eating up all the memory on my system.  I have 16 GB, and it
>> keeps on going.
>
> What are your memory-related parameters when you launch the JVM?
>
> Note that Java *never* gives any memory back to the OS, even when the
> heap-usage goes down. This is a Java thing, not a Tomcat thing.
>
>> Then when I try to kill the process, it dies but 12 GB is still
>> being used even though everything is turn off.
>
> That makes no sense at all. Please provide some evidence this is
> happening.
>
>> The only way to reclaim the memory is to reboot.
>
> If this is true, then you have some kind of awful kernel bug.
>
>> I am running on redhat 6.5 and can't figure out what could be
>> causing this.  I run the tomcat as a local user, and I know there
>> aren't any other processes running as the local user.  I am running
>> a spring MVC 4/Java 8/ struts web application. I have two of them
>> with the same issue.  Any help would be appreciated. When I try to
>> view all the running processes I cannot see where most of the 12 gb
>> are being used.  The system came up with 2.2 gb used and after I
>> start one web application it goes to 14-15gb.
>
> Ok.
>
>> The funny thing is that I can kill it to reclaim the memory. Only
>> a reboot works.
>
> You mean you CAN'T kill in to reclaim memory, right?
>
>> I am running a VMware instance with vcenter version 6.5.  This
>> does not happen with Java 7 with tomcat 7. Any help would be
>> appreciate.
>
> Something tells me you are reading or interpreting something
> incorrectly, here. Can you please share your raw data, and where you
> got that raw data? Something like reports from free/ps/top/sar/etc.?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJYy+qWAAoJEBzwKT+lPKRYd38P/34EhmWZaueHBR2cLJeitXa9
> SOd5pf1XrtgVyyx6FebFQkNlckzUVV3LCrPMkL+OudWjezqU0c7O/F1sRlVJk18V
> A767jMpcSRI183QpDPBmbHKv6zsoVVibyXwMTbTDRAKzV+7JEGA4SrMEzEoyTcIv
> gak5ctUvAH6t+jQrLiuVCCIpsKnvDwoYmsbDo0fXmZ+mQgIHYSr3D4UCCEPBtsar
> o5uDJrwbGZRtKsHSvRoCxTGXlXIlD8SUE/+SlPsHo+R79AXN0cyI2GYSh8OfAW12
> 7gLzvrGpRzwyD34V/uFhoTugIx5OnNuN0Pw2jGBjrlRsDvBETiy/1CRKwMDe7u59
> 7ev9emoq5WpNRrDJuBN4MMzrFtBNOM/o04MPg5KVoM0clHyXOJrXbHJ1EkYWIkLr
> fdHr9ejfS9mQhYSYKXXSbjEDGOGGLrLmPbUJ6gfAg5PqsyNTYTYW24+bvpt1MykZ
> dkQXAB1CQ0YdNm6YIipYMD/d9kEYVpbXEKuVGT7QWTHRD3z/Pdcfp4hb05ckw0a3
> UIa8Jk1yh8Z+f4pjAKFPi1VhhbaGU8VjGXKpdVcso/Ljohe/SzKs+IWuSJ/H97tE
> VzEwgYaMEPdtfSnBG5Hf/6HtnME4TCXSBn8rBcGCgn4/rvUIMJZOlXePRT0BLBOt
> /vhOk/rN/5h1XOrqVaqF
> =hBJ4
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Eric Chua <in...@yahoo.com.INVALID>.
 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } That is correct and baffling.  My user doesn't own that memory and the unix admin keeps saying it is an issue with a memory leak but if that was so wouldn't my user own the memory?
Your thoughts would be helpful.  Sorry about the formatting.


Sent from Yahoo Mail for iPhone


On Monday, March 20, 2017, 12:07 PM, André Warnier (tomcat) <aw...@ice-sa.com> wrote:

Hi.

I will exceptionally contravene the usual rules of this list, which are to not top-post.
But your message below is so badly-formatted, that a comment in the middle would be 
difficut to read otherwise.

One thing attracted my attention below : you mention that "the entire memory was being 
used", which seems substantiated by a part of the "top" display :

 > Mem:  16334352k total, 15623536k used,  710816k free,    84096k buffers

But, in the subsequent per-process top display, it shows this :

 > 2019 siteadm  20  0 6054m 4.1g  17m S 98.0 26.5  11:29.56 java

So, this java process is using 4.1 GB of real memory.
Where did the other 11.9 GB go ?

You might want to run your Java application, and "top" again (without "-U"), and this time 
enter an "M" when top is running, to sort the processes by memory usage.


On 20.03.2017 17:46, Eric Chua wrote:
>  blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } I used jvmtop.  The web application used the entire 16gb and the allocated heap.  The report I was running never finished
>
> ARGS: start
>
> VMARGS: -Djava.util.logging.config.file=/data/tomcat/AgencyWebApp/conf/lo[...]
>
> VM: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 1.8.0_121
>
> UP:  0:13m  #THR: 41  #THRPEAK: 42  #THRCREATED: 49  USER: siteadm
>
> GC-Time:  0: 5m  #GC-Runs: 75        #TotalLoadedClasses: 12440
>
> CPU: 91.16% GC:  0.00% HEAP:3590m /3855m NONHEAP: 115m /  n/a
>
>
>
>    TID  NAME                                    STATE    CPU  TOTALCPU BLOCKEDBY
>
>      42 ajp-nio-8011-exec-8                  RUNNABLE 69.88%    4.63%
>
>      35 ajp-nio-8011-exec-1                  RUNNABLE 19.04%    15.49%
>
>      55 RMI TCP Connection(9)-127.0.0.      RUNNABLE  1.60%    0.20%
>
>      54 JMX server connection timeout  TIMED_WAITING  0.09%    0.01%
>
>      12 NioBlockingSelector.BlockPolle      RUNNABLE  0.07%    0.14%
>
>      47 ajp-nio-8011-AsyncTimeout      TIMED_WAITING  0.02%    0.02%
>
>      32 http-nio-8086-ClientPoller-0        RUNNABLE  0.00%    0.05%
>
>      45 ajp-nio-8011-ClientPoller-0          RUNNABLE  0.00%    0.10%
>
>      11 NioBlockingSelector.BlockPolle      RUNNABLE  0.00%    0.01%
>
>      34 http-nio-8086-AsyncTimeout      TIMED_WAITING  0.00%    0.01%
>
> Note: Only top 10 threads (according cpu load) are shown!
>
> Mar 20, 2017 12:39:28 PM ClientCommunicatorAdmin Checker-run
>
> WARNING: Failed to check the connection: java.net.SocketTimeoutException: Read timed out
>
> ^[[A^C^C^C^C^C^C^C^C^C
>
>
>
> siteadm@mavs01web11q:/data/tools/jvmtop $ top -U siteadm
>
> top - 12:41:20 up 19 min,  3 users,  load average: 1.25, 1.24, 0.87
>
> Tasks: 130 total,  1 running, 129 sleeping,  0 stopped,  0 zombie
>
> Cpu(s): 98.5%us,  1.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.5%si,  0.0%st
>
> Mem:  16334352k total, 15623536k used,  710816k free,    84096k buffers
>
> Swap:  4128764k total,        0k used,  4128764k free,  339484k cached
>
>
>
>    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>
> 2019 siteadm  20  0 6054m 4.1g  17m S 98.0 26.5  11:29.56 java
>
> 2523 siteadm  20  0 19288 1452 1080 R  0.3  0.0  0:00.02 top
>
> 1950 siteadm  20  0  105m 2100 1560 S  0.0  0.0  0:00.14 bash
>
>
> Sent from Yahoo Mail for iPhone
>
>
> On Monday, March 20, 2017, 10:21 AM, Eric Chua <in...@yahoo.com> wrote:
>
>
> siteadm  2007    1  7 11:04 pts/0    00:00:00 /data/java/jdk1.8.0_121/bin/java -Djava.util.logging.config.file=/data/tomcat/AgencyWebApp/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Daccuity.servername=mavs01web11q -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -classpath /data/tomcat/apache-tomcat/bin/bootstrap.jar:/data/tomcat/apache-tomcat/bin/tomcat-juli.jar -Dcatalina.base=/data/tomcat/AgencyWebApp -Dcatalina.home=/data/tomcat/apache-tomcat -Djava.io.tmpdir=/data/tomcat/AgencyWebApp/temp org.apache.catalina.startup.Bootstrap start
>
>
> My kernel is 2.6.32-642.15.1.elf.x86_64
> Memory gets all allocated and  after I kill it only a portion is recovered.  Any ideas?
>
> top - 11:18:36 up 16 min,  2 users,  load average: 1.92, 1.39, 0.68
>
> Tasks: 123 total,  1 running, 122 sleeping,  0 stopped,  0 zombie
>
> Cpu(s):  0.7%us,  0.0%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
>
> Mem:  16334352k total, 11215624k used,  5118728k free,    33788k buffers
>
> Swap:  4128764k total,        0k used,  4128764k free,  313940k cached
>
>
>
>    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>
> 1931 siteadm  20  0  105m 2120 1568 S  0.0  0.0  0:00.10 bash
>
> 2319 siteadm  20  0 19288 1460 1092 R  0.0  0.0  0:00.09 top
>
>
>
> Sent from Yahoo Mail for iPhone
>
>
> On Friday, March 17, 2017, 8:54 AM, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Eric,
>
> On 3/16/17 11:01 PM, Eric Chua wrote:
>> I am running tomcat 8.0.121.  When I start my tomcat, it seems to
>> be eating up all the memory on my system.  I have 16 GB, and it
>> keeps on going.
>
> What are your memory-related parameters when you launch the JVM?
>
> Note that Java *never* gives any memory back to the OS, even when the
> heap-usage goes down. This is a Java thing, not a Tomcat thing.
>
>> Then when I try to kill the process, it dies but 12 GB is still
>> being used even though everything is turn off.
>
> That makes no sense at all. Please provide some evidence this is
> happening.
>
>> The only way to reclaim the memory is to reboot.
>
> If this is true, then you have some kind of awful kernel bug.
>
>> I am running on redhat 6.5 and can't figure out what could be
>> causing this.  I run the tomcat as a local user, and I know there
>> aren't any other processes running as the local user.  I am running
>> a spring MVC 4/Java 8/ struts web application. I have two of them
>> with the same issue.  Any help would be appreciated. When I try to
>> view all the running processes I cannot see where most of the 12 gb
>> are being used.  The system came up with 2.2 gb used and after I
>> start one web application it goes to 14-15gb.
>
> Ok.
>
>> The funny thing is that I can kill it to reclaim the memory. Only
>> a reboot works.
>
> You mean you CAN'T kill in to reclaim memory, right?
>
>> I am running a VMware instance with vcenter version 6.5.  This
>> does not happen with Java 7 with tomcat 7. Any help would be
>> appreciate.
>
> Something tells me you are reading or interpreting something
> incorrectly, here. Can you please share your raw data, and where you
> got that raw data? Something like reports from free/ps/top/sar/etc.?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJYy+qWAAoJEBzwKT+lPKRYd38P/34EhmWZaueHBR2cLJeitXa9
> SOd5pf1XrtgVyyx6FebFQkNlckzUVV3LCrPMkL+OudWjezqU0c7O/F1sRlVJk18V
> A767jMpcSRI183QpDPBmbHKv6zsoVVibyXwMTbTDRAKzV+7JEGA4SrMEzEoyTcIv
> gak5ctUvAH6t+jQrLiuVCCIpsKnvDwoYmsbDo0fXmZ+mQgIHYSr3D4UCCEPBtsar
> o5uDJrwbGZRtKsHSvRoCxTGXlXIlD8SUE/+SlPsHo+R79AXN0cyI2GYSh8OfAW12
> 7gLzvrGpRzwyD34V/uFhoTugIx5OnNuN0Pw2jGBjrlRsDvBETiy/1CRKwMDe7u59
> 7ev9emoq5WpNRrDJuBN4MMzrFtBNOM/o04MPg5KVoM0clHyXOJrXbHJ1EkYWIkLr
> fdHr9ejfS9mQhYSYKXXSbjEDGOGGLrLmPbUJ6gfAg5PqsyNTYTYW24+bvpt1MykZ
> dkQXAB1CQ0YdNm6YIipYMD/d9kEYVpbXEKuVGT7QWTHRD3z/Pdcfp4hb05ckw0a3
> UIa8Jk1yh8Z+f4pjAKFPi1VhhbaGU8VjGXKpdVcso/Ljohe/SzKs+IWuSJ/H97tE
> VzEwgYaMEPdtfSnBG5Hf/6HtnME4TCXSBn8rBcGCgn4/rvUIMJZOlXePRT0BLBOt
> /vhOk/rN/5h1XOrqVaqF
> =hBJ4
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
Hi.

I will exceptionally contravene the usual rules of this list, which are to not top-post.
But your message below is so badly-formatted, that a comment in the middle would be 
difficut to read otherwise.

One thing attracted my attention below : you mention that "the entire memory was being 
used", which seems substantiated by a part of the "top" display :

 > Mem:  16334352k total, 15623536k used,   710816k free,    84096k buffers

But, in the subsequent per-process top display, it shows this :

 > 2019 siteadm   20   0 6054m 4.1g  17m S 98.0 26.5  11:29.56 java

So, this java process is using 4.1 GB of real memory.
Where did the other 11.9 GB go ?

You might want to run your Java application, and "top" again (without "-U"), and this time 
enter an "M" when top is running, to sort the processes by memory usage.


On 20.03.2017 17:46, Eric Chua wrote:
>   blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } I used jvmtop.  The web application used the entire 16gb and the allocated heap.  The report I was running never finished
>
> ARGS: start
>
> VMARGS: -Djava.util.logging.config.file=/data/tomcat/AgencyWebApp/conf/lo[...]
>
> VM: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 1.8.0_121
>
> UP:  0:13m  #THR: 41   #THRPEAK: 42   #THRCREATED: 49   USER: siteadm
>
> GC-Time:  0: 5m   #GC-Runs: 75        #TotalLoadedClasses: 12440
>
> CPU: 91.16% GC:  0.00% HEAP:3590m /3855m NONHEAP: 115m /  n/a
>
>
>
>    TID   NAME                                    STATE    CPU  TOTALCPU BLOCKEDBY
>
>       42 ajp-nio-8011-exec-8                  RUNNABLE 69.88%     4.63%
>
>       35 ajp-nio-8011-exec-1                  RUNNABLE 19.04%    15.49%
>
>       55 RMI TCP Connection(9)-127.0.0.       RUNNABLE  1.60%     0.20%
>
>       54 JMX server connection timeout   TIMED_WAITING  0.09%     0.01%
>
>       12 NioBlockingSelector.BlockPolle       RUNNABLE  0.07%     0.14%
>
>       47 ajp-nio-8011-AsyncTimeout       TIMED_WAITING  0.02%     0.02%
>
>       32 http-nio-8086-ClientPoller-0         RUNNABLE  0.00%     0.05%
>
>       45 ajp-nio-8011-ClientPoller-0          RUNNABLE  0.00%     0.10%
>
>       11 NioBlockingSelector.BlockPolle       RUNNABLE  0.00%     0.01%
>
>       34 http-nio-8086-AsyncTimeout      TIMED_WAITING  0.00%     0.01%
>
> Note: Only top 10 threads (according cpu load) are shown!
>
> Mar 20, 2017 12:39:28 PM ClientCommunicatorAdmin Checker-run
>
> WARNING: Failed to check the connection: java.net.SocketTimeoutException: Read timed out
>
> ^[[A^C^C^C^C^C^C^C^C^C
>
>
>
> siteadm@mavs01web11q:/data/tools/jvmtop $ top -U siteadm
>
> top - 12:41:20 up 19 min,  3 users,  load average: 1.25, 1.24, 0.87
>
> Tasks: 130 total,   1 running, 129 sleeping,   0 stopped,   0 zombie
>
> Cpu(s): 98.5%us,  1.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.5%si,  0.0%st
>
> Mem:  16334352k total, 15623536k used,   710816k free,    84096k buffers
>
> Swap:  4128764k total,        0k used,  4128764k free,   339484k cached
>
>
>
>    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>
> 2019 siteadm   20   0 6054m 4.1g  17m S 98.0 26.5  11:29.56 java
>
> 2523 siteadm   20   0 19288 1452 1080 R  0.3  0.0   0:00.02 top
>
> 1950 siteadm   20   0  105m 2100 1560 S  0.0  0.0   0:00.14 bash
>
>
> Sent from Yahoo Mail for iPhone
>
>
> On Monday, March 20, 2017, 10:21 AM, Eric Chua <in...@yahoo.com> wrote:
>
>
> siteadm   2007     1  7 11:04 pts/0    00:00:00 /data/java/jdk1.8.0_121/bin/java -Djava.util.logging.config.file=/data/tomcat/AgencyWebApp/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Daccuity.servername=mavs01web11q -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -classpath /data/tomcat/apache-tomcat/bin/bootstrap.jar:/data/tomcat/apache-tomcat/bin/tomcat-juli.jar -Dcatalina.base=/data/tomcat/AgencyWebApp -Dcatalina.home=/data/tomcat/apache-tomcat -Djava.io.tmpdir=/data/tomcat/AgencyWebApp/temp org.apache.catalina.startup.Bootstrap start
>
>
> My kernel is 2.6.32-642.15.1.elf.x86_64
> Memory gets all allocated and  after I kill it only a portion is recovered.  Any ideas?
>
> top - 11:18:36 up 16 min,  2 users,  load average: 1.92, 1.39, 0.68
>
> Tasks: 123 total,   1 running, 122 sleeping,   0 stopped,   0 zombie
>
> Cpu(s):  0.7%us,  0.0%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
>
> Mem:  16334352k total, 11215624k used,  5118728k free,    33788k buffers
>
> Swap:  4128764k total,        0k used,  4128764k free,   313940k cached
>
>
>
>    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>
> 1931 siteadm   20   0  105m 2120 1568 S  0.0  0.0   0:00.10 bash
>
> 2319 siteadm   20   0 19288 1460 1092 R  0.0  0.0   0:00.09 top
>
>
>
> Sent from Yahoo Mail for iPhone
>
>
> On Friday, March 17, 2017, 8:54 AM, Christopher Schultz <ch...@christopherschultz.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Eric,
>
> On 3/16/17 11:01 PM, Eric Chua wrote:
>> I am running tomcat 8.0.121.  When I start my tomcat, it seems to
>> be eating up all the memory on my system.  I have 16 GB, and it
>> keeps on going.
>
> What are your memory-related parameters when you launch the JVM?
>
> Note that Java *never* gives any memory back to the OS, even when the
> heap-usage goes down. This is a Java thing, not a Tomcat thing.
>
>> Then when I try to kill the process, it dies but 12 GB is still
>> being used even though everything is turn off.
>
> That makes no sense at all. Please provide some evidence this is
> happening.
>
>> The only way to reclaim the memory is to reboot.
>
> If this is true, then you have some kind of awful kernel bug.
>
>> I am running on redhat 6.5 and can't figure out what could be
>> causing this.  I run the tomcat as a local user, and I know there
>> aren't any other processes running as the local user.  I am running
>> a spring MVC 4/Java 8/ struts web application. I have two of them
>> with the same issue.  Any help would be appreciated. When I try to
>> view all the running processes I cannot see where most of the 12 gb
>> are being used.  The system came up with 2.2 gb used and after I
>> start one web application it goes to 14-15gb.
>
> Ok.
>
>> The funny thing is that I can kill it to reclaim the memory. Only
>> a reboot works.
>
> You mean you CAN'T kill in to reclaim memory, right?
>
>> I am running a VMware instance with vcenter version 6.5.  This
>> does not happen with Java 7 with tomcat 7. Any help would be
>> appreciate.
>
> Something tells me you are reading or interpreting something
> incorrectly, here. Can you please share your raw data, and where you
> got that raw data? Something like reports from free/ps/top/sar/etc.?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJYy+qWAAoJEBzwKT+lPKRYd38P/34EhmWZaueHBR2cLJeitXa9
> SOd5pf1XrtgVyyx6FebFQkNlckzUVV3LCrPMkL+OudWjezqU0c7O/F1sRlVJk18V
> A767jMpcSRI183QpDPBmbHKv6zsoVVibyXwMTbTDRAKzV+7JEGA4SrMEzEoyTcIv
> gak5ctUvAH6t+jQrLiuVCCIpsKnvDwoYmsbDo0fXmZ+mQgIHYSr3D4UCCEPBtsar
> o5uDJrwbGZRtKsHSvRoCxTGXlXIlD8SUE/+SlPsHo+R79AXN0cyI2GYSh8OfAW12
> 7gLzvrGpRzwyD34V/uFhoTugIx5OnNuN0Pw2jGBjrlRsDvBETiy/1CRKwMDe7u59
> 7ev9emoq5WpNRrDJuBN4MMzrFtBNOM/o04MPg5KVoM0clHyXOJrXbHJ1EkYWIkLr
> fdHr9ejfS9mQhYSYKXXSbjEDGOGGLrLmPbUJ6gfAg5PqsyNTYTYW24+bvpt1MykZ
> dkQXAB1CQ0YdNm6YIipYMD/d9kEYVpbXEKuVGT7QWTHRD3z/Pdcfp4hb05ckw0a3
> UIa8Jk1yh8Z+f4pjAKFPi1VhhbaGU8VjGXKpdVcso/Ljohe/SzKs+IWuSJ/H97tE
> VzEwgYaMEPdtfSnBG5Hf/6HtnME4TCXSBn8rBcGCgn4/rvUIMJZOlXePRT0BLBOt
> /vhOk/rN/5h1XOrqVaqF
> =hBJ4
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Eric Chua <in...@yahoo.com.INVALID>.
 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } I used jvmtop.  The web application used the entire 16gb and the allocated heap.  The report I was running never finished

ARGS: start

VMARGS: -Djava.util.logging.config.file=/data/tomcat/AgencyWebApp/conf/lo[...]

VM: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 1.8.0_121

UP:  0:13m  #THR: 41   #THRPEAK: 42   #THRCREATED: 49   USER: siteadm

GC-Time:  0: 5m   #GC-Runs: 75        #TotalLoadedClasses: 12440

CPU: 91.16% GC:  0.00% HEAP:3590m /3855m NONHEAP: 115m /  n/a

 

  TID   NAME                                    STATE    CPU  TOTALCPU BLOCKEDBY

     42 ajp-nio-8011-exec-8                  RUNNABLE 69.88%     4.63%

     35 ajp-nio-8011-exec-1                  RUNNABLE 19.04%    15.49%

     55 RMI TCP Connection(9)-127.0.0.       RUNNABLE  1.60%     0.20%

     54 JMX server connection timeout   TIMED_WAITING  0.09%     0.01%

     12 NioBlockingSelector.BlockPolle       RUNNABLE  0.07%     0.14%

     47 ajp-nio-8011-AsyncTimeout       TIMED_WAITING  0.02%     0.02%

     32 http-nio-8086-ClientPoller-0         RUNNABLE  0.00%     0.05%

     45 ajp-nio-8011-ClientPoller-0          RUNNABLE  0.00%     0.10%

     11 NioBlockingSelector.BlockPolle       RUNNABLE  0.00%     0.01%

     34 http-nio-8086-AsyncTimeout      TIMED_WAITING  0.00%     0.01%

Note: Only top 10 threads (according cpu load) are shown!

Mar 20, 2017 12:39:28 PM ClientCommunicatorAdmin Checker-run

WARNING: Failed to check the connection: java.net.SocketTimeoutException: Read timed out

^[[A^C^C^C^C^C^C^C^C^C

 

siteadm@mavs01web11q:/data/tools/jvmtop $ top -U siteadm

top - 12:41:20 up 19 min,  3 users,  load average: 1.25, 1.24, 0.87

Tasks: 130 total,   1 running, 129 sleeping,   0 stopped,   0 zombie

Cpu(s): 98.5%us,  1.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.5%si,  0.0%st

Mem:  16334352k total, 15623536k used,   710816k free,    84096k buffers

Swap:  4128764k total,        0k used,  4128764k free,   339484k cached

 

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND

2019 siteadm   20   0 6054m 4.1g  17m S 98.0 26.5  11:29.56 java

2523 siteadm   20   0 19288 1452 1080 R  0.3  0.0   0:00.02 top

1950 siteadm   20   0  105m 2100 1560 S  0.0  0.0   0:00.14 bash


Sent from Yahoo Mail for iPhone


On Monday, March 20, 2017, 10:21 AM, Eric Chua <in...@yahoo.com> wrote:


siteadm   2007     1  7 11:04 pts/0    00:00:00 /data/java/jdk1.8.0_121/bin/java -Djava.util.logging.config.file=/data/tomcat/AgencyWebApp/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Daccuity.servername=mavs01web11q -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -classpath /data/tomcat/apache-tomcat/bin/bootstrap.jar:/data/tomcat/apache-tomcat/bin/tomcat-juli.jar -Dcatalina.base=/data/tomcat/AgencyWebApp -Dcatalina.home=/data/tomcat/apache-tomcat -Djava.io.tmpdir=/data/tomcat/AgencyWebApp/temp org.apache.catalina.startup.Bootstrap start

  
My kernel is 2.6.32-642.15.1.elf.x86_64
Memory gets all allocated and  after I kill it only a portion is recovered.  Any ideas?

top - 11:18:36 up 16 min,  2 users,  load average: 1.92, 1.39, 0.68

Tasks: 123 total,   1 running, 122 sleeping,   0 stopped,   0 zombie

Cpu(s):  0.7%us,  0.0%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

Mem:  16334352k total, 11215624k used,  5118728k free,    33788k buffers

Swap:  4128764k total,        0k used,  4128764k free,   313940k cached

 

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND

1931 siteadm   20   0  105m 2120 1568 S  0.0  0.0   0:00.10 bash

2319 siteadm   20   0 19288 1460 1092 R  0.0  0.0   0:00.09 top

 

Sent from Yahoo Mail for iPhone


On Friday, March 17, 2017, 8:54 AM, Christopher Schultz <ch...@christopherschultz.net> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Eric,

On 3/16/17 11:01 PM, Eric Chua wrote:
> I am running tomcat 8.0.121.  When I start my tomcat, it seems to
> be eating up all the memory on my system.  I have 16 GB, and it
> keeps on going.

What are your memory-related parameters when you launch the JVM?

Note that Java *never* gives any memory back to the OS, even when the
heap-usage goes down. This is a Java thing, not a Tomcat thing.

> Then when I try to kill the process, it dies but 12 GB is still 
> being used even though everything is turn off.

That makes no sense at all. Please provide some evidence this is
happening.

> The only way to reclaim the memory is to reboot.

If this is true, then you have some kind of awful kernel bug.

> I am running on redhat 6.5 and can't figure out what could be 
> causing this.  I run the tomcat as a local user, and I know there 
> aren't any other processes running as the local user.  I am running
> a spring MVC 4/Java 8/ struts web application. I have two of them
> with the same issue.  Any help would be appreciated. When I try to
> view all the running processes I cannot see where most of the 12 gb
> are being used.  The system came up with 2.2 gb used and after I
> start one web application it goes to 14-15gb.

Ok.

> The funny thing is that I can kill it to reclaim the memory. Only
> a reboot works.

You mean you CAN'T kill in to reclaim memory, right?

> I am running a VMware instance with vcenter version 6.5.  This
> does not happen with Java 7 with tomcat 7. Any help would be
> appreciate.

Something tells me you are reading or interpreting something
incorrectly, here. Can you please share your raw data, and where you
got that raw data? Something like reports from free/ps/top/sar/etc.?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYy+qWAAoJEBzwKT+lPKRYd38P/34EhmWZaueHBR2cLJeitXa9
SOd5pf1XrtgVyyx6FebFQkNlckzUVV3LCrPMkL+OudWjezqU0c7O/F1sRlVJk18V
A767jMpcSRI183QpDPBmbHKv6zsoVVibyXwMTbTDRAKzV+7JEGA4SrMEzEoyTcIv
gak5ctUvAH6t+jQrLiuVCCIpsKnvDwoYmsbDo0fXmZ+mQgIHYSr3D4UCCEPBtsar
o5uDJrwbGZRtKsHSvRoCxTGXlXIlD8SUE/+SlPsHo+R79AXN0cyI2GYSh8OfAW12
7gLzvrGpRzwyD34V/uFhoTugIx5OnNuN0Pw2jGBjrlRsDvBETiy/1CRKwMDe7u59
7ev9emoq5WpNRrDJuBN4MMzrFtBNOM/o04MPg5KVoM0clHyXOJrXbHJ1EkYWIkLr
fdHr9ejfS9mQhYSYKXXSbjEDGOGGLrLmPbUJ6gfAg5PqsyNTYTYW24+bvpt1MykZ
dkQXAB1CQ0YdNm6YIipYMD/d9kEYVpbXEKuVGT7QWTHRD3z/Pdcfp4hb05ckw0a3
UIa8Jk1yh8Z+f4pjAKFPi1VhhbaGU8VjGXKpdVcso/Ljohe/SzKs+IWuSJ/H97tE
VzEwgYaMEPdtfSnBG5Hf/6HtnME4TCXSBn8rBcGCgn4/rvUIMJZOlXePRT0BLBOt
/vhOk/rN/5h1XOrqVaqF
=hBJ4
-----END PGP SIGNATURE-----

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








Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Eric Chua <in...@yahoo.com.INVALID>.
 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } 
siteadm   2007     1  7 11:04 pts/0    00:00:00 /data/java/jdk1.8.0_121/bin/java -Djava.util.logging.config.file=/data/tomcat/AgencyWebApp/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Daccuity.servername=mavs01web11q -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -classpath /data/tomcat/apache-tomcat/bin/bootstrap.jar:/data/tomcat/apache-tomcat/bin/tomcat-juli.jar -Dcatalina.base=/data/tomcat/AgencyWebApp -Dcatalina.home=/data/tomcat/apache-tomcat -Djava.io.tmpdir=/data/tomcat/AgencyWebApp/temp org.apache.catalina.startup.Bootstrap start

  
My kernel is 2.6.32-642.15.1.elf.x86_64
Memory gets all allocated and  after I kill it only a portion is recovered.  Any ideas?

top - 11:18:36 up 16 min,  2 users,  load average: 1.92, 1.39, 0.68

Tasks: 123 total,   1 running, 122 sleeping,   0 stopped,   0 zombie

Cpu(s):  0.7%us,  0.0%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

Mem:  16334352k total, 11215624k used,  5118728k free,    33788k buffers

Swap:  4128764k total,        0k used,  4128764k free,   313940k cached

 

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND

1931 siteadm   20   0  105m 2120 1568 S  0.0  0.0   0:00.10 bash

2319 siteadm   20   0 19288 1460 1092 R  0.0  0.0   0:00.09 top

 

Sent from Yahoo Mail for iPhone


On Friday, March 17, 2017, 8:54 AM, Christopher Schultz <ch...@christopherschultz.net> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Eric,

On 3/16/17 11:01 PM, Eric Chua wrote:
> I am running tomcat 8.0.121.  When I start my tomcat, it seems to
> be eating up all the memory on my system.  I have 16 GB, and it
> keeps on going.

What are your memory-related parameters when you launch the JVM?

Note that Java *never* gives any memory back to the OS, even when the
heap-usage goes down. This is a Java thing, not a Tomcat thing.

> Then when I try to kill the process, it dies but 12 GB is still 
> being used even though everything is turn off.

That makes no sense at all. Please provide some evidence this is
happening.

> The only way to reclaim the memory is to reboot.

If this is true, then you have some kind of awful kernel bug.

> I am running on redhat 6.5 and can't figure out what could be 
> causing this.  I run the tomcat as a local user, and I know there 
> aren't any other processes running as the local user.  I am running
> a spring MVC 4/Java 8/ struts web application. I have two of them
> with the same issue.  Any help would be appreciated. When I try to
> view all the running processes I cannot see where most of the 12 gb
> are being used.  The system came up with 2.2 gb used and after I
> start one web application it goes to 14-15gb.

Ok.

> The funny thing is that I can kill it to reclaim the memory. Only
> a reboot works.

You mean you CAN'T kill in to reclaim memory, right?

> I am running a VMware instance with vcenter version 6.5.  This
> does not happen with Java 7 with tomcat 7. Any help would be
> appreciate.

Something tells me you are reading or interpreting something
incorrectly, here. Can you please share your raw data, and where you
got that raw data? Something like reports from free/ps/top/sar/etc.?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYy+qWAAoJEBzwKT+lPKRYd38P/34EhmWZaueHBR2cLJeitXa9
SOd5pf1XrtgVyyx6FebFQkNlckzUVV3LCrPMkL+OudWjezqU0c7O/F1sRlVJk18V
A767jMpcSRI183QpDPBmbHKv6zsoVVibyXwMTbTDRAKzV+7JEGA4SrMEzEoyTcIv
gak5ctUvAH6t+jQrLiuVCCIpsKnvDwoYmsbDo0fXmZ+mQgIHYSr3D4UCCEPBtsar
o5uDJrwbGZRtKsHSvRoCxTGXlXIlD8SUE/+SlPsHo+R79AXN0cyI2GYSh8OfAW12
7gLzvrGpRzwyD34V/uFhoTugIx5OnNuN0Pw2jGBjrlRsDvBETiy/1CRKwMDe7u59
7ev9emoq5WpNRrDJuBN4MMzrFtBNOM/o04MPg5KVoM0clHyXOJrXbHJ1EkYWIkLr
fdHr9ejfS9mQhYSYKXXSbjEDGOGGLrLmPbUJ6gfAg5PqsyNTYTYW24+bvpt1MykZ
dkQXAB1CQ0YdNm6YIipYMD/d9kEYVpbXEKuVGT7QWTHRD3z/Pdcfp4hb05ckw0a3
UIa8Jk1yh8Z+f4pjAKFPi1VhhbaGU8VjGXKpdVcso/Ljohe/SzKs+IWuSJ/H97tE
VzEwgYaMEPdtfSnBG5Hf/6HtnME4TCXSBn8rBcGCgn4/rvUIMJZOlXePRT0BLBOt
/vhOk/rN/5h1XOrqVaqF
=hBJ4
-----END PGP SIGNATURE-----

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





Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

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

Erir,

On 3/18/17 2:09 AM, Eric Chua wrote:
> Thanks for getting back to me. The Linux version is 6.8.  I am
> unable to reclaim the memory on the system without a reboot .
> Though i kill my process, i dont see where the memory went.  When I
> run the application in windows I get no problems.  The only
> difference I can see are the parameters and jmx.  I will try to
> remove all the parameters and start from scratch.
> 
> How do I get you raw data?  This is observe behavior using top and 
> free.  I am working with our admin to determine a solution.

The programs "free" and "top" only report the amount of memory "free"
and aren't terribly specific about what is being used.

Rest assured, even if you have very little "free" memory, that memory
has been returned to the OS and can be used for other programs. If you
start your 16GiB process, then stop it, then start it again, it won't
crash.

I think what you are seeing is a fundamental misunderstanding of the
way memory is managed in the operating system. Specifically, this one
tenet: free memory is utterly useless.

What good is your 64GiB of RAM when you are only using 3-4GiB of it at
any given time? The answer is "it's not good". So, the OS uses all
that memory for all kinds of things: caching, buffering, etc. If you
suddenly need a couple of GiB for a newly-launched program, the OS
will happily shrink its buffers, etc. in order to allow new programs
to use that memory.

I think you are chasing a ghost that isn't actually there.

Unless you are getting Linux OOM problems, don't worry about your
memory usage.

- -chris

> On Friday, March 17, 2017, 8:54 AM, Christopher Schultz 
> <ch...@christopherschultz.net> wrote:
> 
> Eric,
> 
> On 3/16/17 11:01 PM, Eric Chua wrote:
>> I am running tomcat 8.0.121.  When I start my tomcat, it seems to
>>  be eating up all the memory on my system.  I have 16 GB, and it
>>  keeps on going.
> 
> What are your memory-related parameters when you launch the JVM?
> 
> Note that Java *never* gives any memory back to the OS, even when 
> the heap-usage goes down. This is a Java thing, not a Tomcat
> thing.
> 
>> Then when I try to kill the process, it dies but 12 GB is still 
>> being used even though everything is turn off.
> 
> That makes no sense at all. Please provide some evidence this is 
> happening.
> 
>> The only way to reclaim the memory is to reboot.
> 
> If this is true, then you have some kind of awful kernel bug.
> 
>> I am running on redhat 6.5 and can't figure out what could be 
>> causing this.  I run the tomcat as a local user, and I know there
>>  aren't any other processes running as the local user.  I am 
>> running a spring MVC 4/Java 8/ struts web application. I have
>> two of them with the same issue.  Any help would be appreciated.
>> When I try to view all the running processes I cannot see where
>> most of the 12 gb are being used.  The system came up with 2.2 gb
>> used and after I start one web application it goes to 14-15gb.
> 
> Ok.
> 
>> The funny thing is that I can kill it to reclaim the memory. Only
>> a reboot works.
> 
> You mean you CAN'T kill in to reclaim memory, right?
> 
>> I am running a VMware instance with vcenter version 6.5.  This
>> does not happen with Java 7 with tomcat 7. Any help would be 
>> appreciate.
> 
> Something tells me you are reading or interpreting something 
> incorrectly, here. Can you please share your raw data, and where
> you got that raw data? Something like reports from
> free/ps/top/sar/etc.?
> 
> -chris
> 
> ---------------------------------------------------------------------
>
>
> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> 
> 
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYz98aAAoJEBzwKT+lPKRY7nQP/2YKWy9ar5Ff5Ps1yrImLYXo
hpREPBAcZ6HXOsgQ336QD/ukE9UG5XtR0gb77r9epRoAKB3goVuBAtkQq6L7NSRN
nlTW+//YgmBpZCNoPUfYMgIQHC5zeF/iPAFKWcUbLw7jGdpvkyiLihCLQVOpLht9
gbdegcaDmK8JCPGjkFFRjPcMKs6i5E3Zqs7hN07YLp8Bj/tRJjXwLZjWxWI6vvVF
NXitog4EDj5wj9CyVvdvyW4AFLKUFj25/EbVZ+eR42O72ZKXmcKxphfDgAvNC5kL
x3hnAhUaKoCnAlL0EVybTnvU1QYBsxewfof9hFHeapMoJHOVXQJykBbx0MdGCf9Z
6i1Z87zKEoD2hmZ0ZDxaYMCYn/GtzY57hJku0zxY8L9g+qCt3DR9MtmcERh3N0QK
SdHuH28Vs8x7X1F15KurdV9NbMQacb4YrtR3GXEHc+KVWSClKKRM600Eug5taK7l
HBsRl0gTOjG/rWaBeDvwnwCtUSVRmzPz2QuZGNnQU3y8gk6c5zuPJZYF5zdYtjEb
0iVZYclvF1RvzGWFS81IW/2Dbw/Hu5eFC9WHeg3OGISGmADBvIyMbB5AcgYHri87
PioUBQvo8wvEF+XcDNE+sq0ZXs2EoKqS+83bYrkmnPa/PHdxr2v3F4HceU/ltZ2d
xgydC1CJbz3EmZlkahG0
=VGnE
-----END PGP SIGNATURE-----

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


Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Eric Chua <in...@yahoo.com.INVALID>.
 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } Thanks for getting back to me. The Linux version is 6.8.  I am unable to reclaim the memory on the system without a reboot .  Though i kill my process, i dont see where the memory went.  When I run the application in windows I get no problems.  The only difference I can see are the parameters and jmx.  I will try to remove all the parameters and start from scratch.   

How do I get you raw data?  This is observe behavior using top and free.  I am working with our admin to determine a solution.  
Thanks

Sent from Yahoo Mail for iPhone


On Friday, March 17, 2017, 8:54 AM, Christopher Schultz <ch...@christopherschultz.net> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Eric,

On 3/16/17 11:01 PM, Eric Chua wrote:
> I am running tomcat 8.0.121.  When I start my tomcat, it seems to
> be eating up all the memory on my system.  I have 16 GB, and it
> keeps on going.

What are your memory-related parameters when you launch the JVM?

Note that Java *never* gives any memory back to the OS, even when the
heap-usage goes down. This is a Java thing, not a Tomcat thing.

> Then when I try to kill the process, it dies but 12 GB is still 
> being used even though everything is turn off.

That makes no sense at all. Please provide some evidence this is
happening.

> The only way to reclaim the memory is to reboot.

If this is true, then you have some kind of awful kernel bug.

> I am running on redhat 6.5 and can't figure out what could be 
> causing this.  I run the tomcat as a local user, and I know there 
> aren't any other processes running as the local user.  I am running
> a spring MVC 4/Java 8/ struts web application. I have two of them
> with the same issue.  Any help would be appreciated. When I try to
> view all the running processes I cannot see where most of the 12 gb
> are being used.  The system came up with 2.2 gb used and after I
> start one web application it goes to 14-15gb.

Ok.

> The funny thing is that I can kill it to reclaim the memory. Only
> a reboot works.

You mean you CAN'T kill in to reclaim memory, right?

> I am running a VMware instance with vcenter version 6.5.  This
> does not happen with Java 7 with tomcat 7. Any help would be
> appreciate.

Something tells me you are reading or interpreting something
incorrectly, here. Can you please share your raw data, and where you
got that raw data? Something like reports from free/ps/top/sar/etc.?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYy+qWAAoJEBzwKT+lPKRYd38P/34EhmWZaueHBR2cLJeitXa9
SOd5pf1XrtgVyyx6FebFQkNlckzUVV3LCrPMkL+OudWjezqU0c7O/F1sRlVJk18V
A767jMpcSRI183QpDPBmbHKv6zsoVVibyXwMTbTDRAKzV+7JEGA4SrMEzEoyTcIv
gak5ctUvAH6t+jQrLiuVCCIpsKnvDwoYmsbDo0fXmZ+mQgIHYSr3D4UCCEPBtsar
o5uDJrwbGZRtKsHSvRoCxTGXlXIlD8SUE/+SlPsHo+R79AXN0cyI2GYSh8OfAW12
7gLzvrGpRzwyD34V/uFhoTugIx5OnNuN0Pw2jGBjrlRsDvBETiy/1CRKwMDe7u59
7ev9emoq5WpNRrDJuBN4MMzrFtBNOM/o04MPg5KVoM0clHyXOJrXbHJ1EkYWIkLr
fdHr9ejfS9mQhYSYKXXSbjEDGOGGLrLmPbUJ6gfAg5PqsyNTYTYW24+bvpt1MykZ
dkQXAB1CQ0YdNm6YIipYMD/d9kEYVpbXEKuVGT7QWTHRD3z/Pdcfp4hb05ckw0a3
UIa8Jk1yh8Z+f4pjAKFPi1VhhbaGU8VjGXKpdVcso/Ljohe/SzKs+IWuSJ/H97tE
VzEwgYaMEPdtfSnBG5Hf/6HtnME4TCXSBn8rBcGCgn4/rvUIMJZOlXePRT0BLBOt
/vhOk/rN/5h1XOrqVaqF
=hBJ4
-----END PGP SIGNATURE-----

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





Re: [OT] Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
On 20.03.2017 09:36, Olaf Kock wrote:
>
> Am 20.03.2017 um 09:30 schrieb Andr� Warnier (tomcat):
>> One may wonder in fact : if when resizing the Heap downwards, the JVM
>> is anyway not going to give the surplus memory back to the OS, then
>> why bother ? what is the surplus ex-Heap memory then used
>> interestingly for, by the JVM ?
>
> There's no real "resizing the heap downward". There's garbage
> collection, because the heap can't be grown any more (or because it's
> triggered by other means), but this just frees up some heap for more
> objects, it doesn't resize the heap. Some of the garbage collectors
> (predominantly old-generation collectors) do not even compact the heap,
> so that no block could be returned to the OS - and this might be the
> clue we're looking for as to why nothing is ever returned to the OS:
> There's just no contiguous block of memory that could be freed.
>
> Naturally the "surplus" heap (which is the heap freed up in former
> garbage collection) is used for new objects that will be created over time.
>

Thanks for the info.
Maybe it would be worth adding this to the Tomcat FAQ, such as around this page :

https://wiki.apache.org/tomcat/FAQ/Memory

(I did not write that page, so I am a bit reluctant to modify it)


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


Re: [OT] Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Olaf Kock <to...@olafkock.de>.
Am 20.03.2017 um 09:30 schrieb Andr� Warnier (tomcat):
> One may wonder in fact : if when resizing the Heap downwards, the JVM
> is anyway not going to give the surplus memory back to the OS, then
> why bother ? what is the surplus ex-Heap memory then used
> interestingly for, by the JVM ?

There's no real "resizing the heap downward". There's garbage
collection, because the heap can't be grown any more (or because it's
triggered by other means), but this just frees up some heap for more
objects, it doesn't resize the heap. Some of the garbage collectors
(predominantly old-generation collectors) do not even compact the heap,
so that no block could be returned to the OS - and this might be the
clue we're looking for as to why nothing is ever returned to the OS:
There's just no contiguous block of memory that could be freed.

Naturally the "surplus" heap (which is the heap freed up in former
garbage collection) is used for new objects that will be created over time.

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


Re: [OT] Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
On 19.03.2017 20:33, Olaf Kock wrote:
>
>
> Am 19.03.2017 um 13:37 schrieb Andr� Warnier (tomcat):
>> On 17.03.2017 14:54, Christopher Schultz wrote:
>>
>>>
>>> Note that Java *never* gives any memory back to the OS, even when the
>>> heap-usage goes down. This is a Java thing, not a Tomcat thing.
>>
>> I did not know that (*), and I have never seen this mentioned
>> explicitly in any Java documentation (not that I have read many).
>> What is the point of the Java "-Xms" and "-Xmx" command-line
>> parameters then (when they have different values).
> I can't remember where I've seen it, but it's been ages ago and I assume
> it since eternity.
>
> The difference between -Xms and -Xmx is:
> $ java -X 2>&1 | grep "Java heap size"
>      -Xms<size>        set initial Java heap size
>      -Xmx<size>        set maximum Java heap size
>
> i.e. -Xms only talks about the /initial/, not about the minimal heap size.

Aaah. That may be where my confusion got in, indeed. I was assuming it to be both the 
initial and minimal heap size, and was hitherto assuming that when Java doesn't need such 
a big Heap anymore, it returns the surplus memory to the OS.

>
> In production systems I religiously set both sizes to identical values,
> assuming that otherwise allocation of more than the initial memory will
> fail sunday night at 3am instead of right when the JVM is started.

Yes, so do I, for the same reason, /and/ to save that smidge of overhead which would be 
otherwise due to the Java JVM having to resize the Heap regularly.  Which is another thing 
which I read once somewhere and believed, without ever really having gone to the bottom of it.

One may wonder in fact : if when resizing the Heap downwards, the JVM is anyway not going 
to give the surplus memory back to the OS, then why bother ? what is the surplus ex-Heap 
memory then used interestingly for, by the JVM ?

>
> Olaf
>
>>
>> (*) I thought it was only perl doing that
>>
>>
>> ---------------------------------------------------------------------
>> 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
>


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


Re: [OT] Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Olaf Kock <to...@olafkock.de>.

Am 19.03.2017 um 13:37 schrieb Andr� Warnier (tomcat):
> On 17.03.2017 14:54, Christopher Schultz wrote:
>
>>
>> Note that Java *never* gives any memory back to the OS, even when the
>> heap-usage goes down. This is a Java thing, not a Tomcat thing.
>
> I did not know that (*), and I have never seen this mentioned
> explicitly in any Java documentation (not that I have read many).
> What is the point of the Java "-Xms" and "-Xmx" command-line
> parameters then (when they have different values).
I can't remember where I've seen it, but it's been ages ago and I assume
it since eternity.

The difference between -Xms and -Xmx is:
$ java -X 2>&1 | grep "Java heap size"
    -Xms<size>        set initial Java heap size
    -Xmx<size>        set maximum Java heap size

i.e. -Xms only talks about the /initial/, not about the minimal heap size.

In production systems I religiously set both sizes to identical values,
assuming that otherwise allocation of more than the initial memory will
fail sunday night at 3am instead of right when the JVM is started.

Olaf

>
> (*) I thought it was only perl doing that
>
>
> ---------------------------------------------------------------------
> 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


[OT] Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
On 17.03.2017 14:54, Christopher Schultz wrote:

>
> Note that Java *never* gives any memory back to the OS, even when the
> heap-usage goes down. This is a Java thing, not a Tomcat thing.

I did not know that (*), and I have never seen this mentioned explicitly in any Java 
documentation (not that I have read many).
What is the point of the Java "-Xms" and "-Xmx" command-line parameters then (when they 
have different values).

(*) I thought it was only perl doing that


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


Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by calder <ca...@gmail.com>.
On Sun, Mar 19, 2017 at 12:48 PM, André Warnier (tomcat) <aw...@ice-sa.com> wrote:
> On 17.03.2017 14:54, Christopher Schultz wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> Eric,
>>
>> On 3/16/17 11:01 PM, Eric Chua wrote:
>>>
>>> I am running tomcat 8.0.121.  When I start my tomcat, it seems to
>>> be eating up all the memory on my system.  I have 16 GB, and it
>>> keeps on going.
>>
>>
>> What are your memory-related parameters when you launch the JVM?
>>
>> Note that Java *never* gives any memory back to the OS, even when the
>> heap-usage goes down. This is a Java thing, not a Tomcat thing.
>>
>>> Then when I try to kill the process, it dies but 12 GB is still
>>> being used even though everything is turn off.
>>
>>
>> That makes no sense at all. Please provide some evidence this is
>> happening.
>>
>>> The only way to reclaim the memory is to reboot.
>>
>>
>> If this is true, then you have some kind of awful kernel bug.
>>
>>> I am running on redhat 6.5 and can't figure out what could be
>>> causing this.  I run the tomcat as a local user, and I know there
>>> aren't any other processes running as the local user.  I am running
>>> a spring MVC 4/Java 8/ struts web application. I have two of them
>>> with the same issue.  Any help would be appreciated. When I try to
>>> view all the running processes I cannot see where most of the 12 gb
>>> are being used.   The system came up with 2.2 gb used and after I
>>> start one web application it goes to 14-15gb.
>>
>>
>> Ok.
>>
>>> The funny thing is that I can kill it to reclaim the memory. Only
>>> a reboot works.
>>
>>
>> You mean you CAN'T kill in to reclaim memory, right?
>>
>>> I am running a VMware instance with vcenter version 6.5.  This
>>> does not happen with Java 7 with tomcat 7. Any help would be
>>> appreciate.
>>
>>
>> Something tells me you are reading or interpreting something
>> incorrectly, here. Can you please share your raw data, and where you
>> got that raw data? Something like reports from free/ps/top/sar/etc.?
>>
>
> The OP might be looking at "memory usage" in the Vmware GUI, and confusing
> "memory allocated to that Virtual Machine", with "memory usage within the OS
> of that Virtual Machine".
> If Vmware at some point allocated more memory to that Virtual Machine, it
> may never reduce it until some other VM wouls need it (or indeed until the
> OS of the VM is rebooted).
>
> With Vmware birtualisation, it can easily get a bit confusing when trying to
> figure out "memory usage". Try figuring out what happens to Linux memory
> swapping for instance.
> (Or "ballooning").

Agreed.

One could easily find any rogue JVMs with a "ps aux | grep java"

Anyway, here's what I would do - as a superuser, run Mission Control -
it will list any JVMs running.
If there are any JVMs running, other than the Mission Control JVM,
connect to the one with the high memory usage to investigate.

If there are no other JVMs running, then there's your answer - there
is no rogue JVM consuming 12-14gb RAM.

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


Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by "André Warnier (tomcat)" <aw...@ice-sa.com>.
On 17.03.2017 14:54, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Eric,
>
> On 3/16/17 11:01 PM, Eric Chua wrote:
>> I am running tomcat 8.0.121.  When I start my tomcat, it seems to
>> be eating up all the memory on my system.  I have 16 GB, and it
>> keeps on going.
>
> What are your memory-related parameters when you launch the JVM?
>
> Note that Java *never* gives any memory back to the OS, even when the
> heap-usage goes down. This is a Java thing, not a Tomcat thing.
>
>> Then when I try to kill the process, it dies but 12 GB is still
>> being used even though everything is turn off.
>
> That makes no sense at all. Please provide some evidence this is
> happening.
>
>> The only way to reclaim the memory is to reboot.
>
> If this is true, then you have some kind of awful kernel bug.
>
>> I am running on redhat 6.5 and can't figure out what could be
>> causing this.  I run the tomcat as a local user, and I know there
>> aren't any other processes running as the local user.  I am running
>> a spring MVC 4/Java 8/ struts web application. I have two of them
>> with the same issue.  Any help would be appreciated. When I try to
>> view all the running processes I cannot see where most of the 12 gb
>> are being used.   The system came up with 2.2 gb used and after I
>> start one web application it goes to 14-15gb.
>
> Ok.
>
>> The funny thing is that I can kill it to reclaim the memory. Only
>> a reboot works.
>
> You mean you CAN'T kill in to reclaim memory, right?
>
>> I am running a VMware instance with vcenter version 6.5.  This
>> does not happen with Java 7 with tomcat 7. Any help would be
>> appreciate.
>
> Something tells me you are reading or interpreting something
> incorrectly, here. Can you please share your raw data, and where you
> got that raw data? Something like reports from free/ps/top/sar/etc.?
>

The OP might be looking at "memory usage" in the Vmware GUI, and confusing "memory 
allocated to that Virtual Machine", with "memory usage within the OS of that Virtual Machine".
If Vmware at some point allocated more memory to that Virtual Machine, it may never reduce 
it until some other VM wouls need it (or indeed until the OS of the VM is rebooted).

With Vmware birtualisation, it can easily get a bit confusing when trying to figure out 
"memory usage". Try figuring out what happens to Linux memory swapping for instance.
(Or "ballooning").



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


Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

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

Eric,

On 3/16/17 11:01 PM, Eric Chua wrote:
> I am running tomcat 8.0.121.  When I start my tomcat, it seems to
> be eating up all the memory on my system.  I have 16 GB, and it
> keeps on going.

What are your memory-related parameters when you launch the JVM?

Note that Java *never* gives any memory back to the OS, even when the
heap-usage goes down. This is a Java thing, not a Tomcat thing.

> Then when I try to kill the process, it dies but 12 GB is still 
> being used even though everything is turn off.

That makes no sense at all. Please provide some evidence this is
happening.

> The only way to reclaim the memory is to reboot.

If this is true, then you have some kind of awful kernel bug.

> I am running on redhat 6.5 and can't figure out what could be 
> causing this.  I run the tomcat as a local user, and I know there 
> aren't any other processes running as the local user.  I am running
> a spring MVC 4/Java 8/ struts web application. I have two of them
> with the same issue.  Any help would be appreciated. When I try to
> view all the running processes I cannot see where most of the 12 gb
> are being used.   The system came up with 2.2 gb used and after I
> start one web application it goes to 14-15gb.

Ok.

> The funny thing is that I can kill it to reclaim the memory. Only
> a reboot works.

You mean you CAN'T kill in to reclaim memory, right?

> I am running a VMware instance with vcenter version 6.5.  This
> does not happen with Java 7 with tomcat 7. Any help would be
> appreciate.

Something tells me you are reading or interpreting something
incorrectly, here. Can you please share your raw data, and where you
got that raw data? Something like reports from free/ps/top/sar/etc.?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYy+qWAAoJEBzwKT+lPKRYd38P/34EhmWZaueHBR2cLJeitXa9
SOd5pf1XrtgVyyx6FebFQkNlckzUVV3LCrPMkL+OudWjezqU0c7O/F1sRlVJk18V
A767jMpcSRI183QpDPBmbHKv6zsoVVibyXwMTbTDRAKzV+7JEGA4SrMEzEoyTcIv
gak5ctUvAH6t+jQrLiuVCCIpsKnvDwoYmsbDo0fXmZ+mQgIHYSr3D4UCCEPBtsar
o5uDJrwbGZRtKsHSvRoCxTGXlXIlD8SUE/+SlPsHo+R79AXN0cyI2GYSh8OfAW12
7gLzvrGpRzwyD34V/uFhoTugIx5OnNuN0Pw2jGBjrlRsDvBETiy/1CRKwMDe7u59
7ev9emoq5WpNRrDJuBN4MMzrFtBNOM/o04MPg5KVoM0clHyXOJrXbHJ1EkYWIkLr
fdHr9ejfS9mQhYSYKXXSbjEDGOGGLrLmPbUJ6gfAg5PqsyNTYTYW24+bvpt1MykZ
dkQXAB1CQ0YdNm6YIipYMD/d9kEYVpbXEKuVGT7QWTHRD3z/Pdcfp4hb05ckw0a3
UIa8Jk1yh8Z+f4pjAKFPi1VhhbaGU8VjGXKpdVcso/Ljohe/SzKs+IWuSJ/H97tE
VzEwgYaMEPdtfSnBG5Hf/6HtnME4TCXSBn8rBcGCgn4/rvUIMJZOlXePRT0BLBOt
/vhOk/rN/5h1XOrqVaqF
=hBJ4
-----END PGP SIGNATURE-----

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


Re: [OT] Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

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

Mark,

On 3/18/17 2:58 PM, Mark Eggers wrote:
> I also have a lot of systems running on AWS Elastic Beanstalk, but
> right now those systems are stock AWS AMI images.
> 
> They're running AWS's repackaged Tomcat 8.0.41, and OpenJDK
> 1.8.0_121-b13.

Can you please contact me off-list about this?

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYz996AAoJEBzwKT+lPKRYIlwP/0tgJLIGRdM6wq038QDoQMzE
iquMKEHQakngemTxefgHRmjkqAzVRk4Bs+NZ4lLxtzFL6Mwh/zGOrHDkW6TwZefJ
9LN2GubN5jcv2r6YQ6jsB0CkWxMskw+kBCoSFhkj1mRSFlixqTP0SAAuTaC6g3+Z
ijjG4KU/5n3ZsFFfRL07eXBXGZ95ziaFvkUk7GW2bJPDLXtMwlKF6/Ec5vtp8LOI
qwVXK8b9dduzGPl8RMJDf1SiN/Wk2H8mbYX0lmEgfxcN8LRMSmajfl8w/ptUyXbZ
9GxACe4dQFADDup+cPmucjqvJb8KY8GMb7VKy+asJO0yCqUNOutcg9bQYLlsAOKo
an+VRnHysjUErr0d0MOdD0WJpgzQehVdSSPVMVixz2YBewYgN6FawRB8ejW3/ynv
A5CHPnZdLlRIepuyvU2HgipOUz9lrEzdAtc20wplAw15ma5D8+BRyP1ihs+JGmFt
ZMIBC5LYpdDOWIftbXjZLFEk+9FhPAZR8lvw86uUzGSdKBkIhN11BFPd1gIWBZ/k
LByc2/mzSdmLh+gD0S6W8Q66icOiAfkkoGrlFlbDfFFI+aDMimj6MJHEmQA32T3v
WfFTDFEVE//mOvT6pUI9Pz8ayo/FUX8FAQCih0/YmZRqFyr0WcX5TuAhclfSFIzf
HLbdvdAnyws3i1scklwj
=Ti0W
-----END PGP SIGNATURE-----

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


Re: Tomcat 8/Redhat Linux 6.6 /Kernal 2.6.32 - Memory Won't Release

Posted by Mark Eggers <it...@yahoo.com.INVALID>.
Eric,

On 3/16/2017 8:01 PM, Eric Chua wrote:
> I am running tomcat 8.0.121.  When I start my tomcat, it seems to be
> eating up all the memory on my system.  I have 16 GB, and it keeps on
> going.  Then when I try to kill the process, it dies but 12 GB is
> still being used even though everything is turn off.  The only way to
> reclaim the memory is to reboot.  I am running on redhat 6.5 and
> can't figure out what could be causing this.  I run the tomcat as a
> local user, and I know there aren't any other processes running as
> the local user.  I am running a spring MVC 4/Java 8/ struts web
> application. I have two of them with the same issue.  Any help would
> be appreciated. When I try to view all the running processes I cannot
> see where most of the 12 gb are being used.   The system came up with
> 2.2 gb used and after I start one web application it goes to 14-15gb.
> The funny thing is that I can kill it to reclaim the memory. Only a
> reboot works.  I am running a VMware instance with vcenter version
> 6.5.  This does not happen with Java 7 with tomcat 7. Any help would
> be appreciate.

I don't see this with any of my systems running the following configuration:

OS:     CentOS 6.8
kernel: 2.6.32-642.15.1.el6.x86_64
JRE:    1.8.0_121-b13
Tomcat: 8.0.41.0 (from tomcat.apache.org)

I'm slated to update these systems to 8.0.42 once I complete my tests. I
don't anticipate any issues, but a process is only good if you follow it.

Some of my VM systems run on VMWare, and others run on Xen.

I also have a lot of systems running on AWS Elastic Beanstalk, but right
now those systems are stock AWS AMI images.

They're running AWS's repackaged Tomcat 8.0.41, and OpenJDK 1.8.0_121-b13.

I don't see any issues there as well. I run a lot of microservices on
t2.micro EC2 instances. t2.micro instances are very memory-constrained.
I would see a lot of EC2 churn if I had memory issues.

Please get some sar / top / vmstat information from your system
administrator and post it to the list.

Also, does your application make use of native libraries? If so, what
are they, and are they compatible with Java 8?

. . . just my two cents
/mde/