swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Memory allocation/deallocations in swarm -- lead to thrashing?


From: joh
Subject: Memory allocation/deallocations in swarm -- lead to thrashing?
Date: Mon, 19 Jan 1998 14:54:21 -0500 (EST)

Hi, again
Now swarm-1.0.5 is released, I have a question about memory management
in swarm.  Hopefully someone out there can help me on this issue and
at the same time, I hope that I don't offend anyone with my question.
BTW, I'm using swarm-1.0.2 now.

It seems that swarm applications seems to "eat-up" the main memory
and the size of memory usage grows  monotonically. Not only my own  swarm 
applications (well, I may still have hidden memory leak...) but also simple 
applications such as heatbugs grow their memory consumptions. Since the
pop. size in heatbugs is static, I am a bit puzzled of the "memory leak."
If you haven't tried, run heatbugs in batchmode for a large 
durations. Then check the memory usage by using the commands either 
"ps u" or "ps m" (The command may slightly different for different OSs)
You can see the amount of memory used by heatbugs grows slowly but steadily.

The same can be observed for mousetrap, hello-world, etc. applications.
If a swarm application requires a large number of iteration, IMHO, even without
dynamic memory allocations in the application itself, the application will
require more and more memory and eventually make the system "thrash."
In fact, I was able to make my system of 128M memory thrash with modified
mousetrap and other applications. The mousetrap is modified to run
for a large iterations.

It seems that this "memory leak" comes from other than the application --
i.e. from swarm libraries, or from other libraries such as tcl/tk, BLT.

Why is it like this? One reason, I can think of is that each time a 
data element is produced, say for a graph, a corresponding new object is 
created in the "graphSequence" -- allocating more memory for the application.
However, that seems not the always the case. It seems that swarm applications
without graphElement seem to "eat-up" the memory as well. Another possible
reason could be that each "Activity" in swarm can cost some memory.

It is really a problem to me and possibly to others since most of my simulation 
require long long simulation. Has anyone encountered the similar phenomenon?
Can anyone offer a solution or an explanation? If someone out there
installed swarm-1.0.5, could you see if the newest version still does
the same?

Thank you 


---
                Jae C. Oh
                315 Alumni Hall
                Department of Computer Science
                The University of Pittsburgh
                Pittsburgh, PA 15260

                Office: 315AL 624-8456
                WWW - http://www.cs.pitt.edu:80/~joh/



                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]