On Mon, Mar 20, 2017 at 4:46 PM, Eric Chua <in_hi...@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_hi...@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-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org