SAS VIYA Guide

SAS Viya 3.5: Understanding and Resolving the "Local CASLIB quota exceeded" Error

Simon 26/03/2022 6 vues

When running complex models in SAS© Viya (like VDMML), your process may abruptly stop, displaying a specific error message about quotas. This issue often occurs when training resource-intensive models, such as "Random Forests," which generate large state files (ASTOREs).

If you have encountered the message ERROR: Local CASLIB quota exceeded, this article explains why it happens and how to fix it.

Illustration

The Symptom

The scenario is classic: you start model training. The logs indicate that everything is working normally, tables are loaded, and the computation begins. Suddenly, at the moment of writing the model's save file (the savestate or astore file), the process fails.

Here is a typical excerpt from the log you might see:

ERROR: Local CASLIB quota exceeded. ERROR: The action stopped due to errors.

In this example, the system attempted to write a file larger than 10 GB (10,139,446,832 bytes) before being blocked by the system.

The Origin of the Problem: OS Quota or CAS Quota?

The first reaction is often to check the operating system (OS) quotas. However, if you have not set any restrictions at the OS level, the error comes from the internal configuration of the SAS© Viya CAS server.

The error indicates that the disk cache allocated to the CAS library (Caslib) has reached its limit. SAS© Viya uses resource management policies to prevent a single process or library from monopolizing all the server's disk space, which could crash the entire system.

Understanding the "Global Caslib Policy"

In SAS© Viya, disk space management for global tables is governed by policy rules (Policy Definition). The key parameter here is the quota.

The quota specifies the maximum amount of disk cache space (in bytes) that a global Caslib can use.

The configuration generally takes this form:

  • globalCaslibs: Defines the rules for the libraries.

  • quota: The limit in bytes.

  • _ALL_: A rule that applies to the sum of all global libraries.

Configuration Example:

New Buffer RO
globalCaslibs
_ALL_ 400000000
HPS 200000000
MyGlobal 100000000
~
~
In this example, the MyGlobal library is limited to 100 MB. If it attempts to write a file exceeding this size, the "Quota exceeded" error will be triggered. Likewise, if the sum of all libraries exceeds the limit set by _ALL_, the error will also occur.

The Solution

To resolve this issue, it is necessary to adjust the resource configuration of the CAS server.

  1. Identify the concerned Caslib: Check which library your process is trying to write to (often Casuser or a temporary library when creating an ASTORE).

  2. Increase the Quota: You need to modify the globalCaslibs policy to increase the quota value allocated to this specific library or to the _ALL_ parameter.

  3. Monitor the Disk Cache: Ensure that the server physically has the necessary disk space to accommodate these quota increases.

In summary, this error is an internal safeguard in SAS© Viya. It ensures server stability but requires manual adjustment when you are handling Data Science models that generate particularly large files.