matrix-docker-ansible-deploy icon indicating copy to clipboard operation
matrix-docker-ansible-deploy copied to clipboard

perf(ansible): add ControlPersist for SSH connection reuse

Open gardar opened this issue 6 months ago • 3 comments

Should speed up playbook execution significantly for most users. While pipelining is already enabled and reduces per-task work inside each SSH session, ControlPersist reduces the cost of establishing SSH sessions by reusing the master connection.

gardar avatar May 13 '25 15:05 gardar

Not sure if there's anything special in my environment (not that I know of), but doing this doesn't seem to have any impact.

time just run-tags install-all shows about ~300 seconds for a remote server I manage.

spantaleev avatar May 14 '25 07:05 spantaleev

Perhaps you already have controlpersist in your ssh config?

gardar avatar May 16 '25 11:05 gardar

the impact depends on how fast you establish a connection from your device (like laptop) to a server. With a fast internet connection and low ping to the server, you may not see any difference. So, while having that option enabled by default is a good idea, you won't notice any changes with proper internet connection and server location

aine-etke avatar May 16 '25 13:05 aine-etke