BookmarkSubscribeRSS Feed

Performance Tuning for the SAS Viya Platform

Started ‎03-14-2023 by
Modified ‎03-14-2023 by
Views 1,763

Here in the US, it is common for home builders to acquire a few acres of land and then offer to build custom homes.  They usually offer three or four base model homes that are targeted at the needs of the typical home buyer and because the builder knows what materials are needed, the model homes can be built quickly and efficiently.


To satisfy the needs of home buyers with special preferences, builders offer to customize the model homes with any number of options.  Want a screened porch instead of a patio?  Want to upgrade the appliances?  Want premium carpet, or paint, or fixtures? Want to choose custom paint colors instead of beige?  The choices are endless and while some of the options affect the overall price, others are merely preferences and may not alter the price at all.


In much the same way, SAS provides the SAS Viya platform with a default set of options and settings that we feel will be appropriate as a starting point for most customers, a model deployment, if you will.  Customers can start with the default deployment and then, over time, change it in an almost limitless number of ways.


A frequent driver of change is a desire to improve performance, whether that is throughput for SAS programs, model training, loading data into CAS, or simply starting the SAS Viya platform. Given the number of tuning options SAS Viya provides, one of the hardest questions we get is, "Do you have any tuning recommendations for us?"


Fortunately, SAS provides the SAS Viya Platform Administration: Tuning guide which offers tuning recommendations and considerations for when certain tuning options make sense.


Based on Experience


The SAS Viya Platform Administration: Tuning guide focuses on tuning recommendations related to performance and scalability across a number of areas. The recommendations have been collected from a wide range of customer experiences, testing scenarios, and feedback from SAS consultants and technicians.



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


Read the Considerations


As an administrator, I appreciate how most of the tuning topics include a considerations section that describes when tuning or scaling might be appropriate and how following the recommendation could impact a deployment.  Understanding when to apply certain tuning recommendations is crucial because not every tuning recommendation will be needed in every case and some of the recommendations have the potential to affect the overall cost of managing a deployment.  


Variety of Topics


As of this writing, the SAS Viya Platform Administration: Tuning guide offers tuning points for a number of topics ranging from the cluster hardware, to the topology of your CAS server, to configuration of the SAS Programming Run-time servers, to configuration settings for PostgreSQL and JDBC connections.


I won't try to list every tuning item here but just to give you a taste of what's covered...


Provisioning Hardware for Performance includes

  • Storage considerations
  • Machine specifications for processing nodes
  • Resource monitoring tools
  • Tuning machine resource requests.

Tuning the CAS Server includes

  • Considerations for changing from the default non-distributed CAS to a distributed CAS server
  • Adding additional CAS workers
  • Hardware considerations for CAS_DISK_CACHE.

Tuning Programming Resources and Programs covers

  • Storage considerations for programming pods (e.g., SASWORK)
  • Configuring reusable compute servers
  • Configuring pools of reusable, pre-started compute servers
  • Advice for coding options to optimizing performance.

Tuning the PostgreSQL Server describes

  • Tuning Memory and CPU resources
  • Various Tuning parameters and when to use each one
  • Options for tuning the SAS Backup processing for the PostgreSQL database.

Tuning SAS Visual Analytics includes

  • Performance-related setting that can affect report performance
  • Guidance for avoiding out-of-memory issues.


Keep coming back


I encourage you, as a SAS Viya platform administrator, to revisit the SAS Viya Platform Administration: Tuning guide from time to time, The guide receives frequent updates as our SAS technical writers are made aware of new learnings.  And you are always welcome to submit your own ideas for improvement by utilizing the Feedback menu item at the top of all SAS documentation pages.  


Thanks for reading.  Based on some recent experiences, it became apparent that many administrators were unaware of the tuning guide, so I thought it was worth a short article to advertise its existence.


Find more articles from SAS Global Enablement and Learning here.


Thank you bringing this tuning page under attention. We have already provisioned our cas disc cache and SAS Work. I see the next point is Visual Analytics. Is it possible to write a blog about how to enforce a physical memory limit for all the session processes that are started on a CAS server on Linux, I would like some more guidance here. thank you Karolina T

HI Karolina, thanks for reading.
There is currently no way to modify the physical memory limit for individual CAS sessions. You can, however, specify data quotas and priorities for users by way of CAS resource management. You can find details here<> for SAS Viya on Kubernetes or here<> for SAS Viya 3.5 on Linux.
If this documentation does not provide you with enough information then you may want to open a track with Technical Support for assistance.

Thank you very much Scott for your answer, unfortunately I am not able to see the links where the requested info is. Pls advise.

My apologies, Karolina, the link information must have been stripped when I posted the comment via email.


CAS Resource Management for SAS Viya on Kubernetes: 


CAS Resource Management for SAS Viya 3.5: 


My sas program run SAS viya (GKP with NAS mount)


In SAS Legacy(SAS EG)this program takes about 3hrs to run in Viya it took around 12hrs while writing to NAS text files converting from SASDATASETS


please let me know the solution for this

@soujanyak I advise you to create a new thread with your inquiry.

Doing so, please give as much information as possible, like SAS program, logs with performance statistics (OPTIONS STIMER;), and more detailed description on the environments you are comparing.

Version history
Last update:
‎03-14-2023 01:13 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