Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

6.5. Setting the Database Cache Size


The database cache contains the Berkeley database index files for the database, meaning all of the *.db and other files used for attribute indexing by the database. This value is passed to the Berkeley DB API function set_cachesize().
This cache size has less of an impact on Directory Server performance than the entry cache size, but if there is available RAM after the entry cache size is set, increase the amount of memory allocated to the database cache.
The operating system also has a file system cache which may compete with the database cache for RAM usage. Refer to the operating system documentation to find information on file system cache settings and monitoring the file system cache.

Note

Instead of manually setting the entry cache size Red Hat recommends the auto-sizing feature for optimized settings based on the hardware resources. For details, see Section 6.1.1, “Manually Re-enabling the Database and Entry Cache Auto-sizing”.

6.5.1. Manually Setting the Database Cache Size Using the Command Line

To manually set the database cache size using the command line:
  1. Disable automatic cache tuning:
    # dsconf -D "cn=Directory Manager" ldap://server.example.com backend config set --cache-autosize=0
    Copy to Clipboard Toggle word wrap
    Manually set the database cache size:
    # dsconf -D "cn=Directory Manager" ldap://server.example.com backend config set --dbcachesize=268435456
    Copy to Clipboard Toggle word wrap
    This command sets the database cache to 256 megabytes.
  2. Restart the Directory Service instance:
    # dsctl instance_name restart
    Copy to Clipboard Toggle word wrap

6.5.2. Manually Setting the Database Cache Size Using the Web Console

To manually set the database cache size using the Web Console:
  1. Open the Directory Server user interface in the web console. For details, see Logging Into Directory Server Using the Web Console section in the Red Hat Directory Server Administration Guide.
  2. Select the instance.
  3. On the Database tab, select Global Database Configuration.
  4. Disable Automatic Cache Tuning.
  5. Click Save Configuration.
  6. Set the Database Cache Size (bytes) field to the database cache size.
  7. Click Save Configuration.
  8. Click the Actions button, and select Restart Instance.

6.5.3. Storing the Database Cache on a RAM Disk

If your system running the Directory Server instance has enough free RAM, you can optionally store the database cache on a RAM disk for further performance improvements:
  1. Create a directory for the database cache and metadata on the RAM disk:
    # mkdir -p /dev/shm/slapd-instance_name/
    Copy to Clipboard Toggle word wrap
  2. Set the following permissions on the directory:
    # chown dirsrv:dirsrv /dev/shm/slapd-instance_name/
    # chmod 770 /dev/shm/slapd-instance_name/
    Copy to Clipboard Toggle word wrap
  3. Stop the Directory Server instance:
    # systemctl stop dirsrv@instance_name
    Copy to Clipboard Toggle word wrap
  4. Edit the /etc/dirsrv/slapd-instance_name/dse.ldif file and set the new path in the nsslapd-db-home-directory attribute in the cn=bdb,cn=config,cn=ldbm database,cn=plugins,cn=config entry:
    dn: cn=bdb,cn=config,cn=ldbm database,cn=plugins,cn=config
    ...
    nsslapd-db-home-directory: /dev/shm/slapd-instance_name/
    Copy to Clipboard Toggle word wrap
    If the nsslapd-db-home-directory attribute does not exist, add it with the new value to the cn=bdb,cn=config,cn=ldbm database,cn=plugins,cn=config entry.
  5. Start the Directory Server instance:
    # systemctl start dirsrv@instance_name
    Copy to Clipboard Toggle word wrap

Note

When the database cache is stored on a RAM disk, Directory Server needs to recreate it after each reboot. As a consequence, the service start and initial operations are slower until the cache is recreated.
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat