Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006537opensim[REGION] OpenSim Corepublic2013-02-09 13:222013-02-10 11:34
ReporterAllen Kerensky 
Assigned ToBlueWall 
PrioritylowSeveritytweakReproducibilityalways
StatusclosedResolutionfixed 
PlatformAMD X86_64OSFedora LinuxOS Version17
Product Versionmaster (dev code) 
Target VersionFixed in Versionmaster (dev code) 
Summary0006537: [PATCH] Additional ThreadPool worker and IOCP thread startup logic
DescriptionOn startup, my system reported:
2013-02-09 09:23:12,377 INFO - OpenSim.Application [OPENSIM MAIN]: Runtime gave us 600 worker threads and 24 IOCP threads
2013-02-09 09:23:12,377 INFO - OpenSim.Application [OPENSIM MAIN]: Bumping up to 500 worker threads and 1000 IOCP threads
Steps To Reproducemono OpenSim.exe -physics BulletSim
Additional InformationI reviewed OpenSim/Region/Application/Application.cs

There was a single check that said:
"if workerthreads < 500 OR IOCPthreads < 1000, set BOTH to a number"

From the startup log messages, you can see this bumped the IOCP threads up from 24 to 1000 which is the default used in other CLRs.

However, this also caused my system to drop from 600 starting workerthreads to 500, as an unintended side effect of the need to raise IOCP.

I split the single if/then check which set both settings into separate if/then checks for minimum and maximum bounds checking for both settings.

These two settings are closely tied to the System.Threading.ThreadPool and Microsoft has changed the default minimums several times in .NET so reasonable starting minimum and maximum values were used based on the table described in comments.

I considered whether these should be made admin-configurable in an INI file, but they were not exposed that way before now, and seemed like an easy way for an admin to accidentally get themselves into unexpected trouble.
TagsNo tags attached.
Git Revision or version number0a297a0e52b673427ff61b254f6065c217b1375d
Run Mode Grid (Multiple Regions per Sim)
Physics EngineBulletSim
EnvironmentMono / Linux64
Mono Version2.10
ViewerCool VL Viewer 1.26.7.9
Attached Filespatch file icon 0001-Additional-ThreadPool-worker-and-IOCP-thread-startup.patch [^] (3,807 bytes) 2013-02-09 13:22 [Show Content]

- Relationships

-  Notes
(0023554)
Allen Kerensky (reporter)
2013-02-09 13:23

Marking patch included...
(0023559)
melanie (administrator)
2013-02-09 15:07

Whether or not reducing the thread count for any given category if the default of the CLR is greater than some maximum is wise remains to be seen.

Generally, it's a beneficial patch.

+1
(0023561)
Allen Kerensky (reporter)
2013-02-09 15:56

Agreed.
I almost submitted it with the > max checks commented, to leave it up to wiser heads than mine.

Ultimately, commentary from a project manager in charge of ThreadPool when the defaults were being raised pushed me to leave it in.
His comment was that excessive thread counts could/would have increasing performance impacts.
I figure the note that the limit had been hit, combined with the earlier report of what the runtime defaulted to, will be the warning needed to re-assess this in the future.
(0023566)
BlueWall (administrator)
2013-02-10 11:34

Applied, Thanks for the patches.

Note: It might be good to add some config options for these later if they would be useful for tuning.

- Issue History
Date Modified Username Field Change
2013-02-09 13:22 Allen Kerensky New Issue
2013-02-09 13:22 Allen Kerensky File Added: 0001-Additional-ThreadPool-worker-and-IOCP-thread-startup.patch
2013-02-09 13:23 Allen Kerensky Note Added: 0023554
2013-02-09 13:23 Allen Kerensky Status new => patch included
2013-02-09 15:07 melanie Note Added: 0023559
2013-02-09 15:56 Allen Kerensky Note Added: 0023561
2013-02-10 11:34 BlueWall Note Added: 0023566
2013-02-10 11:34 BlueWall Status patch included => resolved
2013-02-10 11:34 BlueWall Fixed in Version => master (dev code)
2013-02-10 11:34 BlueWall Resolution open => fixed
2013-02-10 11:34 BlueWall Assigned To => BlueWall
2013-02-10 11:34 BlueWall Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker