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.
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.
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.