After performing an upgrade-in-place to SAS 9.4, most likely to remove Adobe Flash dependencies, you may have noticed that your SAS deployment is consuming an increased amount of disk space. After, and only after, you complete all of your validation tests to ensure that your upgraded environment is acceptable, you can take steps to reclaim fairly significant disk space.
How much space you are able to reclaim depends on your product mix and how many updates has your environment been through. The test deployment I am using is a basic single machine Visual Analytics system that has been updated several times so it is likely to show much higher storage recovery numbers than you will see for individual machines in a distributed deployment or more carefully maintained systems.
As we go through these steps, let's keep an eye on how much space we reclaim. After applying an UIP to SAS 9.4M7, the deployment I have shows disk usage of 35G in SASHome and 34G in vaconfg, which is the configuration directory.
[sas@sasserver sasinside]$ du -sh ./SASHome 35G ./SASHome [sas@sasserver sasinside]$ du -sh ./vaconfig/ 34G ./vaconfig/
An upgrade-in-place installs new products alongside existing products to provide a way to recover to an earlier point should the need arise. Therefore, after you have validated the resulting upgrade, you can safely remove older versions of products.
I mentioned earlier that my test deployment has been allowed to accumulate products through multiple rounds of upgrades. When I look at many of my web applications in SASHome, I see this pattern for many of them.
/opt/sasinside/SASHome/SASVisualAnalyticsHub [sas@sasserver SASVisualAnalyticsHub]$ ll drwxr-xr-x. 6 sas sas 4096 Sep 18 15:52 ./ drwxr-xr-x. 94 sas sas 4096 Sep 18 16:05 ../ drwxr-xr-x. 8 sas sas 4096 Sep 18 16:08 7.2/ drwxr-xr-x. 8 sas sas 4096 Sep 18 16:08 7.3/ drwxr-xr-x. 8 sas sas 4096 Sep 18 16:08 7.4/ drwxr-xr-x. 8 sas sas 4096 Sep 18 16:08 7.51/
The UIP to M7 installed Visual Analytics Hub 7.51 but I still have three earlier versions of VA Hub taking up space in SASHome.
Removing these old products is easy to do.
That's it. Notice that the SAS Deployment Manager automatically selects all earlier versions of all products so all you have to do is click Next and complete the process.
So how much space did this quick step reclaim? Roughly 40% of SASHome's original 35G.
[sas@sasserver sasinside]$ du -sh ./SASHome 21G ./SASHome
Unless you have, or are, a lazy administrator, you probably will not see a 40% reduction in your deployment. As a rough rule of thumb, you will likely see reduction of a little more than 4G per old version (e.g., Visual Analytics 7.2) you have lying around.
To protect the administrator, the UIP process makes backup copies of the web applications that are rebuilt during configuration processing. After validating the upgrade, you can go through and remove these backups because they contain previous versions of configured products and you will not be able to restore them even if you wanted to having just removed the associated products from SASHome.
The first place we will clean up is the Levn/Web/Staging where we are starting out with 5.8G of content.
[sas@sasserver Web]$ du -sh ./Staging 5.8G ./Staging
When new versions of the web application are built, the .war/.ear files being replaced are copied to ./Web/Staging/Backup. Because the files copied Backup during an upgrade are for earlier product versions and are not any use to us after the upgrade, we can delete them. The ./Staging/Backup directory in my deployment has almost 1G to remove.
[sas@sasserver Web]$ du -sh ./Staging/Backup 996M ./Staging/Backup/ [sas@sasserver Web]$ rm ./Staging/Backup/*
Now let's look at the Staging directory itself. We currently show 4.9G of content but interestingly, there are three large web applications related to Flex theming and documentation that did not get rebuilt but did not get removed (marked with blue bubbles below).
The theming applications have been replaced with non-Flash theming applications so we do not need them any longer, nor do we need the earlier webdoc application. Let's remove those .ear files and check our savings.
[sas@sasserver Staging]$ rm sas.flexthemes4.7.2.ear [sas@sasserver Staging]$ rm sas.themedesigner4.7.2.ear [sas@sasserver Staging]$ rm sas.webdocmd9.4.ear [sas@sasserver Staging]$ du -sh . 2.6G .
So those two easy steps recouped 3.2G of space.
Another easy place to look for space is in the WebAppServer/Backup directory. The UIP makes a complete copy of the WebAppServer configurations for every managed server in case you need to reference earlier configurations during validation. After your system validation tests are complete, it is reasonable to delete these backups as your new managed server configurations will incorporate any earlier configuration information.
My deployment is starting with 16G in the WebAppServer directory.
[sas@sasserver Web]$ du -sh ./WebAppServer/ 16G ./WebAppServer/
Having been through an earlier upgrade, my deployment actually has two backups of the SASServer1_1 managed server. Let's remove both.
[sas@sasserver WebAppServer]$ ll Backup/ drwxr-xr-x. 4 sas sas 4096 Sep 18 16:20 ./ drwxr-xr-x. 4 sas sas 4096 Sep 18 16:22 ../ drwx------. 10 sas sas 4096 Sep 18 17:32 SASServer1_1.2017-11-13-17.03.59/ drwx------. 9 sas sas 4096 Sep 18 17:32 SASServer1_1.2020-09-18-16.20.07/ [sas@sasserver WebAppServer]$ rm -rf ./Backup/*
That saved 9.5G and the WebAppServer directory has shrunk from 16G to 6.5 G.
[sas@sasserver Web]$ du -sh ./WebAppServer/ 6.5G ./WebAppServer/
So how much space have we reclaimed from our configuration directory by cleaning up the Web area? Starting with 34G, it looks like we have reclaimed 13G.
[sas@sasserver sasinside]$ du -sh ./vaconfig 21G ./vaconfig
So with just these few easy steps, we have reclaimed a significant amount of disk storage.
Keep in mind that the space you reclaim will definitely differ from the results I show here but that should not deter you from taking steps to conserve the disk storage consumed by your SAS 9.4 deployment.
If you know of other space-saving techniques, please share them.
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.