Improving Orleans Silo Startup Times

The startup times for Orleans Silos seems a bit variable. I’ve tried a few things out, and got the startup time down when using the Dev/Test Silo. I don’t know if all of these make a difference, but they might be worth trying if you’re as impatient as me.

  • Remove any Storage Providers you’re not using from the configuration.
  • Turn off logging (unless things aren’t working!) by setting TraceToConsole="false" and TraceToFile="false" in the Tracing element.
  • If you’re not putting any client code in the Dev/Test Silo (perhaps you’re connecting another application such as an ASP.NET) then remove the Orleans.OrleansClient.Initialize("DevTestClientConfiguration.xml"); line from Main.cs.
  • Remove any Grain Collection classes you’re not using from the Orleans SDK\LocalSilo\Applications directory.
  • Delete the Orleans.FSharp.dll from SDK\LocalSilo.

I’ve got startup time down to under 6 seconds.

My DevTestServerConfiguration.xml file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<OrleansConfiguration xmlns="urn:orleans">
  <Globals>
    <StorageProviders>
      <Provider Type="Orleans.Storage.MemoryStorage" Name="AzureStore" />
    </StorageProviders>
    <SeedNode Address="localhost" Port="11111" />
  </Globals>
  <Defaults>
    <Networking Address="localhost" Port="11111" />
    <ProxyingGateway Address="localhost" Port="30000" />
    <Tracing DefaultTraceLevel="Error" TraceToConsole="false" TraceToFile="false"/>
    <Statistics WriteLogStatisticsToTable="false"/>
  </Defaults>
  <Override Node="Primary">
    <Networking Address="localhost" Port="11111" />
    <ProxyingGateway Address="localhost" Port="30000" />
  </Override>
</OrleansConfiguration>

My DevTestClientConfiguration.xml file looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<ClientConfiguration xmlns="urn:orleans">
  <GatewayProvider ProviderType="Config"/>
  <Gateway Address="localhost" Port="30000"/>
  <Tracing DefaultTraceLevel="Info" TraceToConsole="false" TraceToFile="false"/>
  <Statistics WriteLogStatisticsToTable="false"/>
</ClientConfiguration>
Advertisements