BOARD Server Saving Policy

Options
Board Support
Board Support Employee
5 Likes Photogenic
edited February 2023 in Support Articles

Starting from BOARD version 8 it has been introduced the possibility to change the way BOARD automatically saves data and metadata (which is in RAM) to disk. 

 

BOARD works in-memory, so all users' inputs as well as uploads from external sources (text files, MSSQL...) are performed using the BOARD Server RAM, without involving the disk at any time. The updates are stacked in a queue called "pending changes" (also in-RAM)

The BOARD server periodically commits updates to disk based on the "saving policy" parameters.

 

By default the saving policy is set to "OnServerResponse" which means that updates are committed immediately after any change applied to data or metadata has been processed by the engine. This policy is the safest but might not guarantee the best achievable performance: access to the disk can become a "bottle-neck" in case the BOARD solution has a lot of frequent updates.

 

Saving Policy Parameters

The Saving policies are set in the server_config_v2.xml file which can be found in the folder where the BOARD Server has been installed. This is usually under the following server path C:\Program Files\Board\Board Server

The parameter name is "SavingPolicy" (example SavingPolicy="OnServerResponse"):

 

Possible values of this parameter are:

ImmediatelySaves changes immediately.  This value is not recommended in production environments. It might be used for testing purposes
EveryFixedNumberChangesSaves changes every time the number of changes set in the other parameter "SavingPolicyChangesNR" is reached.
NeverNever saves changes to disk. This value should only be used for testing purposes, all changes will be lost when the Board service is stopped or when the database is unloaded from memory.
OnServerResponse

Default policy.

it saves changes to disk almost immediately, after the BoardEngine has completely processed the request and sends the acknowledgment message to the BOARD client.

OnServerCloseSaves changes only when the BoardEngine service is stopped.

 

More options regarding parameters are:

SavingPolicyChangesNR="10" (this parameter is applicable only when the saving policy is set to EveryFixedNumberChanges), the number of changes is incremented by "1" for each session which modifies a cube or entity content.

SaveAtMidnight="False"                 When set to true, it triggers the commit of pending changes at midnight

SaveOnBoardIdle="True"                when set to true is commits changes after the interval set by the parameter "IdleIntervalMinutes" , the default is 60 minutes.

 

Saving Policy and impacts on BOARD service stop

Pay attention when you want to stop and start the BOARD service (for example after a loading procedure). Consider that when requesting a BOARD Service stop, the BOARD engine will try to save all pending changes to disk before stopping

Windows Server allocates a fixed time slot (WaitToKillServiceTimeout) for a service to close properly. When the timer is over (default is In milli-seconds; 20,000) it kills the service even if it's still performing some tasks.

It might happen that when BOARD has a long queue of pending changes, the time needed to write data on disk could be higher than the default WaitToKillServiceTimeout setting. In this case, you might lose some data committed in memory after the restart of the service: you might verify that data loaded and visible in BOARD before the service stop is not present anymore after the restart.

We suggest to run (or schedule) a save to disk action before shutting down the BOARD service. In this way we would avoid any possible risk linked to the potential difference in time existing between the Windows WaitToKillServiceTimeout and BOARD write to disk time.