Disk and memory requirements
Ensure that an appropriate amount of disk space is available for your Db2® environment, and allocate memory accordingly.
For instructions on using Db2 with Docker, please see the Docker website.
Disk requirements
The disk space required for your product depends on the type of installation you choose and the type of file system you have. The Db2 Setup wizard provides dynamic size estimates based on the components selected during a typical, compact, or custom installation.
Remember to include disk space for required databases, software, and communication products. Ensure that the file system is not mounted with concurrent I/O (CIO) option.
On Linux® and UNIX operating systems, if the temporary directory (default: /tmp) is a mounted drive, all users must be able to directly execute binaries. (For example, if /tmp is a mounted drive, do not specify the noexec parameter with the mount command when you create the drive). The /tmp space that is required for a Db2 pureScale® environment is 2 GB, and for environments other than a Db2 pureScale environment the space required is 512 MB. The /var directory requires 512 MB of free space.
On Linux and UNIX operating systems, the disk space that is required for the instance home directory is calculated at run time and varies. Approximately 1 to 1.5 GB of free space in the /home directory is normally required.
On Linux and UNIX operating systems, ensure the file system used for the instance home directory and installation directory are not mounted with the nosuid and noexec parameters. The default instance home directory is /home and the default installation directory is /opt/IBM/db2/<version>. Db2 binaries require suid file permissions.
On Windows operating systems the following free space is recommended in additional to that of your Db2 product:
- 40 MB in the system drive
- 60 MB in the temporary folder specified by the
temp
environment variable.
Memory requirements
Memory requirements are affected by the size and complexity of your database system, the extent of database activity, and the number of clients accessing your system. At a minimum, a Db2 database instance requires 512MB of RAM, plus an additional 512MB of RAM per database. However, 1 GB or greater of RAM per instance and per database is recommended for improved performance. These requirements do not include any additional memory requirements for other software that is running on your system, such as Db2 monitoring tools or other non-Db2 tools. For IBM data server client support, these memory requirements are for a base of five concurrent client connections. For every additional five client connections, an additional 16 MB of RAM is required.
For Db2 server products, the self-tuning memory manager (STMM) simplifies the task of memory configuration by automatically setting values for several memory configuration parameters. When enabled, the memory tuner dynamically distributes available memory resources among several memory consumers including sort, the package cache, the lock list, and buffer pools.
Paging space requirements
Db2 requires paging, also called swap to be enabled. This configuration is required to support various functions in Db2 which monitor or depend on knowledge of swap/paging space utilization. The actual amount of swap/paging space required varies across systems and is not solely based on memory utilization by application software.
A reasonable minimum swap/paging space configuration for most systems is 25-50% of RAM. These higher requirements are due to virtual memory pre-allocated per database / instance, and retained virtual memory in the case of STMM tuning multiple databases. Additional swap/paging space might be wanted to provision for unanticipated memory overcommitment on a system.