Set the Spread Daemon Timeout Back to the Default Value

Jim_KnicelyJim_Knicely - Select Field - Administrator
edited May 2019 in Tips from the Team

The default value for the Spread Daemon timeout is 8 seconds when the IP addresses of all cluster nodes start with the same two bytes. If all of IP addresses do not start with the same two bytes, the default becomes 25 seconds.

When you know your network or nodes may be unable to respond for a specific amount of time due to network delays or temporary pauses of a VM, you can increase the spread timeout period to longer than this time using the SET_SPREAD_OPTION function (available starting in Vertica 9.2.1-0).

You can later set the Spread Daemon timeout back to its default value using the same function setting the 'TokenTimeout' to zero.

Example:

dbadmin=> SELECT * FROM spread_state;
     node_name      | token_timeout
--------------------+---------------
 v_test_db_node0001 |         16000
 v_test_db_node0002 |         16000
 v_test_db_node0003 |         16000
(3 rows)

dbadmin=> SELECT SET_SPREAD_OPTION( 'TokenTimeout', '0');
NOTICE 9003:  Spread has been notified about the change
                 SET_SPREAD_OPTION
----------------------------------------------------
 Spread option 'TokenTimeout' has been set to '0'.

(1 row)

dbadmin=> SELECT * FROM spread_state;
     node_name      | token_timeout
--------------------+---------------
 v_test_db_node0001 |          8000
 v_test_db_node0002 |          8000
 v_test_db_node0003 |          8000
(3 rows)

Vertica set the default value to 8 seconds because all of the node IP addresses start with the same two bytes.

dbadmin=> SELECT node_name,
dbadmin->         SPLIT_PART(node_address, '.', 1) || '.' || SPLIT_PART(node_address, '.', 2) first_2_bytes
dbadmin->   FROM nodes;
     node_name      | first_2_bytes
--------------------+---------------
 v_test_db_node0001 | 172.16
 v_test_db_node0002 | 172.16
 v_test_db_node0003 | 172.16
(3 rows)

Helpful Links:
https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/UsingVerticaOnAzure/AdjustingSpreadDaemonTimeouts.htm

https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/SQLReferenceManual/Functions/VerticaFunctions/SET_SPREAD_OPTION.htm

https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/SQLReferenceManual/SystemTables/MONITOR/SPREAD_STATE.htm

Have fun!

Sign In or Register to comment.