BookmarkSubscribeRSS Feed

CAS: Making DVR the Default

Started ‎12-07-2022 by
Modified ‎03-01-2023 by
Views 2,370

Duplicate Value Reduction is a powerful "memory format" for CAS tables that significantly reduces their size. Let's make DVR the default so that all CAS tables can benefit from the space savings.


Making DVR the Default


The first step is to set the CAS server environment variable, CAS_DEFAULT_MEMORY_FORMAT, to 'DVR'. A simple way to do this is with Viya Environment Manager. On the Configuration tab within the CAS service, cas-shared-default in this case, add the text, env.CAS_DEFAULT_MEMORY_FORMAT='DVR' to the contents section.



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



Next we need to restart the CAS server. We do that here by deleting the CAS pods using this command, kubectl delete pods -l Once the pods are deleted, Kubernetes will automatically redeploy them with the new default DVR setting.





The documentation on defaulting DVR is here.


Benefits of Default DVR


Once the pods are re-spawned, all CAS tables will be created in the DVR format regardless of how they are created even if they are created in a way where DVR is not available like DATA step where no memory format DATA set option exists. Let's look at the benefits of defaulting the DVR format on some tables from my last post, comparing the DVR and non-DVR sizes.


                                                                           DVR vs Standard Memory Format
Table Name Table Makeup Standard Size DVR Size % Reduction
Customer Dimension Repeating categoricals 28.2GB 2.52GB 91%
Order Fact Numbers and a few repeating foreign keys / codes 24.8GB 8GB 66%
Join Hash Numbers combined with a few repeating categoricals 30.6GB 9.5GB 69%


As you can see, even tables that are mostly numeric still benefit from DVR, all with equivalent performance. So set DVR as your default memory format and let the space savings begin!


A special thanks to my colleague @NicolasRobert for his help on this article. 


Find more articles from SAS Global Enablement and Learning here.

This is a great option. I am going to try this out!

Hello, is this feature available in SAS Viya 3.5? This is present in the SAS Viya 4 CAS Reference documentation but is not documented for SAS Viya 3.5.

Hi brusso, this feature came in Viya 4

Also worth mentioning is the fact that kustomization.yaml needs to have this under "transformers" to allow sas administrators to modify the scripts in the configuration instances. Otherwise the config for the DVR setting does not work:





 - sas-bases/overlays/sas-programming-environment/enable-admin-script-access.yaml


Then generate a new site.yaml and apply to the cluster.

Great info. Thank you!
Version history
Last update:
‎03-01-2023 04:27 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 Labels
Article Tags