Administration
Neo4j Graph Analytics for Snowflake is in Public Preview and is not intended for production use. |
Compute pools
The application contains a number of compute pools, which can be used to run the algorithms. A compute pool is identified by its compute pool selector, which maps to the instance family for that pool. For more information on instance families, see the Snowflake documentation on CREATE COMPUTE POOL.
In this section we assume that the application name is the default Neo4j_Graph_Analytics. If you chose a different app name during installation, please replace it with that.
You can see the available compute pool selectors by running the following command:
CALL Neo4j_Graph_Analytics.graph.show_available_compute_pools();
Depending on the region, the following selectors are available:
-
'CPU_X64_XS'
-
'CPU_X64_M'
-
'CPU_X64_L'
-
'HIGHMEM_X64_S'
-
'HIGHMEM_X64_M'
-
'HIGHMEM_X64_L'
-
'GPU_NV_S'
-
'GPU_NV_XS'
Algorithm execution
The selector is used to specify the pool in which an algorithm is executed. For example, the call
CALL Neo4j_Graph_Analytics.graph.wcc('CPU_X64_XS', <configuration>)
will run the WCC algorithm using the CPU_X64_XS compute pool.
Multiple algorithms can be run in parallel on the same compute pool or on different compute pools.
Internally, the application starts a job service to run the algorithm. The job service is executed on a compute node within the specified compute pool. Once the algorithm is finished, the job service is stopped and if there is no other job running in the pool, the compute pool is suspended. If multiple algorithms are supposed to run at the same time on the same compute pool, it is recommend to adjust the minimum and maximum number of nodes in the pool.
Managing compute pools
By default, compute pools are created with the following settings:
-
min_nodes = 1
-
max_nodes = 1
-
auto_resume = true
-
auto_suspend_secs = 180
-
initially_suspended = true
The MONITOR
and OPERATE
privileges are granted to the APP_ADMIN
role.
These privileges are required to inspect the current state of the internal pools.
Altering a compute pool directly is not allowed. Instead, the application exposes a set of procedures to manage the compute pool settings:
-- Use a role that is granted the Neo4j_Graph_Analytics.app_admin role
USE ROLE <app_admin_role>;
-- Get the current min_nodes setting of the given pool selector
CALL Neo4j_Graph_Analytics.admin.get_min_nodes(<pool_selector>);
-- Set the min_nodes setting of the given pool selector
CALL Neo4j_Graph_Analytics.admin.set_min_nodes(<pool_selector>, <min_nodes>);
-- Get the current max_nodes setting of the given pool selector
CALL Neo4j_Graph_Analytics.admin.get_max_nodes(<pool_selector>);
-- Set the max_nodes setting of the given pool selector
CALL Neo4j_Graph_Analytics.admin.set_max_nodes(<pool_selector>, <max_nodes>);