I've been testing ansible 1.4 and devel on my larger environments and I've ran myself out of memory a few times (8 gigs on the VM).
So I started watching memory consumption in various scenarios and this is what I observed:
Inventory of 1309 hosts
Forks of 500
6.5G w/ ssh_alt + CP on devel (2m33s)
5.1G w/ ssh + CP on devel (5m40s)
4.5G w/ ssh + CP on 1.2.3
4.7G w/ ssh_alt and no CP on devel (2m53s)
3.7G w/ ssh and no CP on devel (6m27s)
3.3G w/ ssh and no CP on 1.2.3 (6m32s)
Forks of 1400
7.4G w/ ssh_alt + CP on devel (3m4s)
6.2G w/ ssh_alt and no CP on devel (3m16s)
Killing off all the open ssh Control Sockets (as I have mine set to 300s persist) frees up roughly 1G of ram.
When I switched from a 1300~ inventory to a 5K+ inventory I quickly ran myself out of memory when making use of ControlPersist, and when using ControlPersist the memory consumption was a function of the number of hosts in the play, rather than the number of forks used at any one time. Each ControlPersist socket would consume roughly a meg of memory, hence killing 1300~ sockets freed up about 1G of ram.
When not using ControlPersist the memory usage scales right along with the # of forks, and is much more predictable.
Since there does not appear to be a way to limit the number of control sockets created, and the time differences between ssh_alt with CP and without CP are not egregious, I would recommend those of you with larger environments to avoid using CP when dealing with a large inventory set.
-jlk