Difference between revisions of "Shared memory for Ldap 5.x"

Line 1: Line 1:
 +
This is for ZCS 5.0.x only.
 +
 
To setup SHM keys :
 
To setup SHM keys :
  
1. Calculate and set kernel.shmall and kernel.shmmax (you already have detailed steps for this from the wiki)
+
1. Calculate and set kernel.shmall and kernel.shmmax  
  
 
2. ldap stop
 
2. ldap stop

Revision as of 12:05, 9 July 2012

This is for ZCS 5.0.x only.

To setup SHM keys :

1. Calculate and set kernel.shmall and kernel.shmmax

2. ldap stop

3. Remove existing cache files

  /opt/zimbra/sleepycat/bin/db_recover -c -h /opt/zimbra/openldap-data/
  This is being done to clear current MMAP files, so that if and when you roll back you have a clean slate.

3.5 Confirm whether "/opt/zimbra/openldap-data" and __db.* is deleted.

4. Set the shared memory keys in /opt/zimbra/conf/slapd.conf.in

  #shmkey
  shm_key 5.

5. Start ldap.

6. Verify if memory keys are being used:

  ipcs -mp  (the column CPID is the process ID which is using the shared memory referenced by the key which was set up in step 6)


To Roll back to MMAP :

1. ldap stop.

2. Remove the cache files

  /opt/zimbra/sleepycat/bin/db_recover -c -h /opt/zimbra/openldap-data/  (this should delete the bdb cache files)

3. ipcrm [ -M key or -m id ] (to delete files from memory, at this point rebooting should also clear the memory files)******

  Skip this if the file has already been removed, but please confirm using ipcs -m or ipcs -mp to check if the memory keys have been removed. If not then user ipcrm to manually delete the shm keys.

4. update config to comment/remove shm keys configuration.

5. start ldap (this should now be using the MMAP files).

Jump to: navigation, search