[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: slapd's crypt usage is single threaded?
- To: Howard Chu <hyc@symas.com>
- Subject: Re: slapd's crypt usage is single threaded?
- From: Jesse Hathaway <jesse@mbuki-mvuki.org>
- Date: Fri, 16 Feb 2018 15:14:38 -0600
- Cc: openldap-devel@openldap.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mbuki-mvuki-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=sM6qHWTFcx6c6HzDRfac9dwQFI+cIaEIycSRcdwcxJU=; b=gEDAzkgIqno8kEDDxiroK4zajL8doq8Q/zWapxt0zPqIPI4sGRuIVA0rCbHcfsHb1G S8DGweMS6o4wF6yE89NgoTnEfMfI7QSz+W+1pA0YWuCCLvatNdgDBW0LfWP4e2uYZ2xY QROqQO0VuAY1SsVEakZrHkw8OPUSGoV1b5d1vyQh9irZdF/Mh5exDaCuKzYhLnFl4Dgb 6/opgcTgg2Zb2YUPkUNJeDY+8o/YebCqaXWVbNX5FqopHow34UCZsm3VEVePyDzofipz YUqmRQ+dLCRwROIgK7Jwcrpx3MZjwNy3dsaPTjplxrpZHC+tJcYqYqr2lEglGCPvI+Yh oEYw==
- In-reply-to: <228e843d-6651-2ef7-5315-5ff881f7b86b@symas.com>
- References: <CANSNSoXKrffyDEh5AYHJt+x+Zh03EFSnHtvW_d=UB+XQ3E9TzQ@mail.gmail.com> <228e843d-6651-2ef7-5315-5ff881f7b86b@symas.com>
On Fri, Feb 16, 2018 at 12:54 PM, Howard Chu <hyc@symas.com> wrote:
> Depends entirely on whether or not your libc supports crypt_r() (reentrant
> crypt). If not then yes, it has to be single-threaded because crypt() is not
> reentrant, it returns a pointer to static storage.
>
> And of course, even if you use crypt_r() it's always possible that the
> underlying cipher is itself single-threaded. We have no way to know and no
> control over that.
Thanks Chu for the followup, I made the mistake of looking at the master
source code which includes crypt_r support rather than the source code for
2.4.44 which we are presently running. It appears you added support for
crypt_r on Sep 6, 2017 with commit afa861bf22, however that commit does not
appear in any tagged version, `git tag --contains afa861bf22`
Do you have any idea when a version with this commit might be released?
I compiled master with crypt_r support and the results are much better
$ pidstat -t -p $(pgrep slapd) 5 3
<snip>
Average: UID TGID TID %usr %system %guest
%CPU CPU Command
Average: 108 15720 - 788.67 0.07 0.00
788.73 - slapd
Average: 108 - 15720 0.00 0.00 0.00
0.00 - |__slapd
Average: 108 - 15721 0.00 0.00 0.00
0.00 - |__slapd
Average: 108 - 15722 98.40 0.00 0.00
98.40 - |__slapd
Average: 108 - 19581 38.80 0.00 0.00
38.80 - |__slapd
Average: 108 - 19585 94.40 0.00 0.00
94.40 - |__slapd
Average: 108 - 19591 94.00 0.00 0.00
94.00 - |__slapd
Average: 108 - 19592 65.27 0.00 0.00
65.27 - |__slapd
Average: 108 - 19650 98.80 0.00 0.00
98.80 - |__slapd
Average: 108 - 19754 97.93 0.00 0.00
97.93 - |__slapd
Average: 108 - 2526 39.00 0.00 0.00
39.00 - |__slapd
Average: 108 - 3293 98.67 0.00 0.00
98.67 - |__slapd
Average: 108 - 4694 63.60 0.00 0.00
63.60 - |__slapd