Mantis Bug Tracker

View Revisions: Issue #8031 All Revisions ] Back to Issue ]
Summary 0008031: Very slow simulator start up time with regions containing lots of scripts
Revision 2016-10-05 19:05 by mewtwo0641
Description Since commit 5afc5fe343172c315adec97cd8348357a196d5d2 OpenSim load time has increased quite noticeably when there are a lot of scripts to be loaded. In my observations prior to this commit start up times were around 3 or 4 minutes for all regions and all scripts to be loaded. After this commit, on the same database with exact same OpenSim.ini settings, exact same regions, and exact same scripts to be loaded; This start up time has ballooned to 20 - 30 minutes for all scripts to load and for the CPU use to stabilize enough for logging in.


I've pinned it down to DoOnRezScript() in /OpenSim/Region/ScriptEngine/XEngine/XEngine.cs

...
// do not load a assembly on top of a lot of to release memory
// also yield a bit
GC.Collect(2);
...

The garbage collection on every script that's loaded seems to be slowing things down dramatically.

To test this, I commented out the GC.Collect(2); line, recompiled, removed the ScriptEngines directory, and started OpenSim again and load times are back to "normal" at around average of 3 to 4 minutes.

After verifying that load times are back to a reasonable amount of time I uncommented the GC.Collect(2); line, recompiled, removed the ScriptEngines directory, and started OpenSim and observed that load time is again taking a very long time to finish.

This also affects 0.9.0 RC1
Revision 2016-10-05 18:58 by mewtwo0641
Description Since commit 5afc5fe343172c315adec97cd8348357a196d5d2 OpenSim load time has increased quite noticeably when there are a lot of scripts to be loaded. In my observations prior to this commit start up times were around 3 or 4 minutes for all regions and all scripts to be loaded. After this commit, on the same database with exact same OpenSim.ini settings, exact same regions, and exact same scripts to be loaded; This start up time has ballooned to 20 - 30 minutes for all scripts to load and for the CPU use to stabilize enough for logging in.


I've pinned it down to DoOnRezScript(); the lines

...
// do not load a assembly on top of a lot of to release memory
// also yield a bit
GC.Collect(2);
...

The garbage collection on every script that's loaded seems to be slowing things down dramatically.

To test this, I commented out the GC.Collect(2); line, recompiled, removed the ScriptEngines directory, and started OpenSim again and load times are back to "normal" at around average of 3 to 4 minutes.

After verifying that load times are back to a reasonable amount of time I uncommented the GC.Collect(2); line, recompiled, removed the ScriptEngines directory, and started OpenSim and observed that load time is again taking a very long time to finish.

This also affects 0.9.0 RC1


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker