views:

89

answers:

4

I have a process running 24 hours on my system comtinuously for 45 days. In the morning the number of threads are 20 and in the afternoon the number of threads are 100 and in the evening the number of threads again comes back to 20. But the Mem Usage and VM size values does not come back to the values when the number of threads were just 20... The values goes on increasing everyday untill i restart my system? what is the underlying matters in this ? please explain me ....

Thank you in advance.

Anusha G

+2  A: 

Sounds like you have a memory leak. Without more info, it is impossible to say why.

Matthew Flaschen
I have written the code in java. after restarting my system, the memory taken is around 15,000 kb and the number of threads will be 20. I am using windows 2003
+1  A: 

You might have a small memory leak in your code that is accumulating over time. Each thread might be leaking a little memory each time it runs. The threads will spawn and die, but memory will continue to go up.

Andy White
+5  A: 

It could be because of Memory leaks and/or Memory fragmentation. Use some memory profiling tools to figure this out.

Canopus
A: 

As the others have mentioned it is a memory leak, if you are using Java you can use profilers like JProfiler, Yourkit Profiler to see where the memory leaks happen. If in other languages you should find how to profile those applications

Ram