Versions Compared

Key

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

With Delft-FEWS systems getting larger and more data stored in the central database it is sometimes good to review the memory settings of your Operator Client and Forecasting Shell client components. Changing these settings to more realistic values can greatly improve the performance of your system. The default settings of the Delft-FEWS settings are tuned for medium size systems, these default settings can be changed in the root configuration files (this only applies to Delft-FEWS version 2018.02 and later). There are two files that are used for these settings:

  • clientConfig.xml (for OC, FSS and SA)
  • global.properties (for OC, FSS and SA)

Client config.xml (for Delft-FEWS version 2018.02 and later)

The clientConfig.xml file can be used for memory allocation (RAM) and disk space allocation for local cache files. The default memory setting is 1024m<jvmOption>-Xmx1024m</jvmOption>. Increased memory allocation settings need to be configured using <jvmOption></jvmOption> elements. 

...

The flag -Xmx specifies the maximum memory allocation, while -Xms specifies the initial (and minimum) memory allocation. In this example the initial memory allocated is 1024 Mb MB and the maximum memory is 2048 MbMB. The value for -Xmx is the most significant value of the two, the value for -Xms has some influence on the startup time of the application.  The choice of -Xmx should be balanced. A too small -Xmx memory setting has a lower memory footprint on an Operating System with limited memory, but may cause OutOfMemoryErrors to appear.

When rolling out a Delft-FEWS application, it is best practice is to test the application with a low memory setting (e.g. 1024Mb1024MB) and perform some performance tests with intensive viewing of grids first.  If the application's performance becomes sluggish when using a low -Xmx setting, it is likely that the Java garbage collection memory management process is responsible. In that case it is time to tune to a higher -Xmx setting. For testing a configuration with 64 bit Java (from FEWS 2018.02), -Xmx1500m is a good starting point, but -Xmx2048m is also commonly used, higher numbers can be used if necessary. The final rolled out Delft-FEWS application should be able to run smoothly with the specified -Xmx value.

...

  • The Xmx is configured as 1500 Mb MB in this example. The "java heap memory (without cache)" is the Xmx memory used; = 842 MbMB.  This means there is still memory left.
  • Additional to the heap memory, there is the "non heap memory" and the "native memory"; total is about 400 MbMB.
  • The max memory used is the Xmx + this additional memory; this is 1500 + 400 = 1.9 GbGB.
  • There is also java threads memory in use.  When more displays are opened there are also more threads and more memory is used. This is normally in the order of 50-100 MbMB.

With these settings of -Xmx1500m and 400Mb 400 MB additional memory, the FEWS application will use about 2GB of RAM.

...

  • If you reserve more RAM than available on a VM/Computer in either Windows or Linux, the performance will drop considerably as Windows the Operating System will start swapping memory.
  • If you reserve more RAM than available on a VM/Computer in LINUX, it is possible that your system will crash with memory problems.
  • We advise to use Xms setting on LINUX linux with enough memory reserved initially so the OC/FSS will run without problems. On LINUX linux it is better to set the Xms equal to Xmx.
  • If you have more RAM on a VM it is always better to increase the Xmx. The unused heap (Xmx) will be used for temporarily caching time series info, this will increase performance.
  • Do not make the Xmx larger than 32 GB.

...

  • The default of the localCacheSize is 500 MB. 
  • The localCacheSizeMB is the cache size of the data in the FEWS \Temp folder. This prevents the OC or FSS to download the data several times during a run or when the OC is open. You can set this to 2000 Mb MB or even 10000 Mb MB when needed.
  • Setting this CacheSize to larger values van than 500 MB will not have a negative impact on the performance, make sure there is enough disk space.

...

  • The default is 10 MB
  • Best to increase this to 100Mb 100MB for the FSS, this can reduce the number of small records in the time series database table.
  • The database will flush the buffer to the time series database tables once the cache size is reached.
  • When a workflow produces less that 100 MB time series data, all times series values are stored at the end of the workflow run.

...