27.14. Remote Procedure Call

Configuration of synchronous RPC:

[ Settings/System/SRPC ]
min_stack_size : integer = 65536  1
num_threads : integer = 1  2
optimize_local_calls : boolean = true  3
reply_timeout : float = 30  4
statistics_period : float = 5  5

1

Minimum stack size reserved for the Core, in bytes. If there is less stack space than the preset limit, and there are no free SRPC threads left, synchronous call requests will be rejected.

2

Number of simulation threads used to implement SRPC. When the Core runs out of free threads, it will start using less optimal technique to implement SRPC - stack recursion. The largest disadvantage of stack recursion is its last-in-first-out semantics; no SRPC request serviced by the recursing thread can be finished before the most recent one. If num_threads is 1, the SRPC request can be blocked indefinitely until the Core runs out of stack (see min_stack_size above), if too many SRPC requests are made in such environment. Note that this problem can't happen if num_threads is at least 2.

Value of num_threads is ignored if the node has been started with the single_threaded_srpc flag set to true (see the Massiv Core Reference Guide, documentation of the Massiv::System::StartUpInfo).

3

Allow optimizations of local synchronous calls by direct calls? Setting this option to false is useful only when debugging the Core. Its value is ignored in optimized builds.

4

SRPC request will be cancelled if reply is not received in reply_timeout seconds.

5

Time period between two consecutive updates of RPC statistics, in seconds.