RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1440769 - autofs is facing scalability issues
Summary: autofs is facing scalability issues
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: autofs
Version: 7.3
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: ---
Assignee: Ian Kent
QA Contact: xiaoli feng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-10 12:48 UTC by Marco Benatto
Modified: 2020-09-10 10:26 UTC (History)
5 users (show)

Fixed In Version: autofs-5.0.7-65.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 12:43:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
RHEL7.3's autofs backported patch (12.82 KB, patch)
2017-04-10 12:48 UTC, Marco Benatto
no flags Details | Diff
Patch - improve scalability of direct mount path component (4.95 KB, patch)
2017-04-17 00:53 UTC, Ian Kent
no flags Details | Diff
Program to create a large autofs direct mount map (1.22 KB, text/plain)
2017-04-18 01:07 UTC, Ian Kent
no flags Details
autofs daemon coredump (9.63 MB, application/x-gzip)
2017-05-09 13:38 UTC, Marco Benatto
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2213 0 normal SHIPPED_LIVE autofs bug fix and enhancement update 2017-08-01 16:09:35 UTC

Description Marco Benatto 2017-04-10 12:48:21 UTC
Created attachment 1270487 [details]
RHEL7.3's autofs backported patch

Description of problem (from SFDC case):
"autofs service takes extremely long time since its creating the directory hierarchy for all direct mounts maps. We have quite a good number of direct maps ( approx 20k ) coming from LDAP and autofs fails when we restart autofs or system rebooted.  In /usr/lib/systemd/system/autofs.service changing  TimeoutSec to a higher values to  seems to work but hours to start automounter may not be a acceptable for production systems."
 
Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux 7
autofs-5.0.7-56.el7.x86_64
 
Additional info:
 
Customer is complaining about scalability issues when using autofs with large direct mappings. His environment has around 20k direct maps from LDAP and is taking a long time to complete the startup process impacting on their production.
 
Looking at upstream commits for autofs was possible to find:
 
 commit 67e7d613a4b09eeffc57ab44a7acb52027d897b2
 Author: Jeff Mahoney <jeffm>
 Date:   Thu Mar 24 09:13:50 2016 +0800
 
     autofs-5.1.1 - improve scalability of direct mount path component
 
     With direct mounts, we want to avoid creating path components on
     remote file systems unless that file system is the root file system.
 
     The check boils down to allowing the mkdir if:
     1/ If it's the root directory, or
     2/ If it's not a remote file system, or
     3/ If it's a remote file system that's the root file system
 
     We can do that without parsing the mount table and can
     improve startup time for all cases.
 
     Signed-off-by: Jeff Mahoney <jeffm>
     Signed-off-by: Ian Kent <raven>
 
which may fit this case. Checking on dist-git is possible to notice this patch wasn't being applied.
 
On last week I've backported it to rhel7.3 autofs version and built a test package which client had tested for the last four days. According to their testing the patch solved their issue.
 
I'm attaching backported patch for your review.

Thanks,
-Marco Benatto
Sr. Software Maintenance Engineer
Red Hat

Comment 8 Ian Kent 2017-04-17 00:53:38 UTC
Created attachment 1271935 [details]
Patch - improve scalability of direct mount path component

Comment 12 Ian Kent 2017-04-18 01:07:35 UTC
Created attachment 1272203 [details]
Program to create a large autofs direct mount map

I used this simple program to create an autofs direct mount
map with 30000 entries.

The mount location obviously relates to my own environment
and would need to be changed to be used within a beaker
test environment. Also the direct mount entry using the
map needs to be added to the master map.

Using this it is easy to reproduce the problem.

On limited capacity VM using autofs revision 56 automount
was only able to mount just over 4000 direct mounts before
systemd (with default settings) killed it for taking too
long.

With autofs revision 64 I was able to successfully start
autofs.

Comment 25 Marco Benatto 2017-05-09 13:38:17 UTC
Created attachment 1277371 [details]
autofs daemon coredump

Comment 58 errata-xmlrpc 2017-08-01 12:43:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2213


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