[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Garbage collection question
- From: John Dunn <John_Dunn@...>
- Date: Tue, 10 Jul 2012 18:02:42 +0000
> Have you tried to increase the GC parameters? (e.g., making it more
> agressive with 'collectgarbage("setpause", 100)')
My test case is running 1000 scripts in my host environment, each calling the EventHandler callback at 100Hz. All of these were run without any modifications or recompiling of my host app. I used Process Explorer on Windows to track memory usage so it's not the most scientific approach.
Basic script - grows ~100MB every 15 minutes
w/ "collect" inside EventHandler - grows 0MB every 15 minutes
w/ "setpause" 100 once at beginning of script = grows ~70MB every 15 minutes
w/ "setpause" 200 once at beginning of script = still growing but not completely linear. Roughly like
+70MB 5 minutes
Flat for 3 minutes
+18MB over 1 minute
Flat for 3 minutes
+16MB over 1 minute
Flat for 3 minutes
Etc...
I wrote a very simple app to try and replicate the issue but that worked as expected - I saw the memory grow and then release periodically without any long term growth. I know that points to an issue in my app but I'm curious how a call to "collect" could fix that. I am trying to get my app running with 5.2 but there's enough changes that it's taking me a little while to do so.