Bug 2234460

Summary: Slow ssh connection when using password authentication due to a large amount of "close" syscall
Product: Red Hat Enterprise Linux 9 Reporter: Nicolas Bourgeois <nbourgeo>
Component: pamAssignee: Iker Pedrosa <ipedrosa>
Status: CLOSED MIGRATED QA Contact: sssd-qe
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: cbesson, pbrezina
Target Milestone: rcKeywords: MigratedToJIRA, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-19 14:04:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nicolas Bourgeois 2023-08-24 13:55:03 UTC
Description of problem:
Connecting via ssh to a server with a password is longer with RHEL 9 compared to RHEL 8



IT seemed to be resolved in RHEL 8 with the patch pam-1.3.1-fds-closing.patch (RHBZ1737812), but the fix has been reverted upstream and is not part of the code anymore.

Version-Release number of selected component (if applicable):
9.0, 9.1 and 9.2

How reproducible:
Connect using a password authentication


Actual results:
With RHEL 9, sshd spends 25% of its time running the close syscall :
	RHEL 9 :
		% time     seconds  usecs/call     calls    errors syscall
		------ ----------- ----------- --------- --------- ----------------
		 71.81    1.680497       35755        47        21 wait4
		 25.48    0.596416           4    131894    131057 close
		  0.48    0.011248          11       979       335 openat
		  0.31    0.007196         359        20           execve
		...

	RHEL 8 :
		% time     seconds  usecs/call     calls    errors syscall
		------ ----------- ----------- --------- --------- ----------------
		 81.89    0.099364        1505        66        31 wait4
		  2.64    0.003209           4       773       208 openat
		  2.53    0.003064         139        22           execve
		  2.26    0.002739          80        34           clone
		  1.21    0.001467          27        53           socket
		  1.09    0.001328          16        80         3 write
		  1.04    0.001260           2       493         2 read
		  0.90    0.001094           2       495           mmap

Is it possible to recreate a patch to correct this behavior?

Comment 5 RHEL Program Management 2023-09-19 14:01:54 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 6 RHEL Program Management 2023-09-19 14:04:49 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.