On 06/07/2016 08:56 AM, thierry bordaz wrote:

On 06/06/2016 07:23 PM, Martin Basti wrote:

On 03.06.2016 13:38, Stanislav Laznicka wrote:

The attached patch implements solution to https://fedorahosted.org/freeipa/ticket/5914. The patch is rather hacky as nsslapd-db-locks requires to be modified when DS is not running although I accept proposals for better solution.


LGTM and works for me, but I want ack from thierry because of the value

* value set by this patch is 100K, it is okay or should be rather 50K as is mentioned in the ticket * should be upgrade for this change, or should be this done only for new installations? (patch solves new installations only and I don't think that we should change it by upgrade, users may have already tuned DS)


This value also depends of the data. For example adding groups with 10K members spikes the dblock consumption up to 40K because of membership computation during the update. The size of the entries can also contribute if for example we have several entries per page or they are too large and fit on several pages.

IMHO we should support out of the box groups with 10K, so 'nsslapd-db-locks: 50000' looks good to me. However it could be documented why it can consum so much lock and how to tune it.


Thank you, Thierry. Reduced the 100k locks to 50k locks in the patch (attached).
From 1d58f8ac6dc426092a353b79f64d63db27b4b82b Mon Sep 17 00:00:00 2001
From: Stanislav Laznicka <slazn...@redhat.com>
Date: Fri, 3 Jun 2016 13:27:04 +0200
Subject: [PATCH] Increase nsslapd-db-locks to 50000

Sometimes the lock table would run out of available locks. This should
improve the lock table default configuration.

 ipaserver/install/dsinstance.py | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index 00ef5f3a9370c2782213e5b269267eaa1ba4ae40..2bd0340ef4e1a1b72de17ac7ae9cdf56ca102fa8 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -250,8 +250,7 @@ class DsInstance(service.Service):
         self.step("creating directory server user", create_ds_user)
         self.step("creating directory server instance", self.__create_instance)
-        if self.config_ldif:
-            self.step("updating configuration in dse.ldif", self.__update_dse_ldif)
+        self.step("updating configuration in dse.ldif", self.__update_dse_ldif)
         self.step("restarting directory server", self.__restart_instance)
         self.step("adding default schema", self.__add_default_schemas)
         self.step("enabling memberof plugin", self.__add_memberof_module)
@@ -571,9 +570,15 @@ class DsInstance(service.Service):
             temp_filename = new_dse_ldif.name
             with open(dse_filename, "r") as input_file:
                 parser = installutils.ModifyLDIF(input_file, new_dse_ldif)
-                # parse modification from config ldif
-                with open(self.config_ldif, "r") as config_ldif:
-                    parser.modifications_from_ldif(config_ldif)
+                parser.replace_value(
+                        'cn=config,cn=ldbm database,cn=plugins,cn=config',
+                        'nsslapd-db-locks',
+                        ['50000']
+                        )
+                if self.config_ldif:
+                    # parse modifications from ldif file supplied by the admin
+                    with open(self.config_ldif, "r") as config_ldif:
+                        parser.modifications_from_ldif(config_ldif)
         shutil.copy2(temp_filename, dse_filename)

Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to