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.
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 casoperator.sas.com/server=default. Once the pods are deleted, Kubernetes will automatically redeploy them with the new default DVR setting.
The documentation on defaulting DVR is here.
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.
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.
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.
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!
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.