a5a9949 590931 - rhds81 import - hardcoded pages_limit for nsslapd-import-cache-autosize

Authored and Committed by nhosoi 13 years ago
    590931 - rhds81 import - hardcoded pages_limit for nsslapd-import-cache-autosize
    
    Fix Description:
    1. Got rid of the old hardcoded limit 200MB.
    2. Introduced the memory hard limit and soft limit.
       Standalone command line import ldif2db behaves as follows:
       If import cache autosize is enabled:
           nsslapd-import-cache-autosize: -1 or 1 ~ 99
           (if the value is greater than or equal to 100,
            it's reset to 50 with a warning.)
       the import cache size is calculated as
           nsslapd-import-cache-autosize * pages / 125
           (./125 instead of ./100 is for adjusting the BDB overhead.)
       If import cache is disabled:
           nsslapd-import-cache-autosize: 0
       get the nsslapd-import-cachesize.
       Calculate the memory size left after allocating the import cache size.
       If the size is less than the hard limit, it issues an error and quit.
       If the size is greater than the hard limit and less than the soft limit,
       it issues a warning, but continues the import task.
    
    Note: this function is called only if the import is executed as a stand
    alone command line (ldif2db).