Skip to content

Manage the RAI Native App's Compute Resources

The RelationalAI (RAI) Native App requires compute resources to evaluate queries from PyRel semantic models. This section provides an overview of these compute resources and how they are managed. For information on costs associated with these resources, see Cost Management.

The RAI Native App utilizes an X-SMALL Snowflake warehouse for Snowflake interoperability. This warehouse is named RELATIONAL_AI_ERP_WAREHOUSE and is fully managed by the native app. It is automatically provisioned when you activate the app and suspended when you deactivate the app.

See the Snowflake documentation for information on warehouses.

Snowflake compute pools are collections of compute resources that are managed as a shared pool. The RAI Native App uses compute pools to host reasoners that process queries from PyRel semantic models.

When you install the RAI Native App, the following compute pools are automatically provisioned:

NameSnowflake Instance FamilySupported Cloud PlatformsDescription
RELATIONAL_AI_ERP_COMPUTE_POOLCPU_X64_XSAWS, AzureUsed for internal app operations.
RELATIONAL_AI_COMPILE_CACHE_SPCSHIGHMEM_X64_MAWS, AzureUsed for internal app operations.
RELATIONAL_AI_HIGHMEM_X64_SHIGHMEM_X64_SAWS, AzureRuns reasoners that execute queries from semantic models.
RELATIONAL_AI_HIGHMEM_X64_MHIGHMEM_X64_MAWS, AzureRuns reasoners that execute queries from semantic models.
RELATIONAL_AI_HIGHMEM_X64_LHIGHMEM_X64_LAWS onlyRuns reasoners that execute queries from semantic models.
RELATIONAL_AI_HIGHMEM_X64_SLHIGHMEM_X64_SLAzure onlyRuns reasoners that execute queries from semantic models.
RELATIONAL_AI_CPU_X64_SCPU_X64_SAWS, AzureReserved for future use.
RELATIONAL_AI_CPU_X64_MCPU_X64_MAWS, AzureReserved for future use.

These compute pools are fully managed by the RAI Native App. They are automatically suspended when you deactivate the app and resumed when you activate the app.

You are only charged for resources consumed by the reasoners running on a compute pool, so unused compute pools do not incur costs. See Cost Management for more information.

Each compute pool is composed of a configurable number of nodes. A node represents the capacity required to run exactly one RAI reasoner of the pool’s instance family. When a reasoner starts, it consumes one node from the corresponding compute pool until it suspends or is deleted.

Two limits control node capacity per pool:

  • MIN_NODES sets the minimum number of nodes that are always ready for reasoners. This is controlled in RAI by the min_nodes argument to the api.alter_reasoner_pool_node_limits() procedure. Snowflake reserves and bills for this many nodes, even if no reasoners are running. Setting a higher value is a good way to keep nodes hot for faster reasoner provisioning, but you will always pay for the reserved nodes. For RAI managed compute pools, the default is 0, meaning no capacity is reserved.

  • MAX_NODES sets the maximum number of reasoners that can run at the same time. This is controlled in RAI by the max_nodes argument to the api.alter_reasoner_pool_node_limits() procedure. If you try to start a reasoner when this limit is reached, the request will fail and the reasoner will not start until there is available capacity. For RAI managed compute pools, the default is 10, meaning up to ten reasoners of a given size can run concurrently.

Reasoners are virtual machines that process queries and other RelationalAI jobs from PyRel semantic models. They are hosted in the compute pools managed by the RAI Native App. Like Snowflake virtual warehouses, reasoners can be independently created for workload isolation or scaling purposes.

Every semantic model requires a logic reasoner to process definitions and queries. When a user queries a model using the Python API, the RAI Native App resumes the user’s configured logic reasoner if it is suspended, or automatically creates a new reasoner for the user if one does not exist.

By default, each user has a dedicated reasoner. This ensures jobs are isolated per user by default, though a user may run multiple concurrent jobs on their reasoner.

If you need fine-grained control over resource allocation, you can create and manage reasoners manually using SQL, Python, or the RAI CLI. Semantic models can then be configured to use specific reasoners using configuration keys:

Configuration KeyDescription
NameName of the reasoner to use. Defaults to the user’s Snowflake username with dots replaced by underscores—for example, w.riker@relational.ai becomes w_riker.
SizeSize of the reasoner. Defaults to HIGHMEM_X64_S. See Reasoner Sizes for details.

Solver reasoners process jobs sent using the relationalai Python package’s SolverModel API. When a user calls SolverModel.solve(), their solver reasoner resumes if suspended, or a new one is created using the configured solver reasoner name.

If you have enabled the CDC Service, a reasoner named CDC_MANAGED_ENGINE is automatically provisioned whenever changes to a data stream are detected. This reasoner processes changes to Snowflake tables and views shared with the RAI Native App for use in semantic models. It is suspended automatically after 30 minutes of inactivity or when you disable the CDC Service.

By default, the CDC_MANAGED_ENGINE is provisioned in the app’s HIGHMEM_X64_S compute pool. However, you may alter the CDC reasoner size if needed.

A reasoner’s size refers to the instance family of the compute pool it is hosted on. Different instance families provide varying levels of CPU, memory, and storage resources. The RAI Native App currently supports the following reasoner sizes:

Reasoner SizeSupported Reasoner TypesSupported Cloud PlatformsDescription
HIGHMEM_X64_SCDC, Logic, SolverAWS, AzureOptimized for small workloads
HIGHMEM_X64_MCDC, Logic, SolverAWS, AzureOptimized for medium workloads
HIGHMEM_X64_LCDC, LogicAWS onlyOptimized for large workloads
HIGHMEM_X64_SLCDC, LogicAzure onlyOptimized for large workloads

By default, new reasoners automatically suspend after one hour of inactivity. You may also manually suspend a reasoner to save costs when it is not in use. While suspended, a reasoner does not consume compute resources. Jobs sent to a suspended reasoner will fail until the reasoner is resumed.

To change the inactivity window for a reasoner:

  1. Set the auto_suspend_mins option when creating a new reasoner.

  2. Use the api.alter_reasoner_auto_suspend_mins() procedure to update the auto-suspend time for an existing reasoner. See Change Reasoner Auto-Suspend Time for details.

  3. Set the auto_suspend_mins configuration key in a user’s raiconfig.yaml file or a Config instance. If unset, the default value of 60 minutes applies. Changes to this key take effect the next time the user creates a model.

Suspended reasoners automatically resume via the RAI Python API when users execute a query. You can also manually resume a suspended reasoner.

A RelationalAI job is a unit of work that a reasoner processes. Jobs include automated tasks like processing changes to data streams as well as user-initiated tasks like evaluating queries from semantic models.

By default, queries sent by the RAI Python API have a timeout of 24 hours in order to prevent long-running queries from consuming resources indefinitely and incurring unexpected costs. Jobs from automated tasks, like processing changes to data streams, are not subject to this timeout. Only user-initiated queries are affected.

Python API users can change this timeout for their queries by setting the query_timeout_mins configuration key in their raiconfig.yaml file or a Config instance. See Set the query timeout for details.

Each reasoner supports up to 8 concurrent jobs and has a queue capacity of 128 jobs with first-in/first-out priority. However, reasoners may process resource-intensive jobs, like large-scale graph algorithms, sequentially.

By default, each user has a dedicated reasoner created for them automatically the first time they create a model. This ensures jobs are isolated per user by default, though a user can run multiple concurrent jobs on their reasoner.

Concurrent jobs on the same reasoner may impact each other’s performance. To avoid coordination issues, especially when resource-intensive jobs are involved, consider creating a dedicated reasoner for each workload.

You can determine if a reasoner is overloaded by monitoring it for a large number of jobs in the QUEUED or CREATED state. See Monitor Reasoner Jobs for details.

Warm reasoners are pre-provisioned reasoners that are kept running and ready to accept jobs immediately. If a user creates a new reasoner or resumes a suspended reasoner, and a warm reasoner is available for the requested reasoner size, the warm reasoner is assigned to the user instead of provisioning a new reasoner from scratch. This reduces latency for reasoner startup.

When enabled, the warm reasoner is created automatically and kept running indefinitely.

If a warm reasoner is assigned to a user, a new warm reasoner is created automatically to replace it to keep the total number of available warm reasoners constant. Note, however, that the next user requesting a reasoner of that size may experience some startup latency if the replacement warm reasoner is still provisioning.

Limitations of warm reasoners:

  • Only logic reasoners are supported. Solver and CDC reasoners cannot be configured as warm reasoners.

For management details, see:

Expand the sections below for answers to common questions about warm reasoners:

What’s the difference between a warm reasoner and a non-suspending reasoner?

You can accomplish similar behavior to a warm reasoner by configuring a reasoner to never auto-suspend. However, the two concepts are only loosely related.

A non-suspending reasoner keeps the same reasoner instance running indefinitely, unless it is manually suspended or deleted. In contrast, a warm reasoner only impacts reasoner startup. If the user creates or resumes a reasoner, they receive the warm reasoner instance if available. The warm reasoner is then configured according to the requested settings, including auto-suspend behavior.

Will I be charged for warm reasoners? Warm reasoners consume compute resources while they are running, so users on consumption-based plans will be charged for the time they are active. Users on fixed-price plans are still responsible for the Snowflake compute costs associated with warm reasoners, but enabling them will not increase the fixed price for the RAI Native App.

Can I have more than one warm reasoner? Yes. Use app.set_warm_reasoners() to configure how many warm reasoners to keep running for each size.

You can manage reasoners using SQL, Python, or the RAI CLI.

To create a reasoner, pass strings with the desired reasoner name and size to the api.create_reasoner() procedure:

-- Create a HIGHMEM_X64_S 'logic' reasoner named 'my_reasoner'.
-- valid reasoner types: 'logic', 'prescriptive', 'predictive'
CALL relationalai.api.create_reasoner(
'logic', -- Reasoner type.
'my_reasoner', -- Reasoner name.
'HIGHMEM_X64_S', -- Reasoner size
{'auto_suspend_mins': 60} -- Auto-suspend after 60 minutes of inactivity.
);
Output
+--------------+----------------------+
| NAME | MESSAGE |
|--------------+----------------------|
| my_reasoner | reasoner created |
+--------------+----------------------+
-- Create a HIGHMEM_X64_S 'prescriptive' reasoner named 'my_reasoner2'.
-- valid reasoner types: 'logic', 'prescriptive', 'predictive'
CALL relationalai.api.create_reasoner(
'prescriptive', -- Reasoner type.
'my_reasoner2', -- Reasoner name.
'HIGHMEM_X64_S', -- Reasoner size
{} -- Use default configuration settings.
);
Output
+--------------+----------------------+
| NAME | MESSAGE |
|--------------+----------------------|
| my_reasoner2 | reasoner created |
+--------------+----------------------+
-- Create a HIGHMEM_X64_S 'predictive' reasoner named 'my_reasoner3'.
-- valid reasoner types: 'logic', 'prescriptive', 'predictive'
CALL relationalai.api.create_reasoner(
'predictive', -- Reasoner type.
'my_reasoner3', -- Reasoner name.
'HIGHMEM_X64_S', -- Reasoner size
{} -- Use default configuration settings.
);
Output
+--------------+----------------------+
| NAME | MESSAGE |
|--------------+----------------------|
| my_reasoner3 | reasoner created |
+--------------+----------------------+

Reasoner names must be between 3 and 50 characters long and can contain only a-z, A-Z, 0-9, and _ characters. Note that it may take several minutes for the reasoner to be provisioned and ready for use.

To delete a reasoner, pass the reasoner name to the api.delete_reasoner() procedure:

-- Delete the 'logic' reasoner named 'my_reasoner'.
-- valid reasoner types: 'logic', 'prescriptive', 'predictive'
CALL relationalai.api.delete_reasoner('logic', 'my_reasoner');
Output
+-------------+------------------------+
| NAME | MESSAGE |
|-------------+------------------------|
| my_reasoner | deleted successfully |
+-------------+------------------------+

When a reasoner is deleted, all current and queued jobs are cancelled. Any new jobs submitted to the reasoner will fail.

To list all reasoners, query the api.reasoners view:

SELECT * FROM relationalai.api.reasoners;
Output
+------------------------+--------+--------------+------+-------+-----------------------+--------------------------------+-------------------------------+-------------------------+-------------------+-------------------------+--------------------------------+--------------------------------------------------------------------+
| NAME | TYPE | ID | SIZE | STATUS | CREATED_BY | CREATED_ON | UPDATED_ON | VERSION | AUTO_SUSPEND_MINS | SUSPENDS_AT | SETTINGS | RUNTIME |
|------------------------+--------+--------------+------+-------+-----------------------+--------------------------------+-------------------------------+-------------------------+-------------------+-------------------------+--------------------------------+--------------------------------------------------------------------+
| john_doe | logic | e4f5a6d7c8e9 | M | READY | john.doe@company.com | 2026-01-26 17:29:53.110 -0700 | 2026-01-26 17:29:54.319 -0700 | 2026-01-26-e829e39d | 60 | 2026-01-26 18:29:53.110 | {"await_storage_vacuum": true} | {"compute_pool":"RELATIONAL_AI_HIGHMEM_X64_S","is_warming":false} |
+------------------------+--------+--------------+------+-------+-----------------------+--------------------------------+-------------------------------+-------------------------+-------------------+-------------------------+--------------------------------+--------------------------------------------------------------------+

Refer to the reference docs for details about each column in the api.reasoners view.

To get details about a specific reasoner, pass the reasoner name to the api.get_reasoner() procedure:

-- Get details about the 'logic' reasoner named 'my_reasoner'.
-- valid reasoner types: 'logic', 'prescriptive', 'predictive'
CALL relationalai.api.get_reasoner('logic', 'my_reasoner');
Output
+---------------------+-------+--------------+-------------------------+------+--------+------------+-------------------------------+-------------------------------+-------------------+-------------------------+---------------------------------+-------------------------------------------------------------------+
| NAME | TYPE | ID | VERSION | SIZE | STATUS | CREATED_BY | CREATED_ON | UPDATED_ON | AUTO_SUSPEND_MINS | SUSPENDS_AT | SETTINGS | RUNTIME |
|---------------------+-------+--------------+-------------------------+------+--------+------------+-------------------------------+-------------------------------+-------------------+-------------------------+---------------------------------+-------------------------------------------------------------------+
| my_reasoner | logic | a9d7f3b2c8e4 | 2026.01.27-e829e39d | S | READY | SYSTEM | 2026.01.27 15:22:15.500 -0700 | 2026-01-27 15:22:16.731 -0700 | 0 | NULL | {"await_storage_vacuum": false} | {"compute_pool":"RELATIONAL_AI_HIGHMEM_X64_S","is_warming":false} |
+---------------------+-------+--------------+-------------------------+------+--------+------------+-------------------------------+-------------------------------+-------------------+-------------------------+---------------------------------+-------------------------------------------------------------------+

Reasoners that have been automatically scheduled for suspension due to inactivity are considered idle. You can view idle reasoners by filtering the api.reasoners view for rows where the STATUS column is READY and the SUSPENDS_AT column is not null:

SELECT * FROM relationalai.api.reasoners
WHERE STATUS = 'READY' AND SUSPENDS_AT IS NOT NULL;

To suspend a reasoner, pass the reasoner name to the api.suspend_reasoner() procedure:

-- Suspend the 'logic' reasoner named 'my_reasoner'.
-- valid reasoner types: 'logic', 'prescriptive', 'predictive'
CALL relationalai.api.suspend_reasoner('logic', 'my_reasoner');
Output
+---------------+--------+------------------------+
| NAME | TYPE | MESSAGE |
+---------------+--------+------------------------+
| my_reasoner | logic | suspended successfully |
+---------------+--------+------------------------+

To resume a suspended reasoner, pass the reasoner name to the api.resume_reasoner_async() procedure:

-- Resume the 'logic' reasoner named 'my_reasoner' if it is suspended.
-- valid reasoner types: 'logic', 'prescriptive', 'predictive'
CALL relationalai.api.resume_reasoner_async('logic', 'my_reasoner');
Output
+-------------+--------+----------------------+
| NAME | TYPE | MESSAGE |
|-------------+--------+----------------------|
| my_reasoner | logic | resumed successfully |
+-------------+--------+----------------------+

To change the auto-suspend time for a reasoner, pass the reasoner name and the desired auto-suspend time in minutes to the api.alter_reasoner_auto_suspend_mins() procedure:

-- Set the auto-suspend time for the 'logic' reasoner named 'my_reasoner' to 30 minutes.
-- valid reasoner types: 'logic', 'prescriptive', 'predictive'
CALL relationalai.api.alter_reasoner_auto_suspend_mins('logic', 'my_reasoner', 30);
Output
+---------+
| Success |
+---------+

To enable a warm reasoner for a compute pool, pass the compute pool’s instance family to the app.enable_warm_reasoner() procedure as a string:

-- Enable a warm 'logic' reasoner for the HIGHMEM_X64_S compute pool.
-- valid reasoner types: 'logic', 'prescriptive', 'predictive'
CALL relationalai.app.enable_warm_reasoner('logic', 'HIGHMEM_X64_S');
Output
+------------------------------------------------------------+
| Successfully enabled a warm reasoner of size HIGHMEM_X64_S |
+------------------------------------------------------------+

To disable the warm reasoner for a compute pool, pass the compute pool’s instance family to the app.disable_warm_reasoner() procedure as a string:

-- Disable the warm 'logic' reasoner for the HIGHMEM_X64_S compute pool.
-- valid reasoner types: 'logic', 'prescriptive', 'predictive'
CALL relationalai.app.disable_warm_reasoner('logic', 'HIGHMEM_X64_S');
Output
+------------------------------------------------------------+
| Successfully disabled warm reasoners of size HIGHMEM_X64_S |
+------------------------------------------------------------+

Reasoners cannot be resized on-the-fly. To resize a reasoner:

  1. Delete the existing reasoner

    Pass the reasoner type and name to the api.delete_reasoner() procedure to delete the reasoner:

    -- Delete the 'logic' reasoner named 'my_reasoner'.
    -- valid reasoner types: 'logic', 'prescriptive', 'predictive'
    CALL relationalai.api.delete_reasoner('logic', 'my_reasoner');
    Output
    +-------------+----------------------+
    | NAME | MESSAGE |
    |-------------+----------------------|
    | my_reasoner | deleted successfully |
    +-------------+----------------------+
  2. Create a new reasoner with the same name and desired size

    Pass the reasoner type, name, and new size to the api.create_reasoner() procedure to create a new reasoner with the same name and desired size:

    -- Create a HIGHMEM_X64_M 'logic' reasoner with the same name.
    -- valid reasoner types: 'logic', 'prescriptive', 'predictive'
    CALL relationalai.api.create_reasoner('logic', 'my_reasoner', 'HIGHMEM_X64_M');
    Output
    +-------------+-------+----------------------+
    | NAME | TYPE | MESSAGE |
    |-------------+-------+----------------------|
    | my_reasoner | logic | reasoner created |
    +-------------+-------+----------------------+

You can allow more reasoners of a given size to run concurrently by increasing the maximum number of compute pool nodes allocated for that reasoner size. Each reasoner of the same size consumes one node from its corresponding compute pool. Note that increasing the maximum number of nodes may increase costs.

Use the api.alter_reasoner_pool_node_limits() procedure to update these limits. Pass NULL for any value you do not want to change.

To increase only the maximum number of concurrently running HIGHMEM_X64_S reasoners and leave the current minimum unchanged:

-- Increase the maximum concurrent HIGHMEM_X64_S 'logic' reasoners to 12.
-- valid reasoner types: 'logic', 'prescriptive', 'predictive'
CALL relationalai.api.alter_reasoner_pool_node_limits('logic', 'HIGHMEM_X64_S', NULL, 12);
Output
+---------+
| Success |
+---------+

To set both a reserved minimum and a higher maximum:

-- Reserve capacity for at least 2 HIGHMEM_X64_M 'logic' reasoners; allow up to 12 concurrently.
-- valid reasoner types: 'logic', 'prescriptive', 'predictive'
CALL relationalai.api.alter_reasoner_pool_node_limits('logic', 'HIGHMEM_X64_M', 2, 12);
Output
+---------+
| Success |
+---------+

You can view a reasoner’s jobs by querying the api.jobs view and filtering by the REASONER_NAME (and optionally REASONER_TYPE) columns:

-- List jobs for the reasoner named 'my_reasoner'.
SELECT *
FROM relationalai.api.jobs
WHERE REASONER_NAME = 'my_reasoner'
AND REASONER_TYPE = 'logic';
Output
+--------------------------------------+---------------+---------------+---------+----------------------+-------------------------------+-------------------------------+----------+------------------+------------+--------------+
| ID | REASONER_TYPE | REASONER_NAME | STATE | CREATED_BY | CREATED_ON | FINISHED_AT | DURATION | PAYLOAD | TIMEOUT_MS | ABORT_REASON |
|--------------------------------------+---------------+---------------+---------+----------------------+-------------------------------+-------------------------------+----------+------------------+------------+--------------|
| 02c8fa31-1234-5678-90ab-abcdef123456 | logic | my_reasoner | ABORTED | john.doe@company.com | 2024-10-28 08:00:12.123 -0700 | 2024-10-28 08:00:19.766 -0700 | 7643 | {"kind":"query"} | 86400000 | canceled |
+--------------------------------------+---------------+---------------+---------+----------------------+-------------------------------+-------------------------------+----------+------------------+------------+--------------+

Note that multiple jobs for the same reasoner may be in the RUNNING state simultaneously. See Concurrent Jobs for information on how concurrent jobs are handled.

Take note of the following job states. While occasional occurrences are normal, a high volume may indicate potential issues:

STATEDescription
CREATEDThe job has been accepted by the native app but has not yet been sent to the reasoner queue. If it remains in this state, the reasoner’s resources may be at capacity, or the native app has not yet forwarded the job to the reasoner.
QUEUEDThe job is in the reasoner’s queue, waiting to be processed. If it remains in this state, the reasoner’s concurrency limit has been reached. Wait for the job to leave the queue or cancel it and rerun on a different reasoner.
ABORTEDThe job was cancelled or failed due to an error. Check the ABORT_REASON column for more details.

These states indicate that the job is not currently being processed by the reasoner. For API details about the STATE and ABORT_REASON columns, see the api.jobs SQL reference.

To get details about a specific job, pass the reasoner type and job ID to the api.get_job() procedure:

-- Get details for the job with ID '02c8fa31-1234-5678-90ab-abcdef123456'.
CALL relationalai.api.get_job('logic', '02c8fa31-1234-5678-90ab-abcdef123456');
Output
+--------------------------------------+---------------+---------------+---------+----------------------+-------------------------------+-------------------------------+----------+------------------+------------+--------------+
| ID | REASONER_TYPE | REASONER_NAME | STATE | CREATED_BY | CREATED_ON | FINISHED_AT | DURATION | PAYLOAD | TIMEOUT_MS | ABORT_REASON |
|--------------------------------------+---------------+---------------+---------+----------------------+-------------------------------+-------------------------------+----------+------------------+------------+--------------|
| 02c8fa31-1234-5678-90ab-abcdef123456 | logic | my_reasoner | COMPLETED | john.doe@company.com | 2024-10-28 08:00:12.123 -0700 | 2024-10-28 08:00:19.766 -0700 | 7643 | {"kind":"query"} | 86400000 | NULL |
+--------------------------------------+---------------+---------------+---------+----------------------+-------------------------------+-------------------------------+----------+------------------+------------+--------------+

To cancel a job, pass the reasoner type and job ID to the api.cancel_job() procedure:

-- Cancel the job with ID '02c8fa31-1234-5678-90ab-abcdef123456'.
CALL relationalai.api.cancel_job('logic', '02c8fa31-1234-5678-90ab-abcdef123456');
Output
+------------------------+
| Cancelling job |
+------------------------+

It may take a few moments for the job to be cancelled. You may monitor the job and confirm that it has been cancelled once the STATE is reported as CANCELED.