processutils.execute is 10 times slower than clean subprocess.run
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.concurrency |
New
|
Undecided
|
Unassigned |
Bug Description
There is a bug discovered by me in eventlet with incorrect PIPE_BUF size assignment: https:/
Due to wide usage of eventlet around Openstack, this issue affects many Openstack components and flows, especially when significant amount of data should be sent/received via Popen.
While issue in eventlet is still orphan, I suggest the following w/a to speed up I/O processes up to 10 times (also attached).
Index: oslo_concurrenc
IDEA additional info:
Subsystem: com.intellij.
<+>UTF-8
=======
diff --git a/oslo_
--- a/oslo_
+++ b/oslo_
@@ -53,6 +53,16 @@
else:
from eventlet.green import subprocess
+ # NOTE(dvkolvakh): during monkey_patch 'eventlet' doesn't care about
+ # constants in built-in 'select' module, that's why 'subprocess'
+ # falls back to default 512 bytes for IO buffer trying to lookup
+ # for non-existing constant in 'eventlet.
+ # see https:/
+ # By default, linux systems has PIPE_BUF = 4096 in 'select' module,
+ # so rely on constant definition in original 'subprocess' module
+ # to speed-up IO operations.
+ subprocess_orig = eventlet.
+ subprocess.
from eventlet import tpool