[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#4600) slap_mods_check duplicate check is slow with large number of entries



Full_Name: Nick Burrett
Version: 2.3.24
OS: 
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (216.239.33.25)


I'm using sync-replication and have been wondering why the client-side process
is staying at 100% CPU use for several hours with the synchronisation apparently
stalling.

I have a group with 495000 entries, which is taking a very long time to sync. 
Running through a debugger, I find it's getting held-up by this:

modify.c/slapd_mods_check/line 745

/* check for duplicates, but ignore Deletes.  */
for ( i = 1; i < nvals ; i++ ) {
   /* test asserted values against themselves */
   for( j = 0; j < i; j++ ) {
      rc = ordered_value_match( &match, ml->sml_desc, mr,
      ...
   }
}

So with 'nvals == 495000', you can imagine this will take a long time to
complete.  Typically here, the value of 'nvals' can be 12000 at present and ever
growing for one of our group memberships.