Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mitogen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
mitogen
Commits
dec3af37
Commit
dec3af37
authored
Mar 18, 2018
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue #144: ansible: increase default pool size to 16.
parent
9cf889b8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
11 deletions
+22
-11
ansible_mitogen/process.py
ansible_mitogen/process.py
+12
-3
docs/ansible.rst
docs/ansible.rst
+10
-8
No files found.
ansible_mitogen/process.py
View file @
dec3af37
...
...
@@ -27,6 +27,7 @@
# POSSIBILITY OF SUCH DAMAGE.
from
__future__
import
absolute_import
import
logging
import
os
import
socket
import
sys
...
...
@@ -43,6 +44,9 @@ import ansible_mitogen.logging
import
ansible_mitogen.services
LOG
=
logging
.
getLogger
(
__name__
)
class
MuxProcess
(
object
):
"""
Implement a subprocess forked from the Ansible top-level, as a safe place
...
...
@@ -146,9 +150,14 @@ class MuxProcess(object):
Construct a ContextService and a thread to service requests for it
arriving from worker processes.
"""
self
.
pool
=
mitogen
.
service
.
Pool
(
self
.
router
,
[
self
.
pool
=
mitogen
.
service
.
Pool
(
router
=
self
.
router
,
services
=
[
ansible_mitogen
.
services
.
ContextService
(
self
.
router
)
])
],
size
=
int
(
os
.
environ
.
get
(
'MITOGEN_POOL_SIZE'
,
'16'
)),
)
LOG
.
debug
(
'Service pool configured: size=%d'
,
self
.
pool
.
size
)
def
on_broker_shutdown
(
self
):
"""
...
...
docs/ansible.rst
View file @
dec3af37
...
...
@@ -115,14 +115,6 @@ This is a proof of concept: issues below are exclusively due to code immaturity.
High Risk
~~~~~~~~~
* Connection establishment is single-threaded until more pressing issues are
solved. To evaluate performance, target only one host. Many hosts still work,
the first playbook step will simply run unnecessarily slowly.
* `Asynchronous Actions And Polling
<https://docs.ansible.com/ansible/latest/playbooks_async.html>`_ has received
minimal testing.
* For now only **built-in Python command modules work**, however almost all
modules shipped with Ansible are Python-based.
...
...
@@ -133,6 +125,10 @@ High Risk
file, the host machine could easily exhaust available RAM. This will be fixed
soon as it's likely to be tickled by common playbook use cases.
* `Asynchronous Actions And Polling
<https://docs.ansible.com/ansible/latest/playbooks_async.html>`_ has received
minimal testing.
* Only Ansible 2.4 is being used for development, with occasional tests under
2.3 and 2.2. It should be more than possible to fully support at least 2.3,
if not also 2.2.
...
...
@@ -172,6 +168,12 @@ Low Risk
Behavioural Differences
-----------------------
* Ansible permits up to ``forks`` SSH connections to be setup simultaneously,
whereas in Mitogen this is handled by a thread pool. Eventually this pool
will become per-CPU, but meanwhile, a maximum of 16 SSH connections may be
established simultaneously by default. This can be increased or decreased
setting the ``MITOGEN_POOL_SIZE`` environment variable.
* Mitogen treats connection timeouts for the SSH and become steps of a task
invocation separately, meaning that in some circumstances the configured
timeout may appear to be doubled. This is since Mitogen internally treats the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment