Skip to main content

Preparing to Install Caché

Before you install Caché, read the following sections:

Caché Installation Planning Considerations

Read the following Caché installation planning considerations that apply to your installation:

Install the VS Code - ObjectScript development environment

Visual Studio Code (VS Code) is a free source code editor made by Microsoft for Windows, Linux and macOS. The InterSystems ObjectScript extension for Visual Studio Code enables you to use VS Code to connect to a Caché server and develop code in ObjectScript. An alternative to VS Code - ObjectScript is Studio, which installs alongside Caché on Windows-based operating systems.

For information on downloading and using VS Code - ObjectScript, see https://intersystems-community.github.io/vscode-objectscript/Opens in a new tab.

Caché Installation Directory

Throughout the Caché documentation, the directory in which a Caché instance is installed is referred to as install-dir. This directory varies by platform, installation type, and user choice, as shown in the following table:

Platform

Installation Type

Directory

Windows

attended

C:\InterSystems\Cache (or CacheN when multiple instances exist) unless installing user specifies otherwise.

unattended C:\InterSystems\Cache (or CacheN when multiple instances exist) unless INSTALLDIR property specifies otherwise.

UNIX®, Linux

attended

Installing user must specify. Do not choose the /home directory, or any of its subdirectories.

  unattended

ISC_PACKAGE_INSTALLDIR parameter required.

Linux

RPM

Single instance installation, always /usr/cachesys.

Important:

The installation directory of a Caché instance cannot be changed following installation. The directory must be a fully resolved physical path, containing no symbolic links.

Installation Directory Restrictions

You cannot install Caché into a destination directory that has any of the following characteristics:

  • It is a UNC (non-local) path.

  • It is at the root level of a drive (such as C:\).

  • It is anywhere under the \Program Files directory.

  • It has a caret (^) in the pathname.

  • It has a character that is not in the US ASCII character set.

Setup Type

During installation, you can choose which components of Caché you would like to install. The options are:

  • Development — Installs the Caché Database Engine (Samples Database, User Database, SQL Gateway, Server Monitoring Tools), Studio, all supported language bindings, and xDBC (ODBC and JDBC) drivers. Select this option if you plan to use this instance to perform both client and server tasks.

    Note:

    For Ensemble and HealthShare only, the Development Setup Type also installs the EnsDemo Database.

  • Server — Installs Caché Database Engine (Samples database, User database, SQL Gateway, Server monitoring tools) and CSP Gateway. Select this option if you plan to use this instance as a Caché database server which can be accessed by Caché clients.

    Note:

    For Ensemble and HealthShare only, the Server Setup Type also installs the EnsDemo Database.

  • Custom — Installs/uninstalls specific components. Select this option if you would like to install or remove specific Caché components.

On Windows, you can choose from these two additional setup types:

  • Client — Installs Studio and the xDBC (ODBC and JDBC) drivers. Select this option if you plan to use this instance as a client to a Caché database server on this or another computer.

  • Web Server — Installs CSP Gateway (IIS, Apache 2.0, Apache 2.2). Select this option if you want to install only those parts of Caché that are required on a CSP Gateway machine.

The following table identifies which component groups are installed for each setup type. The Custom setup type lets you select specific component groups/components to install or remove; see the Performing a Caché Custom Installation section of this book.

Components Installed by Setup Type
Component Group Components Development Server Client Web
Caché Database Engine (Caché Server)

Server Monitoring Tools

Samples database

User database

SQL Gateway

Agent Service (ISCAgent)

Apache FOP (Formatting Objects Processor)

Yes Yes No No
Caché Launcher (cube)   Yes Yes Yes No
Studio   Yes No Yes No
xDBC

ODBC Driver

Java Database Connectivity

Yes No Yes No
Caché Application Development

ActiveX Connectivity

C++ Binding for Caché

Light C++ Binding

Java Binding for Caché

C++ SDK for Caché

Caché Engine Link Libraries

Perl Binding for Caché 1

Python Binding for Caché 1

.NET Binding for Caché

Threaded Server Libraries

Other Samples)

Yes No No No
Documentation

PDF Documentation

Online Documentation

Yes Yes No No
Web Server Gateway (CSP)

CSP for IIS

CSP for Apache 2.0.x

CSP for Apache 2.2.x

No Yes No Yes

1 This component is supported only on the x86-32 bit platform.

Caché Character Width

You must select either 8-bit or Unicode support for your installation:

  • 8-bit — The software handles characters in an 8-bit format.

  • Unicode — The software handles characters in the Unicode (16-bit) format. Select Unicode if your application uses languages that store data in a Unicode format, such as Japanese.

InterSystems recommends 8-bit character support for locales based upon the Latin-1 character set, ISO 8859–1. Use Unicode if the base character set for your locale is not Latin-1, or if you anticipate handling data from locales based upon a different character set. If you use an 8-bit version of Caché, your data is not portable to 8-bit locales based on a different character set.

Caché allows users to upgrade from 8-bit to Unicode instances; however, these installations will not automatically perform data conversions. For more information on converting data in a database, see the Database Compatibility Considerations chapter of the Caché System Administration Guide.

Caution:

If you choose a Unicode installation, you cannot revert to an 8-bit version without potential data loss. This is because an 8-bit version of Caché cannot retrieve 16-bit character data from a database.

Important:

If you are installing Ensemble, you must select Unicode.

Disk Space Requirements

For every platform, the installation kit must be available, either on your computer or on a network. Specific disk space requirements for each platform are:

  • Windows:

    • A Caché installation that includes support for Caché Server Pages (CSP) uses approximately 1500 MB (megabytes) of disk storage (not including disk space for user data).

    • Any system that can effectively support Windows should be sufficiently powerful to run Caché. Caché performance greatly improves with increased processor and disk speed.

  • UNIX®, Linux, macOS:

    • A standard Caché installation that includes support for Caché Server Pages (CSP) needs 1600 – 1950 MB (megabytes) of disk space depending on the type of installation you choose.

    • In addition, 200 MB of space is required in the Caché installation directory. The installation procedure confirms that this disk space is available in the specified location before installing.

Supported Platforms and Components

For a list of operating systems platforms on which this version of Caché is supported, see the online InterSystems Supported PlatformsOpens in a new tab document for this release.

For a list of web servers on which InterSystems CSP technology is supported, see “Supported Web Servers” in the “Supported Technologies” chapter of the online InterSystems Supported PlatformsOpens in a new tab document for this release.

If you are using CSP, install the web server before installing Caché to let the Caché installer configure the web server automatically. See the “CSP Architecture” chapter of the Using Caché Server Pages guide for more information.

Caché Private Web Server

With each instance, Caché installs a private web server and a private CSP Gateway to serve CSP pages to ensure proper operation of the Management Portal and Caché Online Documentation.

The private web server is installed to ensure that:

  1. The Management Portal runs out of the box.

  2. An out-of-the-box testing capability is provided for development environments.

The private web server is not supported for any other purpose.

For deployments of http-based applications, including CSP, Zen, and SOAP over http or https, you should not use the private web server for any application other than the Management Portal; instead, you must install and deploy one of the supported web servers (see “Supported Web Servers” in the online InterSystems Supported PlatformsOpens in a new tab document for this release).

  • Windows: Its Windows service name is “Web Server for instname” where instname is the instance name you enter when you install Caché. Caché installs the web server into the install-dir\httpd directory, where install-dir is the Caché installation directory. It is uninstalled when you uninstall the corresponding Caché instance.

The private web server configuration is preserved through upgrades.

If You Are Upgrading Caché

If you are performing an upgrade, first read and perform all necessary procedures described in the “Upgrading Caché” chapter of this book.

When upgrading, back up your old Caché installation after completing all the pre-installation upgrade tasks and before installing Caché.

Configuring Third-Party Software

InterSystems products often run alongside and interact with non-InterSystems tools. For important information about the effects these interactions can have, see the appendix “Configuring Third-Party Software to Work in Conjunction with InterSystems Products” in the Caché System Administration Guide.

Managing Caché Memory

The goal of memory planning and management is to provide enough memory to all of the entities that use it under all normal operating circumstances. This section discusses the following:

Important:

Correct sizing and allocation of system memory are critical in maximizing the performance and availability of Caché and your application. Before installing Caché, be sure to review the guidelines that follow, calculate your initial memory requirements, and determine whether your system has sufficient memory.

For additional information on allocating memory, see Calculating System Parameters for UNIX®, Linux, and macOS and Shared Memory Allocation on Windows in the chapter “Installing Caché on Windows”. For an in-depth look at Caché memory planning and allocation by an InterSystems senior technology architect, see InterSystems Data Platforms and Performance Part 4 - Looking at MemoryOpens in a new tab on InterSystems Developer Community.

Sizing System Memory for Caché

Generally, there are four main consumers of memory on a server hosting a Caché instance. At a high level, you can calculate the amount of physical memory required by simply adding up the requirements of each of the items on the following list:

  • Operating system, including the file system cache

  • Installed applications

  • Caché and application processes

    Caché is process-based. If you look at the operating system statistics while your application is running, you will see numerous processes running as part of Caché.

  • Caché shared memory, which includes

    • The database and routine caches

    • The generic memory heap (gmheap)

    • Other shared memory structures

For the best possible performance, all four of these should be maintained in physical (system) memory under all normal operating conditions. Virtual memory and mechanisms for using it such as swap space and paging are important because they enable the system to continue operating during a transient memory capacity problem, but the highest priority is to include enough physical memory to avoid the use of virtual memory.

Calculating Initial Memory Requirements

Of course, every application is different and any given system may require a series of operational adjustments to optimize memory use. However, the following list provides general guidelines to use as a basis in sizing memory for your application. Benchmarking and performance load testing the application will further influence your estimate of the ideal memory sizing and parameters.

Important:

If you have not configured sufficient physical memory on a Linux system and thus regularly come close to capacity, you run the risk that the out of memory killer may misidentify long-running Caché processes that touch a lot of memory in normal operation, such as the write daemon and CSP server processes, as the source of the problem and terminate them. This will result in an outage of the Caché instance and require crash recovery at the subsequent startup. Disabling the out of memory killer is not recommended, however, as this safety mechanism keeps your operating system from crashing when memory runs short, giving you a chance to intervene and restore Caché to normal operation. The recommended way to avoid this problem is to configure enough physical memory to avoid any chance of the out of memory killer coming into play. (For a detailed discussion of process memory in Caché, see Caché Process Memory.)

General guidelines for sizing memory for your application are as follows:

  • System memory to provision (install in a physical server or allocate to a virtual server)

    Start with 4 to 8 GB per CPU core (physical or virtual). This core count does not include any threads such as Intel HyperThreading (HT) or IBM Simultaneous Multi-Threading (SMT). So, for example, if you have an IBM AIX LPAR with 8 cores allocated, the calculation would be 4-8 GB * 8 = 32 to 64 GB of total RAM allocated to that LPAR, even with SMT-4 enabled (which would appear as 32 logical processors).

  • Shared memory to allocate within Caché

    • On servers with less than 64 GB of RAM, allocate

      • 50% of total memory to the database cache

      • 256 MB minimum to the routine cache

      • 256 MB minimum to the generic memory heap

    • On servers with more than 64 GB of RAM, allocate

      • 70% of total memory to the database cache

      • 512 MB minimum to the routine cache

      • 384 MB minimum to gmheap

  • Swap space or page file to configure

    As a general guideline, configure the smaller of a) 25 to 50% of your physical memory or b) 32 GB as virtual memory. As previously noted, swapping and paging degrade performance and should come into play only when transient memory capacity problems require it. Further, you should configure alerts to notify operators when the system uses virtual memory so they can take immediate action to avoid more severe consequences.

    Note:

    When large and huge pages are configured, as is highly recommended, Caché shared memory segments are pinned in physical memory and never swapped out; for more information, see Large and Huge Pages.

Note:

If you are configuring a data server in an ECP cluster, see Memory Use on Large ECP SystemsOpens in a new tab in the “Developing Distributed Applications” chapter of the Caché Distributed Data Management Guide for important information about adjustments to database cache sizes that may be necessary.

Vertically Scaling for Memory

Performance problems in production systems are often due to insufficient memory for application needs. Adding memory to the server hosting one or more Caché instances lets you allocate more to the database cache, the routine cache, generic memory, or some combination. A database cache that is too small to hold the workload’s working set forces queries to fall back to disk, greatly increasing the number of disk reads required and creating a major performance problem, so this is often a primary reason to add memory. Increases in generic memory and the routine cache may also be helpful under certain circumstances.

Large and Huge Pages

Where supported, the use of large and huge memory pages can be of significant performance benefit and is highly recommended, as described in the following:

  • IBM AIX® — The use of large pages is highly recommended, especially when configuring over 16GB of shared memory (the sum of the database cache, the routine cache, and the generic memory heaps, as discussed in Calculating Initial Memory Requirements).

    By default, when large pages are configured, the system automatically uses them in memory allocation. If shared memory cannot be allocated in large pages, it is allocated in standard (small) pages. However, you can use the memlock parameter for finer-grained control over large pages.

    For more information, see Configuring Large and Huge Pages in this chapter and memlock in the Configuration Parameter File Reference.

  • Linux (all distributions) — The use of static huge pages (2MB) when available is highly recommended for either physical (bare metal) servers or virtualized servers. Using static huge pages for the Caché shared memory segments yields an average CPU utilization reduction of approximately 10-15% depending on the application.

    By default, when huge pages are configured, Caché attempts to provision shared memory in huge pages on startup. If there is not enough space, Caché reverts to standard pages and orphans the allocated huge page space, potentially causing system paging. However, you can use the memlock parameter to control this behavior and fail at startup if huge page allocation fails.

    For more information, see Configuring Large and Huge Pages in this chapter and memlock in the Configuration Parameter File Reference.

  • Windows

    The use of large pages is recommended to reduce page table entry (PTE) overhead.

    By default, when large pages are configured, Caché attempts to provision shared memory in large pages on startup. If there is not enough space, Caché reverts to standard pages. However, you can use the memlock parameter to control this behavior and fail at startup if large page allocation fails.

    For more information, see Shared Memory Allocation on Windows in the “Installing Caché on Windows” chapter and memlock in the Configuration Parameter File Reference.

Allocating Memory Within Caché

There are two primary steps involved in configuring the way in which a Caché instance uses memory, described in the following sections:

The first action, allocating memory for routine and database caches, determines memory available to hold code and data. The second action, configuring gmheap, determines memory available for all other purposes. These, taken both separately and together, are important factors in the performance and functioning of the instance. For guidelines for initial memory allocations within Caché, see Calculating Initial Memory Requirements.

Two other memory settings are described in the section:

Important:

Some changes on the Memory and Startup page require an instance restart and some do not. If you modify a setting that requires a restart and save your changes, none of the changes take effect until you restart Caché, even those that by themselves do not require a restart. If a restart is required, the message Modification saved. You must restart system for the new values to take effect. displays. After you close the page, the warning message does not appear again to remind you that a restart is required, and it is therefore best to restart the instance immediately.

Allocating Memory to the Routine and Database Caches

To allocate memory for routine and database caches,

  1. On the Management Portal, navigate to the Memory and Startup page (System Administration > Configuration > System Configuration > Memory and Startup).

  2. Select Manually.

Important:

When Caché is first installed, memory for routine and database caches is set, by default, to be Automatically allocated. With this default, Caché allocates a conservative fraction of the available physical memory for the database cache, not to exceed 1 GB. This setting is not appropriate for production use. Before deploying the system for production use or before performing any tests or benchmarking intended to simulate production use, you must manually create an appropriate memory allocation for the database cache (typically as much memory as possible after taking into account the needs of application and operating system processes) by selecting Manually and following the procedures described in this section.

Allocating Memory to the Routine Cache

Memory Allocated for Routine Cache (MB) — The routine cache specifies the system memory allocated for caching server code.

Caché takes the total amount of memory you allocate for the routine cache and creates buffers of different sizes according to this formula: half the total memory in 64 KB buffers, three-eighths in 16 KB buffers, and one-eighth in 4 KB buffers. For example, if you allocate 500 MB, Caché creates 3906 64 KB buffers (250 MB), 11718 16 KB buffers (187.5 MB), and 15,625 4 KB buffers (62.5 MB). These groups of buffers are sometimes called pools, as in “the 16 K buffer pool”.

Bear in mind the following points regarding the routine cache memory allocation:

  • For typical production instances, a good starting allocation is 350-400 MB. However, the ideal allocation for a given application depends on may factors, and adjustment may be necessary to optimize performance.

  • The maximum number of buffers that Caché allocates to any pool is 65,529. The format for Caché routines does not allow more than 32,768 characters for literal strings regardless of the setting for the maximum routine size.

  • The minimum allocation is 35 MB; the instance will allocate this much even if you specify less. The minimum number of buffers in a pool is 430.

Note:

You can also allocate memory to the routine cache using the routines setting in the cache.cpf file; for more information, see routines in the Caché Parameter File Reference.

Allocating Memory to the Database Cache

Memory Allocated for [blocksize] Database Cache (MB) — The database cache specifies the system memory allocated for buffering data; this is also called creating global buffers. The database cache and the memory allocated to it are sometimes referred to as the global buffer pool.

Enter a separate allocation for each enabled database block size listed. The 8K block size is required and is listed by default. To enable more database block sizes (16K, 32K, 64K), use the DBSizesAllowed setting on the Startup Settings page (System Administration > Additional Settings > Startup); see DBSizesAllowed in the Caché Additional Configuration Settings Reference for more information.

Both block size and the maximum number of buffers available have implications for performance. To determine how many global buffers Caché will create for databases with a particular block size, divide the allocation for a block size by the block size; the smaller the block size, the larger the number of global buffers that will be created for databases with that block size. For guidelines for selecting the appropriate block sizes for your applications, see “Large Block Size Considerations” in the “Configuring Caché” chapter of the Caché System Administration Guide.

Important:

If you are configuring a data server in an ECP cluster, see Memory Use on Large ECP SystemsOpens in a new tab in the “Developing Distributed Applications” chapter of the Caché Distributed Data Management Guide for important information about adjustments to database cache sizes that may be necessary.

Note:

You can also allocate memory to the database cache using the globals setting in the cache.cpf file; for more information, see globals in the Caché Parameter File Reference.

Configuring Generic Memory Heap (gmheap)

You can configure gmheap on the Advanced Memory page (System Administration > Configuration > Additional Settings > Advanced Memory).

gmheap — The generic memory heap (also known as the shared memory heap) determines the memory available to Caché for purposes other than the routine and database caches.

To see details of used and available memory for gmheap, use the Shared Memory Heap Usage page (System Operation > System Usage page; click the Shared Memory Heap Usage link).

For more information, see gmheap in the “Advanced Memory Settings” section of the Caché Additional Configuration Settings Reference and also Generic (Shared) Memory Heap Usage in the “Monitoring Caché Using the Management Portal” chapter of the Caché Monitoring Guide.

Other Caché Memory Settings

Other memory settings that you can change on the Memory and Startup page are:

  • Maximum per Process Memory (KB) — The maximum memory allocation for a process for this Caché instance. The default is 262144 KB. The allowed range is 128 KB to 2147483647 KB.

    Note:

    It is not necessary to reset this value unless you have set it lower than its default (262144 KB). If you receive <STORE> errors, increase the size.

    This amount of process private memory, which is used for symbol table allocation and various other memory requirements (for example I/O device access structures and buffers), is allocated in increasing extents as required by the application until the maximum is reached. The initial allocation is 128 KB. Once this memory is allocated to the process, it is not deallocated until the process exits.

  • If you select the Enable Long Strings check box, Caché allocates a large string stack to handle long strings for each process.

File System and Storage Configuration Recommendations

This section provides general recommendations in the following areas:

In addition, database configuration recommendations are outlined in Configuring Databases section of the “Configuring Caché” chapter of the Caché System Administration Guide.

File System Recommendations

For recommendations about the best file system to use for any given operating system, see “Supported File Systems” in the “Supported Technologies” chapter of the online InterSystems Supported PlatformsOpens in a new tab document for this release.

In the interests of performance and recoverability, InterSystems recommends a minimum of four separate file systems for Caché, to host the following:

  • Installation files, executables, and system databases (including, by default, the write image journal, or WIJ, file)

  • Database files (and optionally the WIJ)

  • Primary journal directory

  • Alternate journal directory

In addition, you can add another separate file system to the configuration for the WIJ file which, by default, is created in the install—dir\mgr\ directory. Ensure that such a file system has enough space to allow the WIJ to grow to its maximum size—that is, the size of the database cache as allocated on the Memory and Startup page (System Administration > Configuration > System Configuration > Memory and Startup) (see Memory and Startup Settings in the “Configuring Caché” chapter of the Caché System Administration Guide). For more information on the WIJ, see the “Write Image Journal” chapter of the Caché Data Integrity Guide.

Note:

On UNIX®, Linux, and macOS platforms, /usr/local/etc/cachesys is the Caché registry directory and therefore must be on a local filesystem.

In the event of a catastrophic disk failure that damages database files, the journal files are a key element in recovering from backup. Therefore, you should place the primary and alternate journal directories on storage devices that are separate from the devices used by database files and the WIJ. (Journals should be separated from the WIJ because damage to the WIJ could compromise database integrity.) Since the alternate journal device allows journaling to continue after an error on the primary journal device, the primary and alternate journal directories should also be on devices separate from each other. For practical reasons, these different devices may be different logical units (LUNs) on the same storage array; the general rule is the more separation the better, with separate sets of physical drives highly recommended. See Journaling Best Practices in the “Journaling” chapter of the Caché Data Integrity Guide for more information about separate journal storage.

The journal directories and the WIJ directory are not configured during installation. For information on changing them after you install Caché, see Configuring Journal Settings in the Caché Data Integrity Guide.

InterSystems does not support the use of symbolic links for database directories.

Note:

Current storage arrays, especially SSD/Flash-based arrays, do not always allow for the type of segregation recommended in the preceding. When using such a technology, consult and follow the storage vendor’s recommendations for performance and resiliency.

In addition, this section includes information about the following:

Storage Configuration Recommendations

Many storage technologies are available today, from traditional magnetic spinning HDD devices to SSD and PCIe Flash based devices. In addition, multiple storage access technologies include NAS, SAN, FCoE, direct-attached, PCIe, and virtual storage with hyper-converged infrastructure.

The storage technology that is best for your application depends on application access patterns. For example, for applications that predominantly involve random reads, SSD or Flash based storage would be an ideal solution, and for applications that are mostly write intensive, traditional HDD devices might be the best approach.

The sections that follow provide guidelines as general suggestions. Specific storage product providers may specify separate and even contradictory best practices that should be consulted and followed accordingly.

Storage Connectivity

The following considerations apply to storage connectivity.

Storage Area Network (SAN) Fibre Channel

Use multiple paths from each host to the SAN switches or storage controllers. The level of protection increases with multiple HBAs to protect from a single card failure, however a minimum recommendation is to use at least a dual-port HBA.

To provide resiliency at the storage array layer, an array with dual controllers in either an active-active or active-passive configuration is recommended to protect from a storage controller failure, and to provide continued access even during maintenance periods for activities such as firmware updates.

If using multiple SAN switches for redundancy, a good general practice is to make each switch a separate SAN fabric to keep errant configuration changes on a single switch from impacting both switches and impeding all storage access.

Network Attached Storage (NAS)

With 10Gb Ethernet commonly available, for best performance 10Gb switches and host network interface cards (NICs) are recommended.

Having dedicated infrastructure is also advised to isolate traffic from normal network traffic on the LAN. This will help ensure predictable NAS performance between the hosts and the storage. -

Jumbo frame support should be included to provide efficient communication between the hosts and storage.

Many network interface cards (NICs) provide TCP Offload Engine (TOE) support. TOE support is not universally considered advantageous. The overhead and gains greatly depend on the server’s CPU for available cycles (or lack thereof). Additionally, TOE support has a limited useful lifetime because system processing power rapidly catches up to the TOE performance level of a given NIC, or in many cases exceeds it.

Storage Configuration

The storage array landscape is ever-changing in technology features, functionality, and performance options, and multiple options will provide optimal performance and resiliency for Caché. The following guidelines provide general best practices for optimal Caché performance and data resiliency.

In the past, RAID10 was recommended for maximum protection and performance. However, storage controller capacities, RAID types and algorithm efficiencies, and controller features such as inline compression and deduplication provide more options than ever before. Additionally, your application’s I/O patterns will help you decide with your storage vendor which storage RAID levels and configuration provide the best solution.

Where possible, it is best to use block sizes similar to that of the file type. While most storage arrays have a lower limit on the block size that can be used for a given volume, you can approach the file type block size as closely as possible; for example, a 32KB or 64KB block size on the storage array is usually a viable option to effectively support CACHE.DAT files with 8KB block format. The goal here is to avoid excessive/wasted I/O on the storage array based on your application’s needs.

The following table is provided as a general overview of storage I/O within a Caché installation.

I/O Type

When

How

Notes

Database reads, mostly random

Continuous by user processes

User process initiates disk I/O to read data

Database reads are performed by daemons serving web pages, SQL queries, or direct user processes

Database writes, ordered but non-contiguous

Approx. every 80 seconds or when pending updates reach threshold percentage of database cache, whichever comes first

Database write daemons

(8 processes)

Database writes are performed by a set of database system processes known as write daemons. User processes update the database cache and the trigger (time or database cache percent full) commits the updates to disk using the write daemons. Typically expect anywhere from a few MBs to several GBs that must be written during the write cycle depending on update rates.

WIJ writes, sequential

Approx. every 80 seconds or when pending updates reach threshold percentage of database cache, whichever comes first

Database master write daemon (1 process) The WIJ is used to protect physical database file integrity from system failure during a database write cycle. Writes are approximately 256KB each in size.

Journal writes, sequential

Every 64KB of journal data or 2 seconds, or sync requested by ECP, Ensemble, or application

Database journal daemon (1 process)

Journal writes are sequential and variable in size from 4KB to 4MB. There can be as low as a few dozen writes per second to several thousand per second for very large deployments using ECP and separate application servers.

Bottlenecks in storage are one of the most common problems affecting database system performance. A common error is sizing storage for data capacity only, rather than allocating a high enough number of discrete disks to support expected Input/Output Operations Per Second (IOPS).

I/O Type

Average Response Time

Maximum Response Time

Notes

Database block size random read (non-cached)

<=6 ms

<=15 ms

Database blocks are a fixed 8KB, 16KB, 32KB, or 64KB—most reads to disk will not be cached because of large database cache on the host.

Database block size random write (cached)

<=1 ms

<2 ms

All database file writes are expected to be cached by the storage controller cache memory.

4KB to 4MB journal write (without ECP)

<=2 ms

<=5 ms

Journal writes are sequential and variable in size from 4KB to 4MB. Write volume is relatively low when no ECP application servers are used.

4KB to 4MB journal write (with ECP)

<=1 ms

<=2 ms

Journal synchronization requests generated from ECP impose a stringent response time requirement to maintain scalability. The synchronization requests issue can trigger writes to the last block in the journal to ensure data durability.

Please note that these figures are provided as guidelines, and that any given application may have higher or lower tolerances and thresholds for ideal performance. These figures and I/O profiles are to be used as a starting point for your discussions with your storage vendor.

Preparing for Caché Security

The material in this section is intended for those using Caché security features. For an overview of those features, especially the authentication and authorization options, review the “Introduction” to the Caché Security Administration Guide. This material can help you select the security level for your site, which determines the required tasks to prepare the security environment before installing Caché.

This section covers the following topics:

Important:

If your security environment is more complex than those this document describes, contact the InterSystems Worldwide Response Center (WRC)Opens in a new tab for guidance in setting up such an environment.

Preparing the Security Environment for Kerberos

These sections describe the installation preparation for three types of environments:

  1. Windows-only Environment

    This configuration uses a Windows domain controller for KDC functionality with Caché servers and clients on Windows machines. A domain administrator creates domain accounts for running the Caché services on Caché servers.

    See the Creating Service Accounts on a Windows Domain Controller for Windows Caché Servers section for the requirements of using Windows Caché servers. Depending on the applications in use on your system, you may also need to perform actions described in the Configuring Windows Kerberos Clients section.

  2. Mixed Environment Using a Windows Domain Controller

    This configuration uses a Windows domain controller with Caché servers and clients on a mix of Windows and non-Windows machines. See the following sections for the requirements for using both Windows and non-Windows Cache servers:

  3. Non-Windows Environment

    This configuration uses a UNIX® or Kerberos KDC with Caché servers and clients all on non-Windows machines. See the following two sections for the requirements for using a UNIX® or macOS KDC and Caché servers:

All Caché supported platforms have versions of Kerberos supplied and supported by the vendor; see the appropriate operating system documentation for details. If you choose to use Kerberos, you must have a Kerberos key distribution center (KDC) or a Windows domain controller available on your network. Microsoft Windows implements the Kerberos authentication protocol by integrating the KDC with other security services running on the domain controller.

A Note on Terminology

This document refers to related, but distinct entities:

  • Service account — An entity within an operating system, such as Windows, that represents a software application or service.

  • Service principal — A Kerberos entity that represents a software application or service.

Creating Service Accounts on a Windows Domain Controller for Windows Caché Servers

Before installing Caché in a Windows domain, the Windows domain administrator must create a service account for each Caché server instance on a Windows machine using the Windows domain controller.

Account Characteristics

When you create this account on the Windows domain controller, configure it as follows:

  • Set the account's Password never expires property.

  • Make the account a member of the Administrators group on the Caché server machine.

  • Add the account to the Log on as a service policy.

Important:

If a domain-wide policy is in effect, you must add this service account to the policy for Caché to function properly.

Names and Naming Conventions

In an environment where clients and servers are exclusively on Windows, there are two choices for naming service principals:

  • Follow the standard Kerberos naming conventions. This ensures compatibility with any non-Windows systems in the future.

  • Use any unique string.

Each of these choices involves a slightly different process of configuring a connection to a server as described in the following sections.

Names That Follow Kerberos Conventions

For a name that follows Kerberos conventions, the procedure is:

  1. Run the Windows setspn command, specifying the name of service principal in the form service_principal/fully_qualified_domain_name, where service_principal is typically cache and fully_qualified_domain_name is the machine name along with its domain. For example, a service principal name might be cache/cacheserver.example.com. For detailed information on the setspn tool, see the SetspnOpens in a new tab page in the Microsoft documentation.

  2. In the Caché Server Manager dialog for adding a new preferred server, choose Kerberos. What you specify for the Service Principal Name field should match the principal name specified in setspn.

For detailed information on configuring remote server connections, see the “Connecting to Remote Servers” chapter of the Caché System Administration Guide.

Names That Are Unique Strings

For a name that uses any unique string, the procedure is:

  1. Choose a name for the service principal.

  2. In the Caché Server Manager dialog for adding a new preferred server, choose Kerberos. Specify the selected name for the service principal in the Service Principal Name field.

If you decide not to follow Kerberos conventions, a suggested naming convention for each account representing a Caché server instance is “cacheHOST”, which is the literal, cache, followed by the host computer name in uppercase. For example, if you are running a Caché server on a Windows machine called WINSRVR, name the domain account cacheWINSRVR.

For more information on configuring remote server connections, see the “Connecting to Remote Servers” chapter of the Caché System Administration Guide for the detailed procedure.

Creating Service Accounts on a Windows Domain Controller for Non-Windows Caché Servers

Before you install Caché in a Windows domain, you need to create a service account on the Windows domain controller for each Caché server on a non-Windows machine. Create one service account for each machine, regardless of the number of Caché server instances on that machine.

A suggested naming convention for these accounts is “cacheHOST,” which is the literal, cache, followed by the host computer name in uppercase. For example, if you run a Caché server on a non-Windows machine called UNIXSRVR, name the domain account cacheUNIXSRVR. For Caché servers on non-Windows platforms, this is the account that maps to the Kerberos service principal.

Important:

When you create this account on the Windows domain controller, Caché requires that you set the Password never expires property for the account.

To set up a non-Windows Caché server in the Windows domain, it must have a keytab file from the Windows domain. A keytab file is a file containing the service name for the Caché server and its key.

To accomplish this, map the Windows service account (cacheUNIXSRVR, in this example) to a service principal on the Caché server and extract the key from the account using the ktpass command-line tool on the domain controller; this is available as part of the Windows support tools from Microsoft.

The command maps the account just set up to an account on the UNIX®/Linux machine; it also generates a key for the account. The command must specify the following parameters:

Parameter Description
/princ The principal name (in the form cache/<fully qualified hostname>@<kerberos realm>).
/mapuser The name of the account created (in the form cache<HOST>).
/pass The password specified during account creation.
/crypto The encryption type to use (use the default unless specified otherwise).
/out The keytab file you generate to transfer to the Caché server machine and replace or merge with your existing keytab file.
Important:

The principal name on UNIX®/Linux platforms must take the form shown in the table with the literal cache as the first part.

Once you have generated a key file, move it to a file on the Caché server with the key file characteristics described in the following section.

Creating Service Principals on a KDC for Non-Windows Caché Servers

In a non-Windows environment, you must create a service principal for each UNIX®/Linux or macOS Caché server that uses a UNIX®/Linux or macOS KDC. The service principal name is of the form cache/<fully qualified hostname>@<kerberos realm>.

Key File Characteristics

Once you have created this principal, extract its key to a key file on the Caché server with the following characteristics:

  • On most versions of UNIX®, the pathname is install-dir/mgr/cache.keytab. On macOS and SUSE Linux, the pathname is /etc/krb5.keytab.

  • It is owned by the user that owns the Caché installation and the group cacheusr.

  • Its permissions are 640.

Configuring Windows Kerberos Clients

If you are using Windows clients with Kerberos, you may also need to configure these so that they do not prompt the user to enter credentials. This is required if you are using a program that cannot prompt for credentials — otherwise, the program is unable to connect.

To configure Windows not to prompt for credentials, the procedure is:

  1. On the Windows client machine, start the registry editor, regedit.exe.

  2. Go to the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters key.

  3. In that key, set the value of AllowTgtSessionKey to 1.

Testing Kerberos KDC Functions

When using Kerberos in a system of only non-Windows servers and clients, it is simplest to use a native UNIX®/Linux KDC rather than a Windows domain controller. Consult the vendor documentation on how to install and configure the KDC; these are usually tasks for your system administrator or system manager.

When installing Kerberos, there are two sets of software to install:

  • The KDC, which goes on the Kerberos server machine.

  • There also may be client software, which goes on all machines hosting Kerberos clients. This set of software can vary widely by operating system. Consult your operating system vendor documentation for what client software exists and how to install it.

After installing the required Kerberos software, you can perform a simple test using the kadmin, kinit, and klist commands to add a user principal to the Kerberos database, obtain a TGT (ticket-granting ticket) for this user, and list the TGT.

Once you successfully complete a test to validate that Kerberos is able to provide tickets for registered principals, you are ready to install Caché.

Initial Caché Security Settings

During installation, there is a prompt for one of three sets of initial security settings: Minimal, Normal, and Locked Down. This selection determines the initial authorization configuration settings for Caché services and security, as shown in the following sections:

If you select Normal or Locked Down for your initial security setting, you must provide additional account information to the installation procedure. If you are using Kerberos authentication, you must select Normal or Locked Down mode. See the Configuring User Accounts section for details.

Important:

If you are concerned about the visibility of data in memory images (often known as core dumps), see the section “Protecting Sensitive Data in Memory Images” in the “System Management and Security” chapter of the Caché Security Administration Guide.

Initial User Security Settings

The following tables show the user password requirements and settings for predefined users based on which security level you choose.

Initial User Security Settings
Security Setting Minimal Normal Locked Down
Password Pattern 3.32ANP 3.32ANP 8.32ANP
Inactive Limit 0 90 days 90 days
Enable _SYSTEM User Yes Yes No
Roles assigned to UnknownUser %All None None

You can maintain both the password pattern and inactive limit values from the System-wide Security Parameters page (System > Security Management > System Security Settings > System-wide Security Parameters). See the System-wide Security Parameters section of the “System Management and Security” chapter of the Caché Security Administration Guide for more information.

After installation, you can view and maintain the user settings at the Users page (System > Security Management > Users).

Password Pattern

When Caché is installed, it has a default set of password requirements. For locked-down installations, the initial requirement is that a password be from 8 to 32 characters, and can consist of alphanumeric characters or punctuation; the abbreviation for this is 8.32ANP. Otherwise, the initial requirement is that the password be from 3 to 32 characters, and can consist of alphanumeric characters or punctuation (3.32ANP).

Inactive Limit

This value is the number of days an account can be inactive before it is disabled. For minimal installations, the limit is set to 0 indicating that accounts are not disabled, no matter how long they are inactive. Normal and locked-down installations have the default limit of 90 days.

Enable _SYSTEM User

In versions of Caché prior to 5.1, all installed systems included an SQL System Manager user named _SYSTEM with a password of SYS. This Caché version creates the _SYSTEM and the following additional predefined users, using the password you provide during the installation: _SYSTEM, Admin, SuperUser, CSPSystem, and the instance owner (the installing user on Windows and the username specified by the installer on other platforms).

For more details on these predefined users, see the Predefined User Accounts section of the “Users” chapter of the Caché Security Administration Guide.

Roles Assigned to UnknownUser

When an unauthenticated user connects, Caché assigns a special name, UnknownUser, to $USERNAME and assigns the roles defined for that user to $ROLES. The UnknownUser is assigned the %All role with a Minimal-security installation; UnknownUser has no roles when choosing a security level other than Minimal.

For more details on the use of $USERNAME and $ROLES, see the “Users” and “Roles” chapters of the Caché Security Administration Guide.

Initial Service Properties

Services are the primary means by which users and computers connect to Caché. For detailed information about the Caché services see the “Services” chapter of the Caché Security Administration Guide.

Initial Service Properties
Service Property Minimal Normal Locked Down
Use Permission is Public Yes Yes No
Requires Authentication No Yes Yes
Enabled Services Most Some Fewest
Use Permission is Public

If the Use permission on a service resource is Public, any user can employ the service; otherwise, only privileged users can employ the service.

Requires Authentication

For installations with initial settings of locked down or normal, all services require authentication of some kind (Caché login, operating-system–based, or Kerberos). Otherwise, unauthenticated connections are permitted.

Enabled Services

The initial security settings of an installation determine which of certain services are enabled or disabled when Caché first starts. The following table shows these initial settings:

Initial Enabled Settings for Services
Service Minimal Normal Locked Down
%Service_Bindings Enabled Enabled Disabled
%Service_CSP Enabled Enabled Enabled
%Service_CacheDirect Enabled Disabled Disabled
%Service_CallIn Enabled Disabled Disabled
%Service_ComPort Disabled Disabled Disabled
%Service_Console* Enabled Enabled Enabled
%Service_ECP Disabled Disabled Disabled
%Service_MSMActivate Disabled Disabled Disabled
%Service_Monitor Disabled Disabled Disabled
%Service_Shadow Disabled Disabled Disabled
%Service_Telnet* Disabled Disabled Disabled
%Service_Terminal† Enabled Enabled Enabled
%Service_WebLink Disabled Disabled Disabled

* Service exists on Windows servers only

† Service exists on non-Windows servers only

After installation, you can view and maintain these services at the Services page (System > Security Management > Services).

Configuring User Accounts

If you select Normal or Locked Down for your initial security setting, you must provide additional information to the installation procedure:

  1. User Credentials for Windows server installations only — Choose an existing Windows user account under which to run the Caché service. You can choose the default system account, which runs Caché as the Windows Local System account, or enter a defined Windows user account.

    Important:

    If you are using Kerberos, you must enter a defined account that you have set up to run the Caché service. InterSystems recommends you use a separate account specifically set up for this purpose as described in the Creating Service Principals for Windows Caché Servers section.

    If you enter a defined user account, the installation verifies the following :

    • The account exists on the domain.

    • You have supplied the correct password.

    • The account has local administrative privileges on the server machine.

  2. Caché Users Configuration for Windows installations — The installation creates a Caché account with the %All role for the user that is installing Caché to grant that user access to services necessary to administer Caché.

    Owner of the instance for non-Windows installations — Enter a username under which to run Caché. Caché creates an account for this user with the %All role.

    Enter and confirm the password for this account. The password must meet the criteria described in the Initial User Security Settings table.

    Setup creates the following Caché accounts for you:_SYSTEM, Admin, SuperUser, CSPSystem, and the instance owner (installing user on Windows or specified user on other platforms) using the password you provide.

Important:

If you select Minimal for your initial security setting on a Windows installation, but Caché requires network access to shared drives and printers, you must manually change the Windows user account under which to run the Caché service. Choose an existing or create a new account that has local administrative privileges on the server machine.

The instructions in the platform-specific chapters of this book provide details about installing Caché. After reading the Caché Security Administration Guide introduction and following the procedures in this section, you are prepared to provide the pertinent security information to these installation procedures.

Preparing to Install Caché on UNIX®, Linux, and macOS

Read the following sections for information that applies to your platform:

Supported File Systems on UNIX®, Linux, and macOS Platforms

A complete list of file systems supported on UNIX®/Linux platforms, see “Supported File Systems” in the “Supported Technologies” chapter of the online InterSystems Supported PlatformsOpens in a new tab document for this release.

File System Mount Options on UNIX®, Linux, and macOS Platforms

This section describes the following mount options::

Buffered I/O vs. Direct I/O

In general, most of the supported UNIX®, Linux, and macOS file systems and operating systems offer two distinct I/O options, using either program control, a mount option, or both:

  • Buffered I/O, in which the operating system caches reads and writes, is the default.

  • Direct I/O is an option in which reads and writes bypass the operating system cache. Some platforms further distinguish an optimized form of direct I/O, called concurrent I/O which, if offered, is preferred.

The use of buffered and direct I/O in Caché varies by platform, file system, and the nature of the files that are stored on the file system, as follows:

  • Journal files

    Some platforms have specific recommendations to use direct or concurrent I/O mount options for optimal performance, as documented in “Supported File Systems” in the online InterSystems Supported PlatformsOpens in a new tab document for this release. On other platforms, Caché uses direct I/O automatically for journal files as appropriate and no special consideration is required.

  • Installation files, executables, and system databases

    This file system should be mounted to use buffered I/O (the default option, and on some platforms the only option).

  • Databases (CACHE.DAT files)

    The use of direct I/O (or concurrent I/O) varies in order to optimize I/O characteristics for database files on each platform, as detailed in the following. In all cases, Caché uses its own database cache, so buffering at the operating system level is not advantageous for database files. You must ensure that sufficient database cache is configured; this is particularly true on platforms on which Caché utilizes direct I/O, since operating system buffering cannot make up for an insufficient database cache.

    • IBM AIX

      Caché uses concurrent I/O for database files regardless of whether the cio file system mount option is used.

      Note:

      On AIX, in unusual configurations in which an external command is used to read a database file while Caché is running, the external command may fail because the file is opened for concurrent I/O by Caché. An example is performing an external backup using the cp command instead of a more sophisticated backup or snapshot utility. Mounting the file system with the cio option resolves this by forcing all programs to open files with concurrent I/O.

    • Linux

      Caché uses buffered I/O for database files. If using the VxFS file system, this can be overridden by mounting the file system for concurrent I/O with the cio mount option.

    • macOS

      Caché uses buffered I/O for database files.

  • External application files and streams

    Applications that use external files typically benefit from those files being located on a buffered file system.

noatime Mount Option

Generally, it is advisable to disable updates to the file access time when this option is available. This can typically be done using the noatime mount option on various file systems.

Calculating System Parameters for UNIX®, Linux, and macOS

This section explains how you can calculate the best parameters for your system in these sections:

For optimal Caché performance, you need to calculate proper values for certain Caché system parameters. These values allow you to determine whether you need to adjust certain system level parameters. The values you choose should minimize swapping and paging that require disk accesses, and thus improve system performance.

Review this section carefully and calculate the proper values for both your operating system and Caché before proceeding. Use the tables provided here to record the current and calculated values for your system level parameters. You can then refer to these tables when you install Caché. After your system is running, you may need to adjust these values to gain optimal performance.

If you are not already familiar with the memory organization at your operating system level, consult the appropriate system documentation.

Determining Initial System Configuration

This section covers some basic configuration topics for UNIX, Linux, and macOS systems. Because requirements vary by platform, consult your platform documentation for additional information.

See the section Managing Caché Memory for information on the two primary ways that you can manage memory in Caché.

Configuring Large and Huge Pages

As noted in Large and Huge Pages, the use of large and huge memory pages where supported can be of significant performance benefit and is highly recommended.

Support for Huge Memory Pages for Linux

The default memory page size on Linux systems is 4 KB. Most current Linux distributions include an option for Huge Pages, that is, a memory page size of 2 MB or 1 GB depending on system configuration. Use of Huge Pages saves memory by saving space in page tables. When Huge Pages are configured, the system automatically uses them in memory allocation. InterSystems recommends the use of Huge Pages on systems hosting Caché under most circumstances.

On Linux platforms, if shared memory is allocated in Huge Pages, they are automatically locked in memory and no further action is required. You can configure Caché to lock the shared memory segment in memory to prevent paging as described in the memlock entry of the Configuration Parameter File Reference.

Important:

With the 2.6.38 kernel, some Linux distributions have introduced Transparent Huge Pages (THP) to automate the creation, management, and use of HugePages. However, THP does not handle the shared memory segments that make up the majority of Caché’s memory allocated, and can cause memory allocation delays at runtime that may affect performance, especially for applications that have a high rate of job or process creation. For these reasons, InterSystems recommends that THP be disabled on all systems hosting Caché. For more detailed information on this topic, see Linux Transparent Huge Pages and the impact to CachéOpens in a new tab on InterSystems Developer Community.

To configure Huge Pages on Linux, do the following:

  1. Check the status.

    /proc/meminfo contains Huge Pages information. By default, no Huge Pages are allocated. Default Huge Page size is 2 MB. For example:

    HugePages_Total:     0
    HugePages_Free:      0
    HugePages_Rsvd:      0
    Hugepagesize:     2048 KB
    
  2. Change the number of Huge Pages.

    You can change the system parameter directly: For example, to allocate 2056 Huge Pages, execute:

    # echo 2056 > /proc/sys/vm/nr_hugepages
    
    Note:

    Alternatively, you can use sysctl(8) to change it:

    # sysctl -w vm.nr_hugepages=2056  
    

    Huge pages must be allocated contiguously, which may require a reboot. Therefore, to guarantee the allocation, as well as to make the change permanent, do the following:

    1. Enter a line in /etc/sysctl.conf file:

      echo "vm.nr_hugepages=2056" >> /etc/sysctl.conf  
      
    2. Reboot the system.

    3. Verify meminfo after reboot; for example:

      [root woodcrest grub]# tail -4 /proc/meminfo
      HugePages_Total:  2056
      HugePages_Free:   2056
      HugePages_Rsvd:      0
      Hugepagesize:     2048 KB
      
  3. Verify the use of Huge Pages by Caché.

    When Caché is started, it reports how much shared memory was allocated; for example, a message similar to the following is displayed (and included in the cconsole.log file):

    Allocated 3580MB shared memory: 3000MB global buffers, 226MB routine buffers
    

    The amount of memory available in Huge Pages should be greater than the total amount of shared memory to be allocated; if it is not greater, Huge Pages are not used.

    Note:

    Huge Pages are allocated from physical memory. Only applications and processes using Huge Pages can access this memory.

    Physical memory not allocated for Huge Pages is the only memory available to all other applications and processes.

    It is not advisable to specify HugePages_Total much higher than the shared memory amount because the unused memory will not be available to other components.

    If Caché fails to allocate Huge Pages on start-up and switches to standard pages, Caché will be allocating shared memory from the same memory pool as all other jobs.

    When Caché is configured to lock the shared memory segment in memory to prevent paging, Huge Pages can provide the required increase in the maximum size that may be locked into memory, as described in the Locked-in Memory section of the Red Hat Linux Platform Notes in this chapter.

Support for Large (16 MB) Pages on IBM AIX®

AIX® supports multiple page sizes: 4 KB, 64 KB, 16 MB, and 16 GB. Use of 4 KB and 64 KB pages is transparent to Caché. In order for Caché to use 16 MB large pages, you must configure them within AIX®. AIX® does not automatically change the number of configured large or huge pages based on demand. Currently, Caché does not use 16 GB huge pages.

Large pages should be configured only in high-performance environments because memory allocated to large pages can be used only for large pages.

To allocate large pages, users must have the CAP_BYPASS_RAC_VMM and CAP_PROPAGATE capabilities or have root authority unless memlock=64.

By default, when large pages are configured, the system automatically uses them in memory allocation. If shared memory cannot be allocated in large pages then it is allocated in standard (small) pages. For finer grain control over large pages, see memlock in the Caché Parameter File Reference.

Configuring Large Pages for AIX®

Configure large pages using the vmo command as follows:

vmo -r -o lgpg_regions=<LargePages> -o lgpg_size=<LargePageSize>

where <LargePages> specifies the number of large pages to reserve, and <LargePageSize> specifies the size, in bytes, of the hardware-supported large pages.

Note:

On systems that support dynamic Logical PARtitioning (LPAR), you can omit the -r option to dynamically configure large pages without a system reboot.

For example, the following command configures 1 GB of large pages:

# vmo -r -o lgpg_regions=64 -o lgpg_size=16777216

Once you have configured large pages, run the bosboot command to save the configuration in the boot image. After the system comes up, enable it for pinned memory using the following vmo command:

vmo -o v_pinshm=1

However, if memlock=64, vmo -o v_pinshm=1 is not required. For more information on memlock, see memlock in the Caché Parameter File Reference.

Calculating Disk Requirements

Your Caché instance needs disk space for the following items:

  • 67 MB for Caché.

  • 3 MB for the Caché Server Pages (CSP).

  • 3.5 MB for Caché ODBC support.

  • 2.5 MB for the Caché manager sources.

  • 6.6 MB for the Caché engine link libraries.

  • Space for your Caché application database.

  • Approximately 12.5% of the buffer pool size for the initial size of the write image journal file. If your disk does not have enough space for the write image journal file, when you start Caché it displays a message indicating that the system did not start.

  • Desired space for journal files.

Although you do not need to remove any installation files after completing the installation procedure, you can do so if you are short on disk space. The installation program tells you how much space can be saved, and asks if you want to delete the installation files.

Determining the Number of Global Buffers

Caché supports the following maximum values for the number of global buffers:

  • For 32-bit platforms, any 8-KB buffers that are:

    • Less than 2GB for 32-bit platforms

    The 2-GB value is the total address space the operation system allocates for the process data, which includes not only shared memory, but other Caché and operating system data as well. Therefore, it represents an upper limit that is not achievable in practice.

  • For 64-bit platforms:

    The number of global buffers is limited only by the operating system and the available memory.

For guidelines for your initial allocation of memory to the database cache (the global buffer pool), see Calculating Initial Memory Requirements; for the procedure for this allocation, see Allocating Memory Within Caché. For further information about the database cache, see globals in the “config” section of the Caché Parameter File Reference and Memory and Startup Settings in the “Configuring Caché” chapter of the Caché System Administration Guide.

Determining Number of Routine Buffers

Caché supports the following maximum value for the number of routine buffers:

65,535

Set your values to less than this maximum number of buffers.

For guidelines for your initial allocation of memory to the database cache (the global buffer pool), see Calculating Initial Memory Requirements; for the procedure for this allocation, see Allocating Memory Within Caché. For further information about the database cache, see routines in the “config” section of the Caché Parameter File Reference and Memory and Startup Settings in the “Configuring Caché” chapter of the Caché System Administration Guide.

Determining Maximum Number of Users

The maximum users allowed by Caché is the lowest of the following values:

  • License limit

  • # of semaphores - 4

For more information, see Determining License Capacity and Usage in the “Managing Caché Licensing” chapter of the Caché System Administration Guide.

Determining Maximum Database Size

The ulimit parameter in UNIX® determines the maximum file size available to a process. For the Caché Manager group, the value of ulimit should either be unlimited or as large as the largest database you may have.

For more information, see Configuring Databases in the “Configuring Caché” chapter of the Caché System Administration Guide.

Configuring UNIX® Kernel Parameters

The following sections describe issues related to tuning and performance on various UNIX® platforms:

Setting Values for Tunable UNIX® Parameters

Caché uses a configurable number of semaphores, in sets whose size you define. The parameters SEMMNI, SEMMNS, and SEMMSL reflect the number of semaphores per set and the total number of semaphores Caché uses. The UNIX®/Linux parameters that govern shared memory allocation are SHMMAX, SHMMNI, SHMSEG, and SHMALL. Caché uses shared memory and allocates one segment of shared memory; the size of this segment depends on the area set aside for global buffers and routine buffers. It uses the following formula to determine the segment's minimum size:

                       space required for routine buffers
                     +  space required for global buffers
                     +                               4 MB
                    _____________________________________
                     =         Shared memory segment size

If you are distributing your data across multiple computers, Caché allocates a second segment; by default, there is no memory allocated for the second segment. (If you plan to use distributed data, contact your vendor or InterSystems support for configuration guidelines.) You can alter NBUF and NHBUF according to other system requirements. Because Caché does all its own disk buffering, you should keep NBUF and NHBUF small. The following table lists the most common names of the UNIX® parameters that you may need to change, the minimum value InterSystems recommends for each parameter, and a brief description of each. Verify that your parameter values are set to at least the minimum value. Certain parameters may not be implemented on all platforms or may be referred to differently. Refer to platform-specific tuning notes for more information.

Tunable UNIX® Parameters
Kernel Parameter Recommended Minimum Value Definition
CDLIMIT Number of bytes in largest virtual volume Maximum size of a file.
MSGMAX 2 KB Maximum message size, in bytes.
MSGMNI Number of Caché instances x 3; each Caché instance uses three message queues Maximum number of uniquely identifiable message queues that may exist simultaneously.
NOFILES 35 Number of open files per process.
SEMMNI Product of SEMMNI and SEMMSL must be greater than the # of user processes + 4 Number of semaphore identifiers in the kernel; this is the number of unique semaphore sets that can be active at any one time.
SEMMNS 128 or ... Total number of semaphores in the system. User processes include jobbed processes and all other semaphores required by other software.
Number of processes expected to run. If the process table might expand, use a larger number to provide for expansion.
SEMMSL See SEMMNI Maximum number of semaphores per identifier list.
SHMALL 60 KB or ... Maximum total shared memory system-wide. Units should be in KB. 1000 represents the MCOMMON shared region.
1000 + total global buffer space+ total routine buffer space *
SHMMNI 3 Maximum number of shared memory identifiers system-wide.
SHMSEG 3 Number of attached shared memory segments per process.
SHMMAX 60 KB or ... Maximum shared memory segment size in KB.
1000 + total global buffer space+ total routine buffer space

* This is the minimum value for SHMALL required for Caché UNIX®. You must also take into account any other applications that use shared memory. If you are unsure of other shared memory use, calculate SHMALL as SHMSEG multiplied by SHMMAX, in pages; this larger value suffices in all cases.

Important:

Enough swap space must be created to support the memory allocated, unless the operating system documentation explicitly states otherwise. On certain operating systems, Caché creates locked shared memory segments, which are not pageable but still may need swap space.

Adjusting Maximum File Size

The hard limit for the maximum file size (RLIMIT_FSIZE) on any system running Caché must be unlimited. Set the value to unlimited on the operating system before installing. Make sure that the limit is set to unlimited for both the root user and the user who will run Caché. Caché also sets the process soft limit to RLIMIT_FSIZE in its daemons to prevent I/O errors.

Important:

Caché will not install or start up if RLIMIT_FSIZE is not set to unlimited.

See the operating system documentation for your platform for instructions on how to set the system hard limit for the maximum file size, RLIMIT_FSIZE.

Platform Configuration Issues

The following sections contain configuration issues for individual UNIX®/Linux platforms. For more information, consult the system documentation for your platform.

AIX® Platform Notes

The default settings of several AIX® parameters can adversely affect performance. The settings and recommendations are detailed for the following:

I/O Pacing Parameters

AIX® implements an I/O pacing algorithm that may hinder Caché write daemons. In AIX® 5.2 and AIX® 5.3, I/O pacing is automatically enabled when using HACMP clustering; beginning in AIX® 6.1, however, I/O pacing is enabled on all systems and the default high-water mark is set higher than in earlier releases.

If write daemons are slowing or stalling, you may have to adjust the high-water mark; for information, see the “Using Disk-I/O Pacing” section of the AIX® Performance Management Guide at the following IBM web page:http://publib.boulder.ibm.com/infocenter/systems/scope/aix/topic/com.ibm.aix.prftungd/doc/prftungd/disk_io_pacing.htmOpens in a new tab.

Important:

Beginning in AIX® 6.1, you should not have to make any high-water mark adjustments.

If you have questions about the impact to your system, however, contact the InterSystems Worldwide Response Center (WRC)Opens in a new tab or your AIX® supplier before making any changes. These recommendations are independent of Caché versions and apply to both JFS and Enhanced JFS (JFS2) file systems.

File System Mount Option

Different mount options may improve performance for some workloads.

Note:

Non-Caché workloads that benefit from file system caching (for example, operating system-level backups and/or file copies) are slowed by the cio mount option.

For more information on JFS2 file systems that contain only journal files, see UNIX® File System Recommendations in the “Journaling” chapter of the Caché Data Integrity Guide.

To improve recovery speed using the CACHE.WIJ file after a hard shutdown or system crash, InterSystems recommends a mount option that includes file system buffering (for example, rw) for the file system that contains the CACHE.WIJ file.

For information about mount options, see the AIX® Commands Reference at the following IBM web page: http://publib.boulder.ibm.com/infocenter/systems/scope/aix/topic/com.ibm.aix.cmds/doc/aixcmds3/mount.htmOpens in a new tab.

Memory Management Parameters

The number of file systems and the amount of activity on them can limit the number of memory structures available to JFS or JFS2, and delay I/O operations waiting for those memory structures.

To monitor these metrics, issue a vmstat -vs command, wait two minutes, and issue another vmstat -vs command. The output looks similar to the following:

# vmstat -vs
              1310720 memory pages
              1217707 lruable pages
               144217 free pages
                    1 memory pools
               106158 pinned pages
                 80.0 maxpin percentage
                 20.0 minperm percentage
                 80.0 maxperm percentage
                 62.8 numperm percentage
               764830 file pages
                  0.0 compressed percentage
                    0 compressed pages
                 32.1 numclient percentage
                 80.0 maxclient percentage
               392036 client pages
                    0 remote pageouts scheduled
                    0 pending disk I/Os blocked with no pbuf
                 5060 paging space I/Os blocked with no psbuf
              5512714 filesystem I/Os blocked with no fsbuf
               194775 client filesystem I/Os blocked with no fsbuf
                    0 external pager filesystem I/Os blocked with no fsbuf

If you see an increase in the following parameters, increase the values for better Caché performance:

  • pending disk I/Os blocked with no pbuf

  • paging space I/Os blocked with no psbuf

  • filesystem I/Os blocked with no fsbuf

  • client filesystem I/Os blocked with no fsbuf

  • external pager filesystem I/Os blocked with no fsbuf

When increasing these parameters from the default values:

  1. Increase the current value by 50%.

  2. Check the vmstat output.

  3. Run vmstat twice, two minutes apart.

  4. If the field is still increasing, increase again by the same amount; continue this step until the field stops increasing between vmstat reports.

Important:

Change both the current and the reboot values, and check the vmstat output regularly because I/O patterns may change over time (hours, days, or weeks).

See the following IBM web pages for more detailed information:

AIX® Tunable Parameters

None of the following listed parameters requires tuning because each is dynamically adjusted as needed by the kernel. See the appropriate AIX® operating system documentationOpens in a new tab for more information.

The following table lists the tunable parameters for the IBM pSeries AIX® 5.2 operating system.

AIX® Interprocess Communication Tunable Parameters
Parameter Purpose Dynamic Values
msgmax Specifies maximum message size. Maximum value of 4 MB
msgmnb Specifies maximum number of bytes on queue. Maximum value of 4 MB
msgmni Specifies maximum number of message queue IDs. Maximum value of 4096
msgmnm Specifies maximum number of messages per queue. Maximum value of 524288
semaem Specifies maximum value for adjustment on exit. Maximum value of 16384
semmni Specifies maximum number of semaphore IDs. Maximum value of 4096
semmsl Specifies maximum number of semaphores per ID. Maximum value of 65535
semopm Specifies maximum number of operations per semop() call. Maximum value of 1024
semume Specifies maximum number of undo entries per process. Maximum value of 1024
semvmx Specifies maximum value of a semaphore. Maximum value of 32767
shmmax Specifies maximum shared memory segment size. Maximum value of 256 MB for 32-bit processes and 0x80000000u for 64-bit
shmmin Specifies minimum shared-memory-segment size. Minimum value of 1
shmmni Specifies maximum number of shared memory IDs. Maximum value of 4096
maxuproc

maxuproc, which specifies the maximum number of processes than can be started by a single nonroot user, is a tunable parameter that can be adjusted as described in this subsection.

If this parameter is set too low then various components of the operating system can fail as more and more users attempt to start processes; these failures include loss of CSP pages, background tasks failing, etc. Therefore, you should set the maxuproc parameter to be higher than the maximum number of processes that might be started by a nonroot user (including interactive users, web server processes, and anything that might start a process).

Note:

Do not set the value excessively high because this value protects a server from a runaway application that is creating new processes unnecessarily; however, setting it too low causes unexplained problems.

InterSystems suggests that you set maxuproc to be double your expected maximum process count which gives a margin of error but still provides protection from runaway processes. For example, if your system has 1000 interactive users and often runs 500 background processes, then a value of at least 3000 would be a good choice.

The maxuproc value can be examined and changed either from the command line or from the smit/smitty administrator utilities, both as root user, as follows:

  • From the command line, view the current setting:

    # lsattr -E -l sys0 -a maxuproc
    

    then modify the value:

    # chdev -l sys0 -a maxuproc=NNNNNN
    

    where NNNNNN is the new value.

  • From the administrator utility smit (or smitty) choose System Environments > Change / Show Characteristics of Operating System > Maximum number of PROCESSES allowed per user.

If you increase the value of maxuproc, the change is effective immediately. If you decrease the value of maxuproc, the change does not take effect until the next system reboot. In both cases the change persists over system reboots.

Red Hat Linux Platform Notes

This topic includes the information on the following adjustments:

Shared Memory Limit

The default shared memory limit (shmmax) on Linux platforms is 32 MB. This value is too small for Caché, but it can be changed in the proc file system without a restart.

For example, to allow 128 MB, type the following command:

$ echo 134217728 >/proc/sys/kernel/shmmax

You can put this command into a startup script.

Alternatively, you can use sysctl(8), if available, to control this parameter. Look for a file called /etc/sysctl.conf and add a line similar to the following:

kernel.shmmax = 134217728

This file is usually processed at startup, but sysctl can also be called explicitly later.

Important:

The msgmni parameter may also be set too low if you are running more than one instance of Caché on a machine. As stated in the Tunable UNIX® Parameters table, set this value to three times the number of instances of Caché that run simultaneously on your system.

Other parameters are sufficiently sized for a Caché application. To view the values of other parameters, look in the files /usr/src/linux/include/asm-xxx/shmparam.h and /usr/src/linux/include/linux/sem.h.

For more information, reference “The proc File SystemOpens in a new tab” chapter of the Red Hat Enterprise Linux 4: Reference Guide.

Locked-in Memory

On Linux platforms, you can configure Caché to lock the shared memory segment in memory to prevent paging as described in the memlock entry of the Caché Parameter File Reference. If shared memory is allocated in Huge Pages, they are automatically locked in memory and no further action is required. Otherwise, you must increase the maximum size that may be locked into memory. The default value is 32 KB. View the current value using the ulimit command.

For example, to display all current limits:

bash$ ulimit -a 
core file size (blocks, -c) unlimited 
data seg size ( KBytes, -d) unlimited 
file size (blocks, -f) unlimited 
pending signals (-i) 1024 
max locked memory (KBytes, -l) 32 <---------- THIS ONE 
max memory size (KBytes, -m) unlimited 
open files (-n) 1024 
pipe size (512 bytes, -p) 8 
POSIX message queues (bytes, -q) 819200 
stack size ( KBytes, -s) 10240 
cpu time (seconds, -t) unlimited 
max user processes (-u) 49000 
virtual memory ( KBytes, -v) unlimited 
file locks (-x) unlimited 

To display only max-locked memory, use the -l option:

bash$ ulimit -l 
32 

If you have privileges, you can alter the value directly using the ulimit command; however, it is better to update the memlock parameter in the /etc/security/limits.conf file. If the memlock limit is too low, Linux reports a ENOMEM - "Not enough memory" error, which does not make the cause obvious. The actual memory is allocated; it is the lock that fails.

For more information, see memlock in the Caché Parameter File Reference.

Note:

You can achieve the same effect by using Linux Huge Pages for Caché shared memory. See the section “Support for Huge Memory Pages for Linux” in the section Calculating Memory Requirements in this chapter for more information.

Adjusting for Large Number of Concurrent Processes

Make the following adjustments if you are running a system that requires a large number of processes or telnet logins.

  1. In the /etc/xinetd.d/telnet file, add the following line:

    instances = unlimited
    
    
  2. In the /etc/xinetd.conf file, add or change the instances setting to:

    instances = unlimited
    
    
  3. After you make these modifications, restart the xinetd services with:

    # service xinetd restart
    
  4. The default pty (pseudo terminal connection) limit is 4096. If this is not sufficient, add or change the maximum pty line in the /etc/sysctl.conf file. For example:

    kernel.pty.max=10000
    
Dirty Page Cleanup

On large memory systems (for example, 8GB or larger), when doing numerous flat-file writes (for example, Caché backups or file copies), you can improve performance by adjusting the following parameters, which are located in proc/sys/vm/:

  • dirty_background_ratio — Maximum percentage of active that can be filled with dirty pages before pdflush begins to write them. InterSystems recommends setting this parameter to 5.

  • dirty_ratio — Maximum percentage of total memory that can be filled with dirty pages before processes are forced to write dirty buffers themselves during their time slice instead of being allowed to do more writes. InterSystems recommends setting this parameter to 10

You can set these variables by adding the following to your /etc/sysctl.conf file:

vm.dirty_background_ratio=5 
vm.dirty_ratio=10

These changes force the Linux pdflush daemon to write out dirty pages more often rather than queue large amounts of updates that can potentially flood the storage with a large burst of updates.”

SUSE Linux Platform Notes

This topic includes the information on the following adjustments:

Shared Memory Limits

The default shared memory limits (shhmax and shmall) on SUSE Linux 32-bit platforms are too small for Caché, and can be changed in the proc file system without a restart.

Caché uses shared memory for database buffers, global buffers, routine buffers, as well as license use. If the machine is being used only for Caché, InterSystems recommends setting the shared memory to approximately half the total memory. For more information, see the subsections of Determining Initial System Configuration in this chapter, and Determining License Capacity and Usage in the “Managing Caché Licensing” chapter of the Caché System Administration Guide.

Note:

The recommendations to change the shared memory limits do not apply to SUSE Linux 64-bit systems.

For example, to allow 512 MB, type the following commands:

#sets shmall and shmmax shared memory
echo 536870912 >/proc/sys/kernel/shmall     #Sets shmall to 512 MB
echo 536870912 >/proc/sys/kernel/shmmax     #Sets shmmax to 512 MB

You can put these commands into a script that is run at startup. The SUSE Linux product documentation recommends you put the commands in the /etc/init.d/boot.local script file.

You can change the settings for the system memory user limits by modifying a file called /etc/profile.local. Add lines similar to the following:

#sets user limits (ulimit) for system memory resources
ulimit -v 512000     #set virtual (swap) memory to 512 MB 
ulimit -m 512000     #set physical memory to 512 MB

In this same file, you can permanently change the values for the PATH and CLASSPATH parameters by adding lines similar to the following:

#sets env values PATH and CLASSPATH
export PATH=$PATH:/usr/cache/bin:/path/to/j2sdk/bin:/.
export CLASSPATH=
      $CLASSPATH:/cache/dev/java/lib/JDK16/cachedb.jar:/path/to/otherjar/file:/.

Important:

To avoid the risk of losing your changes during system upgrades, do not change the /etc/profile file.

Locked-in Memory

On Linux platforms, you can configure Caché to lock the shared memory segment in memory to prevent paging as described in the memlock entry of the Caché Parameter File Reference. If shared memory is allocated in Huge Pages, they are automatically locked in memory and no further action is required. Otherwise, see the Locked-in Memory section of the Red Hat Linux Platform Notes in this appendix.

Ubuntu Platform Notes

This topic includes the information on the following adjustments:

Semaphore Deletion Setting

Under some circumstances, the OS may delete an instance’s semaphores when the instance owner connects to an Ubuntu host, for example using SSH. To prevent this, edit the /etc/systemd/logind.conf file and change RemoveIPC=yes (the default) to RemoveIPC=no.

Updating to a newer version of Ubuntu may revert RemoveIPC to the default value of yes. After updating Ubuntu, be sure to change RemoveIPC to avoid unwanted semaphore deletion.

Special Considerations

The following sections describe particular issues or tasks associated with specific platforms or kinds of installations:

Maximum User Process Recommendations

Ensure that the maximum user processes is set high enough to allow all Caché processes for a given user, as well as other default processes, to run on the system.

Journal File System Recommendations

To achieve optimal journal performance and ensure journal data integrity when there is a system crash, InterSystems recommends various file systems and mount options for journal files. For specific platform details see the UNIX® File System Recommendations section of the “Journaling” chapter of the Caché Data Integrity Guide.

IBM AIX® Considerations

The default settings of several AIX® parameters can adversely affect performance. For detailed information on the settings and recommendations, see the AIX® Platform Notes section of the chapter “Preparing to Install Caché”.

System Requirements

For information about current system requirements, see the “Supported Technologies” chapter of the online InterSystems Supported PlatformsOpens in a new tab document for this release.

Required C/C++ Runtime Libraries

You must ensure that the required C/C++ runtime is installed on your IBM AIX® system before installing Caché.

Caché for AIX is compiled using the IBM XL C/C++ for AIX 13.1 compiler. If the system on which you are installing Caché does not have the corresponding version of the runtime already installed, you must install these three runtime file sets from runtime package IBM_XL_CPP_RUNTIME_V13.1.0.0_AIX.tar.Z:

  • xlC.aix61.rte 13.1

  • xlC.rte 13.1

  • xlC.msg.en_US.rte 13.1

If these files are not present, Caché installation will not complete.

Full information about and download of this package is available at IBM XL C/C++ Runtime for AIX 13.1Opens in a new tab.

Use of Raw Ethernet

In order to use raw Ethernet, an IBM AIX® machine must have the DLPI (Data Link Provider Interface) packages installed. If the machine does not have the DLPI packages, obtain them from your IBM provider and create DLPI devices through the following procedure:

  1. Log in as root.

  2. In the PSE drivers section of the /etc/pse.conf file, uncomment the four lines that refer to the DLPI drivers.

  3. Save the file.

  4. Restart the computer.

If the DLPI devices are not installed, the EthernetAddress() method of the %SYSTEM.INetInfoOpens in a new tab class returns a null string rather than information about the Ethernet device.

Red Hat Linux Considerations

The following considerations may apply to your environment:

  • The default shared memory limit (shmmax) on Linux platforms is 32 MB, which is too small to install or run Caché. If the installation fails, you can change the value interactively in the proc file system (see the Red Hat Linux Platform Notes section of Calculating System Parameters for UNIX®, Linux, and macOS for more information), then reinstall Caché. The new memory limit remains in effect until you restart the Red Hat Linux system.

    Alternatively, you can change the value permanently by editing the /etc/sysctl.conf file, which requires a restart of the Red Hat Linux system for the new value to become effective.

  • On Linux platforms with sufficient Huge Pages available, the Caché shared memory segment will be allocated from the Huge Page pool. A beneficial consequence of using Huge Pages is that the Caché shared memory segment will be locked into memory and its pages will not be paged out. See the section “Support for Huge Memory Pages for Linux” in the section Calculating Memory Requirements in this chapter for information about allocating Huge Pages.

  • To use Kerberos on the Red Hat Linux platform, you must install the krb5-devel package in addition to the krb5-libs package. Installing krb5-devel establishes the required symbolic links for using Kerberos. The package is required for production environments, not only development environments. See the Red Hat NetworkOpens in a new tab web site for more information about these components.

  • Red Hat Enterprise Linux V4 requires Websphere MQ version 7.0 to use the MQ interface.

SUSE Linux Considerations

The following considerations may apply to your environment:

  • The default shared memory limits (shhmax and shmall) on SUSE Linux 32-bit platforms are too small for Caché, and can be changed in the proc file system without a restart.

  • On Linux platforms with sufficient Huge Pages available, the Caché shared memory segment will be allocated from the Huge Page pool. A beneficial consequence of using Huge Pages is that the Caché shared memory segment will be locked into memory and its pages will not be paged out. See the section “Support for Huge Memory Pages for Linux” in the section Calculating Memory Requirements in this chapter for information about allocating Huge Pages.

  • To use Kerberos on the SUSE Linux platform, you must install the krb5-devel package in addition to the krb5-libs package. Installing krb5-devel establishes the required symbolic links for using Kerberos. The package is required for production environments, not only development environments. See the SUSE documentationOpens in a new tab web site for more information about these components.

See the SUSE Linux Platform Notes section of the chapter “Preparing to Install Caché” for detailed configuration information.

macOS Considerations

For the cinstall script procedure, see the section “Performing a Caché UNIX® Installation” in the chapter Installing Caché on UNIX®, Linux, and macOS in this book.

FeedbackOpens in a new tab