I'm using openldap 2.4.10. slapd is only using one cpu core of my server. is it possible slapd use more cpu cores ?
On Thu, 3 Jul 2008, Jeronimo Zucco wrote:
I'm using openldap 2.4.10. slapd is only using one cpu core of my server. is it possible slapd use more cpu cores ?
If configured to use threads (which it should by default) and your platform's threads aren't pure user-space, then "yes". (All the involved components, such as bdb and openssl, must also be compiled to have a per-thread errno, if the platform doesn't do that by default.)
Philip Guenther
Philip Guenther wrote:
On Thu, 3 Jul 2008, Jeronimo Zucco wrote:
I'm using openldap 2.4.10. slapd is only using one cpu core of my server. is it possible slapd use more cpu cores ?
If configured to use threads (which it should by default) and your platform's threads aren't pure user-space, then "yes". (All the involved components, such as bdb and openssl, must also be compiled to have a per-thread errno, if the platform doesn't do that by default.)
Philip Guenther
I did it, as you can see in my openldap configure log:
checking for _beginthread... no checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking POSIX thread version... 10 checking for LinuxThreads pthread.h... no checking for GNU Pth pthread.h... no checking for pthread_create in default libraries... no checking for pthread link with -kthread... no checking for pthread link with -pthread... yes checking for pthread_yield... yes checking for pthread_kill... yes checking for pthread_rwlock_destroy with <pthread.h>... yes checking for pthread_detach with <pthread.h>... yes checking for pthread_setconcurrency... yes checking for pthread_getconcurrency... yes checking for pthread_kill_other_threads_np... no checking for LinuxThreads implementation... no checking for LinuxThreads consistency... no checking if pthread_create() works... yes checking if select yields when using pthreads... yes checking for thread specific errno... yes checking for thread specific h_errno... yes checking for Berkeley DB thread support... yes
But slapd still using just one core. I'm running slapd with "ldap" user, in a CentOS 5.2, BerkeleyDB-4.6.21, vanilla kernel 2.6.25.9. Server has 4 cpu cores.
I'm doing tests with multi-master replication, the replication is working fine. I noted it when I was doing replication with other 2 nodes, the slapd in the first master is only using one core.
Some tips ?
Jeronimo Zucco jczucco@ucs.br writes:
Philip Guenther wrote:
On Thu, 3 Jul 2008, Jeronimo Zucco wrote:
I'm using openldap 2.4.10. slapd is only using one cpu core of my server. is it possible slapd use more cpu cores ?
If configured to use threads (which it should by default) and your platform's threads aren't pure user-space, then "yes". (All the involved components, such as bdb and openssl, must also be compiled to have a per-thread errno, if the platform doesn't do that by default.)
[...]
I did it, as you can see in my openldap configure log:
checking for LinuxThreads pthread.h... no checking for GNU Pth pthread.h... no checking for pthread_create in default libraries... no checking for pthread link with -kthread... no checking for pthread link with -pthread... yes checking for pthread_yield... yes checking for pthread_kill... yes checking for pthread_rwlock_destroy with <pthread.h>... yes checking for pthread_detach with <pthread.h>... yes checking for pthread_setconcurrency... yes checking for pthread_getconcurrency... yes checking for pthread_kill_other_threads_np... no
OpenLDAP calls epoll on Linux and /dev/poll on Solaris. GNU-Pth ist not able to provide epoll or /dev/poll.
-Dieter
Dieter Kluenter wrote:
OpenLDAP calls epoll on Linux and /dev/poll on Solaris. GNU-Pth ist not able to provide epoll or /dev/poll.
Hmm... witch means: openldap server (slapd) in linux use just one cpu core? If I have a quad core cpu for ldap server, I'm only can use 25% of my machine ?
Dieter Kluenter wrote:
OpenLDAP calls epoll on Linux and /dev/poll on Solaris. GNU-Pth ist not able to provide epoll or /dev/poll.
AFAIK, /dev/poll support by OpenLDAP on Solaris is HEAD only, and it never worked as intended.
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it ----------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Email: ando@sys-net.it -----------------------------------
Dieter Kluenter wrote:
Jeronimo Zuccojczucco@ucs.br writes:
Philip Guenther wrote:
On Thu, 3 Jul 2008, Jeronimo Zucco wrote:
I'm using openldap 2.4.10. slapd is only using one cpu core of my
server. is it possible slapd use more cpu cores ?
If configured to use threads (which it should by default) and your platform's threads aren't pure user-space, then "yes". (All the involved components, such as bdb and openssl, must also be compiled to have a per-thread errno, if the platform doesn't do that by default.)
[...]
I did it, as you can see in my openldap configure log:
checking for LinuxThreads pthread.h... no checking for GNU Pth pthread.h... no checking for pthread_create in default libraries... no checking for pthread link with -kthread... no checking for pthread link with -pthread... yes checking for pthread_yield... yes checking for pthread_kill... yes checking for pthread_rwlock_destroy with<pthread.h>... yes checking for pthread_detach with<pthread.h>... yes checking for pthread_setconcurrency... yes checking for pthread_getconcurrency... yes checking for pthread_kill_other_threads_np... no
OpenLDAP calls epoll on Linux and /dev/poll on Solaris. GNU-Pth ist not able to provide epoll or /dev/poll.
Dieter, are you hallucinating? GNU Pth has nothing to do with this.
Howard Chu hyc@symas.com writes:
Dieter Kluenter wrote:
Jeronimo Zuccojczucco@ucs.br writes:
checking for GNU Pth pthread.h... no
[...]
Dieter, are you hallucinating? GNU Pth has nothing to do with this.
Yes, Iam :-(
-Dieter
On Fri, 4 Jul 2008, Jeronimo Zucco wrote:
Philip Guenther wrote:
On Thu, 3 Jul 2008, Jeronimo Zucco wrote:
I'm using openldap 2.4.10. slapd is only using one cpu core of my server. is it possible slapd use more cpu cores ?
If configured to use threads (which it should by default) and your platform's threads aren't pure user-space, then "yes". (All the involved components, such as bdb and openssl, must also be compiled to have a per-thread errno, if the platform doesn't do that by default.)
Philip Guenther
I did it, as you can see in my openldap configure log:
...
But slapd still using just one core. I'm running slapd with "ldap" user, in a CentOS 5.2, BerkeleyDB-4.6.21, vanilla kernel 2.6.25.9. Server has 4 cpu cores.
So the compile config bits all look good for slapd using threads and that platform has 'real' threads, so things are good from that side.
I'm doing tests with multi-master replication, the replication is working fine. I noted it when I was doing replication with other 2 nodes, the slapd in the first master is only using one core.
<sigh>
So, you asked the question "is it possible slapd use more cpu cores?" when your *real* question was "is it possible for slapd to use multiple CPU cores when doing replication with two other nodes in a multimaster setup?" You _do_ realize that those questions are significantly different and may have different answers, right?
I don't know the answer to your real question. I _suspect_ that the details of your configuration (i.e., the slapd.conf bits for the three masters) would be useful in answering it, but I'm not familiar enough with that sort of configuration to be sure.
Philip Guenther
Philip Guenther wrote:
<sigh>
So, you asked the question "is it possible slapd use more cpu cores?" when your *real* question was "is it possible for slapd to use multiple CPU cores when doing replication with two other nodes in a multimaster setup?" You _do_ realize that those questions are significantly different and may have different answers, right?
I don't know the answer to your real question. I _suspect_ that the details of your configuration (i.e., the slapd.conf bits for the three masters) would be useful in answering it, but I'm not familiar enough with that sort of configuration to be sure.
Philip Guenther
Just for register, slapd is using all my core cpu's in normal operation (queries, updates and syncrepl).
Thanks for help.
openldap-software@openldap.org