BookmarkSubscribeRSS Feed

CAS: Making DVR the Default

Started ‎12-07-2022 by
Modified ‎09-19-2024 by
Views 4,375

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.

 

sf_1_defaultMemoryFormat-1024x484.png

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 casoperator.sas.com/server=default. Once the pods are deleted, Kubernetes will automatically redeploy them with the new default DVR setting.

 

sf_2_restartCas.png

 

 

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.

Comments
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:

 

...

 transformers:

 ...

 - 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:
‎09-19-2024 01:25 PM
Updated by:
Contributors

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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