389ds / 389-ds-base

The enterprise-class Open Source LDAP server for Linux
https://www.port389.org/
Other
200 stars 82 forks source link

Issue 6183 - Slow ldif2db import on a newly created BDB backend #6208

Closed droideck closed 3 weeks ago

droideck commented 3 weeks ago

Bug Description: After creating a new BDB backend, we autotune the cache only when restarting. So, an administrator will try to import an LDIF before that; she will have a very slow import.

Fix Description: Do the autotuning during the backend creation. Add a CI test for the scenario.

Fixes: https://github.com/389ds/389-ds-base/issues/6183

Reviewed by: ?

tbordaz commented 3 weeks ago

@droideck , the patch looks good to me as well but something to clarify: the tuning of the cache is missing, what specific cache (db cache, entry cache, import cache,..) ?

If it is db cache, something that is not clear to me is that when the instance is created, it contains a default backend and I would expect db cache to be set.

droideck commented 3 weeks ago

@droideck , the patch looks good to me as well but something to clarify: the tuning of the cache is missing, what specific cache (db cache, entry cache, import cache,..) ?

I have suspicions it's the DN cache, but I am not exactly sure. After I found that the issue was with autotuning, I focused on the solution. And as it's the correct thing to do — perform an autotuning after a backend creation (if autotuning is enabled), I just left with that as I had more stuff to do.

I can dive deeper into that if you want, though. It'll be interesting to dive into. :)

If it is db cache, something that is not clear to me is that when the instance is created, it contains a default backend and I would expect db cache to be set.