Arun, which version of ActiveMQ are you running? How much memory is the broker given? If you gave it too much memory perhaps that is causing the broker to keep grabbing more, postponing garbage collection. If its 4.1.1 try a newer version of ActiveMQ like 5.4.1. You can download it from apache at http://activemq.apache.org/download.html. Just start the broker from ACTIVEMQ_HOME/bin directory. If this fixes the memory leak stop clients and services, set ACTIVEMQ_HOME to point to a new broker location and restart.
JC On Thu, Mar 17, 2011 at 7:39 AM, Arun Tewatia <[email protected]>wrote: > Hi , > > As suggested i looked at heap dumps, for any trace of memory leaks. But i > couldn't trace any. > > I ran the same test on Ubuntu10.04, Ubuntu 9.10 and CentOS to confirm that > this > memory leak was not at the OS level. But the results are same in all 3 > cases. > > Memory usage by all the service instances and client request processes > becomes > constant once the processing starts. But broker memory usage keeps on > increasing. > > My server has 16Gb ram and 8 cores. > I provided heap size to both client and broker ( 1Gb to 2Gb). > Here are top command output of client,service and broker > > Client request > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 20915 root 20 0 2365m 561m 11m S 10 3.5 2:33.28 java > > 20915 root 20 0 2365m 562m 11m S 46 3.5 2:34.66 java > > 20915 root 20 0 2365m 562m 11m S 5 3.5 2:34.81 java > > 20915 root 20 0 2365m 562m 11m S 18 3.5 2:35.34 java > > 20915 root 20 0 2365m 562m 11m S 30 3.5 2:36.24 > java > ............ > > Service > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 3216 root 20 0 1232m 923m 11m S 75 5.7 73:16.17 java > > 1854 root 20 0 70436 3216 2472 S 0 0.0 0:02.85 sshd > > 3216 root 20 0 1232m 923m 11m S 62 5.7 73:18.05 java > > 3216 root 20 0 1232m 923m 11m S 88 5.7 73:20.70 java > > 3216 root 20 0 1232m 923m 11m S 81 5.7 73:23.15 java > > ............ > > Broker > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 19266 root 20 0 2418m 399m 10m S 2 2.5 0:56.67 java > > 19266 root 20 0 2418m 399m 10m S 3 2.5 0:56.75 java > > 19266 root 20 0 2418m 400m 10m S 3 2.5 0:56.83 java > > 19266 root 20 0 2418m 400m 10m S 2 2.5 0:56.90 java > > 19266 root 20 0 2418m 400m 10m S 2 2.5 0:56.96 java > > ............. > > > > > > Thanks! > > Arun Tewatia > > >
