BookmarkSubscribeRSS Feed

Deployment considerations for ASTORE storage

Started ‎04-29-2020 by
Modified ‎04-29-2020 by
Views 3,265

This article is related to SAS Intelligent Decisioning and the SAS Micro Analytic Service (MAS). In this post I would like to discuss some considerations for the analytic store (ASTORE) storage. We will look at the setup for a single server and when using multiple servers for MAS and the SAS Viya Compute Server.


The need for ASTORE storage is referenced in several of our manuals, however, the best reference that I have found from an implementation point of view is the Models section in the SAS Viya 3.5 Administration guide.


The key points to note are:

  • At runtime, MAS requires the that model’s analytic store (ASTORE) file must be accessible from the /models/astores/viya directory path. Specifically, in order to publish analytic store models or decisions that use analytic store models to the SAS Micro Analytic Service publishing destination, the model’s ASTORE file must be accessible from the /models/astores/viya directory path.
  • The Compute Server extracts the ASTORE file from the analytic store’s CAS table in the ModelStore caslib and copies it to the /opt/sas/viya/config/data/modelsvr/astore directory path. This happens when an ASTORE model is published or set as a Champion with Model Manager or when a ASTORE model based Decision flow is tested with SAS Intelligent Decisioning.

The Compute Server and MAS are using different locations, which has been done to allow for scaling MAS.


Therefore, in order to make the model’s ASTORE file accessible, you must map the /opt/sas/viya/config/data/modelsvr/astore directory on the Compute server to the /models/astores/viya directory on each server that hosts either SAS Micro Analytic Service (or SAS Event Stream Processing).


This leads to the following patterns.

Pattern 1 – Single server deployment

If the Compute Server and the consuming services, MAS, are on the same server. The mapping can be done using a symbolic link. This is illustrated in Figure 1.


MG_ASTORE_single_server.pngFigure 1. Single server deployment
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.


In this example, the Compute Server is writing the ASTORE file directly to the standard location (/opt/sas/viya/config/data/modelsrv/astore) and a symlink has been created to map the /models/astores/viya path to that directory.

Pattern 2 – Multi-server deployment

In a multi-host machine environment in which the Compute Server and the consuming services, MAS, are located on different servers, you can use a Network File System (NFS) mount or a shared directory that points to the /opt/sas/viya/config/data/modelsvr/astore directory on the Compute Server.


To illustrate this there are two scenarios that I would like to discuss, that is:

  1. Multiple MAS (real-time) servers, and
  2. High availability (HA) with multiple servers.

The first sub-pattern is illustrated below, in Figure 2.



Figure 2. Multiple MAS (real-time) server deployment


In this example, the /opt/sas/viya/config/data/modelsvr/astore directory on the Compute Server is shared and has been directly NFS mounted as /models/astores/viya on each of the MAS (real-time) servers.


The second sub-pattern is illustrated in Figure 3. This depicts a high availability (HA) deployment that is using multiple Compute Servers and multiple MAS (real-time) servers.



 Figure 3. High availability (HA) with multiple servers


In this example, the shared storage is external to the Viya servers, network storage has been used. The shared storage has been NFS mounted as /models/astores/viya on each server, with a symlink being used on the machines that are running the Compute Server. The symlink maps the /opt/sas/viya/config/data/modelsvr/astore path to the /models/astores/viya directory path.


As can be seen, there are two distinct patterns for mounting the ASTORE storage. Using a shared file system (or network share) mount for the ASTORE storage provides a flexible approach allowing for the Compute Server and the consuming services, in this case SAS Micro Analytic Service, to be located on different host machines (servers).


The shared storage approach is also required when implementing a high availability configuration and/or when scaling the Compute Server or SAS Micro Analytic Service components.


The use of shared storage and/or a symlink removes the need to have a manual process to copy the ASTORE file(s) to the /models/astores/viya directory.


Finally, another benefit of mapping the ASTORE storage to a different path, or system mount point, is that you are not storing business data under the ‘/opt’ mount. This can be a problem for systems that have limited space assigned to ‘/opt’.


I hope this is useful and thanks for reading.


I would like to thank Glenn Clingroth for his assistance in producing this article.


Version history
Last update:
‎04-29-2020 11:44 PM
Updated by:



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags