-----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-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org