BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
bheinsius
Lapis Lazuli | Level 10

Hi,

 

On Viya 4, as CAS memory is a scarce resource, we want to periodically cleanup in-memory CASUSER tables that are older than x days.

Since CASUSER is a Personal CASLIB, it is only accessible to the user who owns the CAS session.

Is there a way to do this centrally?

 

- Bart

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

On top of my previous reply (see just above!) :

 

See also here :

 

Viya administrators can now get personal with users' Caslibs
By Gerry Nelson on SAS Users February 17, 2020
https://blogs.sas.com/content/sgf/2020/02/17/viya-administrators-personal-caslibs/

 

Myth Busters: CAS Tables Hog All the Memory (They don’t)
Posted Friday | by StephenFoerster (69 views)
https://communities.sas.com/t5/SAS-Communities-Library/Myth-Busters-CAS-Tables-Hog-All-the-Memory-Th...

 

4 Rules to Understand CAS Management of In-Memory Data
Posted 09-13-2019 03:42 PM | by RobCollum (10094 views)
https://communities.sas.com/t5/SAS-Communities-Library/4-Rules-to-Understand-CAS-Management-of-In-Me...

 

Koen

View solution in original post

5 REPLIES 5
sbxkoenk
SAS Super FREQ

Hello Bart,

 

Not sure about this. I guess more people will reply.

 

But consider telling your users about the lifetime parameter in the LoadTable action.

 

See this Communities Library Article for an explanation :

Tired of deleting temporary CAS tables? Let CAS do it for you.
Posted 11-19-2021 02:15 PM | by briankinnebrew (3513 views)
https://communities.sas.com/t5/SAS-Communities-Library/Tired-of-deleting-temporary-CAS-tables-Let-CA...

 

If you put lifetime on 180, your CAS table will disappear after 3 minutes (3 * 60 = 180).

 

Cheers,

Koen

bheinsius
Lapis Lazuli | Level 10

Hi Koen,

 

Thanks for your reply. While that is an option I don't think this option is available for tables imported using the Viya interfaces or those loaded from SAS94 to CAS. Also it puts the responsibility for housekeeping with the users where we probably both know they are not so good at that 😉

 

A periodic restart of the CAS Server would do the job of course but that seems a bit rigorous.

 

Cheers,
Bart

 

 

sbxkoenk
SAS Super FREQ

Hello Bart,

 

Indeed, do not rely on the end-users for keeping the environment healthy. 😉

 

Most servers are patched (non-SAS stuff) and rebooted every month and then the memory is purged of course.

But a re-start also kicks out the tables that are in CAS (in memory) for a few minutes.

So re-starting is not the best option to do what you want to achieve.

 

In the job scheduler (see Environment Manager cog | gear icon), is a sample job :

sbxkoenk_0-1659724779163.png

But I do not know how to see its source code. 

You can schedule it and read the LOG of course.
Maybe it can serve as inspiration (?).

 

Koen

sbxkoenk
SAS Super FREQ

On top of my previous reply (see just above!) :

 

See also here :

 

Viya administrators can now get personal with users' Caslibs
By Gerry Nelson on SAS Users February 17, 2020
https://blogs.sas.com/content/sgf/2020/02/17/viya-administrators-personal-caslibs/

 

Myth Busters: CAS Tables Hog All the Memory (They don’t)
Posted Friday | by StephenFoerster (69 views)
https://communities.sas.com/t5/SAS-Communities-Library/Myth-Busters-CAS-Tables-Hog-All-the-Memory-Th...

 

4 Rules to Understand CAS Management of In-Memory Data
Posted 09-13-2019 03:42 PM | by RobCollum (10094 views)
https://communities.sas.com/t5/SAS-Communities-Library/4-Rules-to-Understand-CAS-Management-of-In-Me...

 

Koen

bheinsius
Lapis Lazuli | Level 10

Hi Koen,

 

This one tells how to do it:

 

Viya administrators can now get personal with users' Caslibs
By Gerry Nelson on SAS Users February 17, 2020
https://blogs.sas.com/content/sgf/2020/02/17/viya-administrators-personal-caslibs/

 

From there:

 

With the (super user) role assumed, the administrator can execute the accessControl.accessPersonalCaslibs action and the subsequent table.caslibinfo action returns all caslibs including any personal caslibs that existed when the session started.

 

Thanks!

Bart

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 875 views
  • 3 likes
  • 2 in conversation