Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There are several user-configurable options in Source that can be used to increase performance (ie. reduce model run times) by changing the way Source runs the model. Many of these options will be suitable for the majority of models, but they can cause changes in results for some users, so caution should be used when selecting them.

...

To turn off all recorded parameters, in the Project Hierarchy, right click on the scenario's name and select Record None (Figure 1). Navigate to the parameters of interest using the Project Hierarchy and Parameters pane, right-click on the parameter and choose Record All (Figure 1). For more information, see recording parameters.

Figure 1. Selecting recording parameters

Parallel Networks

Networks with multiple outlet nodes (Figure 2) can be configured to run separate networks simultaneously by selecting Run Separate Networks in Parallel (Figure 3). This should not be selected as an option if there are calculation dependencies across the separate networks, e.g. Subnetwork 2 calls a function which involves a value from Subnetwork 1.

...

 Microsoft .NET version 4.6.0 has a performance issue that affects Source performance, particularly when saving projects. If you upgrade to 4.6.1, it will resolve the performance issue.

Garbage Collection (GC) Settings

...

Garbage Collection (GC) is a process that helps your computer manage memory automatically while running applications. It cleans up unused or temporary data, making sure your application runs smoothly. When running Source, you have the option to configure the GC mode to one of two options: Workstation GC or Server GC (this shouldn't be confused with Source's client/server configuration). Understanding the differences between these modes and knowing how to switch between them can help you optimize the runtime of your models.

  1. Workstation GC:
    Default Configuration: This is the default GC mode in Source.
    • Single-threaded: Workstation GC operates on a single thread, making it suitable for desktops with lower memory and CPU.
    • Switching to Workstation GC: This is the default GC mode in Source, running Source under normal conditions will use this configuration.
  2. Server GC:
    • Multithreaded: Server GC uses multiple threads to handle garbage collection, which can significantly reduce pause times and improve performance for applications with high memory allocation rates and large heap sizes (i.e. this could result in a shorter runtime for your Source model).
    • High-throughput Optimization: Designed for server environments and desktops with multi-processor systems, making it more efficient for heavy workloads.
    • Switching to Server GC:

...

    • To enable Server GC in Source, you need to modify the RiverSystem.Forms.exe.config

...

    • file (or RiverSystem.CommandLine.exe.config if you're using the command line version) in the Source installation directory before running

...

    • the application. By default, Source uses Workstation GC, but you can switch to Server GC by adding the following code snippet between the <configuration> tags of the

...

    • appropriate configuration file:

<configuration>
    ...
    <runtime>
        <gcServer enabled="true"/>
    </runtime>
    ...
</configuration>


Note:  The <runtime> tag is typically not present in the configuration file by default, so you will need to add it before setting gcServer enabled to true as shown in the above snippet. Removing <gcServer enabled="true"/> or change it to <gcServer enabled="false"/> will use Workstation GC.