About Managing Resources

For distributed SAS LASR Analytic Server, the server often needs to share resources with other processes, or other servers on the same cluster. At server start-up, the server reads the /opt/TKGrid/resource.settings file. This file is delivered with the server software and initially all the settings are disabled.
The following sections describe the basics for how you can modify the file to manage resources. The file that is delivered with the software includes examples of evaluating the following before allocating resources:
  • the user ID that starts a server or job
  • the application name
If you are unsure of the application names, you can use the grid monitor that is described in this book to see the application names of running servers and jobs.
Note: After you modify the file, copy it to all machines in the cluster, unless you performed a shared installation that accessible to all the machines.
Summary of Memory Management Controls
Control Parameter or Mechanism
Location
Distributed Server
Non-distributed server (Linux)
Non-distributed server (Windows)
Comments
resource.settings file
  • TKMPI_MEMSIZE
  • TKMPI_ULIMIT
TKGrid installation location, such as /opt/TKGrid
Yes
This is the primary control for managing memory for distributed servers.
TKMPI_MEMSIZE
limit for in-memory tables and processing. Excludes SASHDAT tables.
TKMPI_ULIMIT
virtual memory limit for the server. Includes all tables and memory that is used for processing.
YARN — integrated with the resource.settings file
TKGrid installation directory
Yes
  • Requires YARN configuration and co-location with TKGrid.
  • Verify that YARN does not automatically create cgroups that interfere with the server.
MEMSIZE=
SAS system option file, such as sasv9_usermods.cfg
Yes
Yes
  • This is the primary control for managing memory on non-distributed servers.
  • Limits virtual memory size.
  • If MAX or 0 is specified, the server uses 80% of physical RAM.
  • On Linux, this option is subject to ulimit.
TABLEMEM=
The LASR procedure or the advanced options for a server in SAS metadata
Yes
  • Tables cannot be added or appended after this limit is met.
  • The default value is 75% of memory.
  • Represents the average of memory use across all machines, including the root node.
  • SASHDAT tables do not count toward the limit.
  • The IMSTAT procedure can reset the limit while the server is running.
  • Requires a restart of any web application server that includes SASLASRAuthorizationService.
EXTERNALMEM=
The LASR procedure or the advanced options for a server in SAS metadata
Yes
External processes such as high-performance procedures, are prevented from retrieving data after this limit.
Tables Limit
SAS Visual Analytics Administrator
Yes
Yes
Yes
  • Limits the amount of memory available for tables.
  • Subject to MEMSIZE=, ulimit, and TKMPI_MEMSIZE settings.
cgroups
/etc/cgconfig.conf
  • Do not use cgroups to limit memory. Servers can be killed or become unresponsive.
  • Limiting CPU use is OK.
ulimit
/etc/securty/limits.conf
Yes
Yes
  • The address space (as) limit provides a virtual memory size limit that all other controls are subject to. Use ulimit -v to display the limit.
  • Limits can be set for each user or group.
  • The resident set size (rss) limit is ignored beginning with Linux kernel 2.4.30.