Garbage Collector Server Mode

2 views
Skip to first unread message

Colin Green

unread,
May 16, 2017, 6:07:38 PM5/16/17
to SharpNEAT
Hi all,

If you've created your own client app to uses the SharpNEAT assemblies it is advised to include the setting in the app.config that switches on the server garbage collector. Without this setting teh GC will default to client app mode intended for UI applications, and I've observed this GC crashing under the intensive CPU load created by SharpNEAT. The Server GC also seems to result in SharpNEAT running faster overall. The main issue is that the client mode GC tries to run concurrently with the running threads and this mode appears to not be a good fit with SharpNEAT.

Cheers,

Colin

===================
Here's an example app.config file with the setting...


<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
    </startup>
    <runtime>
      <gcServer enabled="true"/>
    </runtime>
</configuration>
Reply all
Reply to author
Forward
0 new messages