--bcaec54eef8cfe673204d9b5eb1e Content-Type: text/plain; charset=ISO-8859-1
So what is happening on the slapd server while things are paused?
Also, if you use an ldapi:/// socket rather than a tcp/ip socket, do you see the same issue?
A have changed to use the ldapi:/// socket and there is no improvement.
It seems that one thread of slapd is repeatedly waiting on epoll_wait. Strace prints epoll_wait(6, and then pauses for couple of seconds.
Iotop shows to slapd threads writing to disk. Right after I start ldapadd, they write to disk at approximately 60MB/s each. Over time, they go down to 2-3 MB/s each.
TID PRIO USER DISK READ DISK WRITE SWAPIN IO COMMAND 15264 be/4 ldap 0.00 B/s 2.81 M/s 0.00 % 99.99 % slapd -u ldap -g ldap -f /etc/openldap/slapd.conf -h ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock 15255 be/4 ldap 0.00 B/s 3.00 M/s 0.00 % 19.48 % slapd -u ldap -g ldap -f /etc/openldap/slapd.conf -h ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock
I took an strace for all the process and threads involved over a 2 minute period.
Process slapd - main thread: futex(0x7f2efa38e9d0, FUTEX_WAIT, 15251, NULL
Process slapd - thread: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 57.08 1.639877 474 3457 268 futex 42.54 1.222208 1076 1136 fdatasync 0.17 0.004913 0 272650 writev 0.11 0.003194 3 1137 pwrite 0.06 0.001736 0 272649 lseek 0.02 0.000530 0 4544 1136 read 0.01 0.000282 0 2273 write 0.00 0.000132 0 2273 sendto 0.00 0.000065 0 1136 open 0.00 0.000061 0 1136 stat 0.00 0.000041 0 1136 epoll_ctl 0.00 0.000011 0 1136 close 0.00 0.000000 0 116 mprotect 0.00 0.000000 0 2272 fcntl 0.00 0.000000 0 1136 getuid 0.00 0.000000 0 1136 getppid 0.00 0.000000 0 1136 gettid ------ ----------- ----------- --------- --------- ---------------- 100.00 2.873050 570459 1404 total
Process slapd - thread: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 50.67 1.128008 399 2828 213 futex 48.96 1.089974 1161 939 fdatasync 0.15 0.003311 0 226607 writev 0.13 0.002928 3 939 pwrite 0.07 0.001544 0 226607 lseek 0.01 0.000214 0 1879 write 0.01 0.000139 0 1879 sendto 0.00 0.000065 0 940 open 0.00 0.000046 0 3760 940 read 0.00 0.000029 0 94 mprotect 0.00 0.000021 0 940 close 0.00 0.000021 0 940 getppid 0.00 0.000019 0 940 getuid 0.00 0.000015 0 940 epoll_ctl 0.00 0.000014 0 940 stat 0.00 0.000000 0 1880 fcntl 0.00 0.000000 0 940 gettid ------ ----------- ----------- --------- --------- ---------------- 100.00 2.226348 473992 1153 total
Process slapd - thread: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- -nan 0.000000 0 1386 read -nan 0.000000 0 13861 sendto -nan 0.000000 0 3866 294 futex -nan 0.000000 0 2772 epoll_wait -nan 0.000000 0 1386 epoll_ctl ------ ----------- ----------- --------- --------- ---------------- 100.00 0.000000 23271 294 total
Process ldapadd: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 99.19 0.056533 18 3194 poll 0.48 0.000276 0 4866 read 0.32 0.000183 0 6846 write 0.00 0.000000 0 1 restart_syscall ------ ----------- ----------- --------- --------- ---------------- 100.00 0.056992 14907 total
--bcaec54eef8cfe673204d9b5eb1e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: base64
PGRpdiBkaXI9Imx0ciI+PGJyPjxkaXYgY2xhc3M9ImdtYWlsX2V4dHJhIj48ZGl2IGNsYXNzPSJn bWFpbF9xdW90ZSI+PGJsb2NrcXVvdGUgY2xhc3M9ImdtYWlsX3F1b3RlIiBzdHlsZT0ibWFyZ2lu OjBweCAwcHggMHB4IDAuOGV4O2JvcmRlci1sZWZ0OjFweCBzb2xpZCByZ2IoMjA0LDIwNCwyMDQp O3BhZGRpbmctbGVmdDoxZXgiPjxkaXYgY2xhc3M9ImltIj48L2Rpdj48ZGl2IGNsYXNzPSJpbSI+ DQoNClNvIHdoYXQgaXMgaG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