New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS >5 SC_OPEN_MAX default triggers huge subprocess slowdown #362

Closed
dw opened this Issue Sep 11, 2018 · 3 comments

Comments

Projects
None yet
1 participant
@dw
Owner

dw commented Sep 11, 2018

issue_140__thread_pileup.yml slow on Ubuntu 14.04

After several iterations, run under a GCE n1-standard-2 equivalent KVM instance (7.5GB, 2 vCPU) with Ubuntu 14.04, the "copy" module invocation slows to a crawl, taking 600ms per run, because _atomic_move calls selinux_enabled which runs a subprocess, and subprocess.Popen(..., close_fds=True) is trying to close 524,288 FDs. That suggests _SC_OPEN_MAX is returning an insanely high number, but the machine config is completely default.

Perhaps something is calling setrlimit somewhere



@dw dw added bug ansible labels Sep 11, 2018

@dw

This comment has been minimized.

Owner

dw commented Sep 11, 2018

_atomic_move only runs a subprocess if the destination path does not already exist, which explains why this always shows up on Travis

@dw

This comment has been minimized.

Owner

dw commented Sep 11, 2018

It's something to do with the CentOS docker test images, they both come up with:

security]$ ulimit -n
1048576

Nothing in /etc/security/imits, suggesting their pam_limits is patched

@dw

This comment has been minimized.

dw added a commit that referenced this issue Sep 11, 2018

dw added a commit that referenced this issue Sep 11, 2018

dw added a commit that referenced this issue Sep 11, 2018

@dw dw changed the title from issue_140__thread_pileup.yml slow on Ubuntu 14.04 to CentOS >5 SC_OPEN_MAX default triggers huge subprocess slowdown Sep 11, 2018

dw added a commit that referenced this issue Sep 11, 2018

dw added a commit that referenced this issue Sep 11, 2018

dw added a commit that referenced this issue Sep 11, 2018

dw added a commit that referenced this issue Sep 11, 2018

@dw dw added the target:v0.2 label Sep 12, 2018

dw added a commit that referenced this issue Sep 19, 2018

dw added a commit that referenced this issue Sep 19, 2018

dw added a commit that referenced this issue Sep 19, 2018

dw added a commit that referenced this issue Oct 2, 2018

dw added a commit that referenced this issue Oct 2, 2018

@dw dw closed this in 9fadd22 Oct 2, 2018

dw added a commit that referenced this issue Dec 8, 2018

issue #435, #362: ansible: avoid touching setrlimit() on target.
This replaces the previous method for capping poorly Popen()
performance, instead entirely monkey-patching the problem function
rather than simply working around it.

dw added a commit that referenced this issue Dec 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment