Bug 1546194 - RHEL7 curl performs poorly versus upstream [NEEDINFO]
Summary: RHEL7 curl performs poorly versus upstream
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nss-softokn
Version: 7.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: nss-nspr-maint
QA Contact: BaseOS QE Security Team
Depends On:
Blocks: 1477664
TreeView+ depends on / blocked
Reported: 2018-02-16 14:51 UTC by Matt
Modified: 2018-03-13 11:14 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-03-07 10:46:15 UTC
Target Upstream Version:
kengert: needinfo? (mmezynsk)

Attachments (Terms of Use)
server sosreport (12.37 MB, application/x-xz)
2018-02-16 14:51 UTC, Matt
no flags Details
curl output showing nss involvement (661.28 KB, text/plain)
2018-02-16 14:51 UTC, Matt
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1044666 None CLOSED Can curl HTTPS requests make fewer access system calls? 2019-10-09 23:26:45 UTC

Internal Links: 1044666

Description Matt 2018-02-16 14:51:10 UTC
Created attachment 1397055 [details]
server sosreport

Description of problem:
RHEL 7 curl packages perform more slowly due to differing calls made than an upstream package version compiled against openssl libraries.

Version-Release number of selected component (if applicable):

How reproducible:
Any time the RHEL curl package is used.

Steps to Reproduce:
1.  Install RHEL curl
2.  Install upstream curl
3.  Compare the calls made, and the time differences between the two packages returning.

Actual results:
RHEL curl not as highly performing as the custom compiled upstream version

Expected results:
RHEL curl to be as highly performing as the custom compiled upstream version

Additional info:
Business justification - Its is impacting our customers and the response times have increased. Ideally we want the libcurl shipped with RHEL to work optimally and i dont want to replace the system provided one with upstream one, as you know that poses lot of changes in managing servers that way in the long run. 

Back to the issue, i ran few traces to see why the open source upstream is performing better. I see that RHEL shipped one is compiled against the NSS ssl libraries vs the open source i compiled against openssl libs. The additional time taken seems to be taken during NSS initialization or establishing connection phase. I am posting the traces here, let me know if you can make anything out of this and help me understand if there is an option to fix this using RHEL shipped curl.

Customer believes they have discovered the bug noted here from RHEL 6 in the RHEL 7 version of curl:


sosreport and strace to be attached

Comment 2 Matt 2018-02-16 14:51:52 UTC
Created attachment 1397056 [details]
curl output showing nss involvement

Comment 3 Kamil Dudka 2018-02-16 16:45:35 UTC
Could you please try to export NSS_SDB_USE_CACHE=no and check whether it improves the performance in your testing scenario?

Comment 4 Matt 2018-02-16 19:16:07 UTC

The customer has seen improvements in the following ways:

   I have seen setting it to yes or no and saw improvements in both cases.

They had been interested in NSS_SDB_USE_CACHE=yes in the case and I had them try it, but they did not report the change in performance until today.



Comment 5 Kamil Dudka 2018-02-16 19:45:07 UTC
Thanks for confirmation!  Reassigning to nss-softokn then...

Comment 6 Kai Engert (:kaie) (inactive account) 2018-03-05 13:14:39 UTC
Hello Kamil, what is your conclusion based on that experiment?

Note You need to log in before you can comment on or make changes to this bug.