I am replying once again, as I thought I need more help on these.

top - 15:49:32 up 2 days, 21:33,  1 user,  load average: 0.26, 0.28, 0.20
Tasks:  57 total,   2 running,  55 sleeping,   0 stopped,   0 zombie
Cpu(s):  4.5%us,  0.5%sy,  0.0%ni, 94.5%id,  0.0%wa,  0.0%hi,  0.5%si,
0.0%st
Mem:   2074972k total,  2019180k used,    55792k free,   228732k buffers
Swap:  6072528k total,      108k used,  6072420k free,  1383868k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
12496 root      18   0  971m 285m  12m S    9 14.1 165:55.34 java
 4423 mysql     15   0  129m  28m 5404 S    2  1.4  67:49.96 mysqld
    1 root      18   0  2912 1848  524 S    0  0.1   0:01.44 init
    2 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0
This is my machines top. I am using tomcat 6 and it has eaten all my memory.
Only 56 Mb reamains. I have a 2GB memory. I have added a connection pool
using commons-dbcp and thought that will reduce the probs. What is your
suggestion. As I told there is a scheduler running on every minute. Looks
like I have some memory leak. Otherwise why does my machine uses this memory
this much. I have an autobuild script running everyday which checkouts from
sourceforge cvs , stops the servers, build it and redeploy and start tomcat.
Yet , today I looked at my machine , and Ah ! here we goes.
I have not used any tweaks in xml.Should I tune the server to production
mode. What is the soultion ? Why does not the objects get garbage
colllected.?



On 10/11/07, Juha Laiho <[EMAIL PROTECTED]> wrote:
>
> Arun wrote:
> > That worked finally with the increase in PermGen space.
>
> > I am a bit concerned about my server memory.
> > See my top (not mine ofcourse)
> >
> > top - 09:38:18 up  9:16,  3 users,  load average: 0.27, 0.18, 0.10
> >   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> >  9770 root      25   0  491m  93m  35m R  102  4.6   0:13.64 java
> >
> > top - 09:38:33 up  9:16,  3 users,  load average: 0.43, 0.22, 0.11
> >   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> >  9770 root      25   0  504m 138m  35m R  100  6.8   0:28.66 java
> >
> > top - 09:38:42 up  9:16,  3 users,  load average: 0.52, 0.25, 0.12
> >   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> >  9770 root      25   0  512m 166m  31m R  100  8.2   0:37.63 java
> >
> > top - 09:39:03 up  9:17,  3 users,  load average: 0.45, 0.25, 0.12
> >   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> >  9770 root      25   0  529m 175m  31m S   96  8.7   0:41.00 java
> >
> > top - 09:39:21 up  9:17,  3 users,  load average: 0.42, 0.25, 0.13
> >   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> >  9770 root      25   0  561m 192m  31m S    9  9.5   0:47.93 java
> >
> >
> > See Mem: line and see the second one . It rises so fast  . See at what
> rate.
>
> Well, look at the CPU consumption at the same period - so your Tomcat
> is working on something. Looking at the amount of CPU time consumed,
> it could even be still running the application startup (Tomcat by itself
> can take something like 20 seconds of pure CPU time, on some machine
> architectures at least -- and here the CPU time usage is running from
> 13 to 48 seconds - so it's still too early to say whether the rise
> in memory usage will continue or not).
>
> > What is this PermGen space. Why does not it get garbage collected.
>
> PermGen is the holding space for the program code in your currently
> active classes. So, looks like whatever you're using has quite a large
> active codebase.
>
> > Is there anyway  I can tell tomcat to suggest the VM a garbage
> collection
> > more often than the default garbage collection algorithm does. Is there
> any
> > declerative way of doing, xml, .sh?
>
> Even PermGen is cleaned in current JVM versions -- but classes can only
> be unloaded when there's no reference to the class within the JVM.
> And garbage collection overall is done when needed: it is definitely
> done before JVM throws an out of memory error. There's quite a lot of
> tunables for the JVM (including garbage collection), but pretty much
> you should trust the defaults (unless you have experience to actually
> distrust the defaults because of some specific feature in your application
> or runtime environment).
> --
> ..Juha
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Thanks
Arun George

Reply via email to