salt: File states seem slower in 2016.3, especially on first cache retrieval
I upgraded to 2016.3 in my VMs and file states seem significantly slower on the first pass (10-20 times slower). However, on subsequent state.apply calls, things seem fine again.
For every file that the minion has to fetch from the master, I see about 30-40 occurances of these log lines in the minion log:
2016-05-27 12:52:34,313 [ DEBUG] [17955] [salt.transport.zeromq] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'orch.test.infra.vagrant.local', 'tcp://10.0.1.99:4506', 'aes')
2016-05-27 12:52:34,313 [ DEBUG] [17955] [salt.crypt] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'orch.test.infra.vagrant.local', 'tcp://10.0.1.99:4506')
2016-05-27 12:52:34,319 [ DEBUG] [17955] [salt.crypt] Re-using SAuth for ('/etc/salt/pki/minion', 'orch.test.infra.vagrant.local', 'tcp://10.0.1.99:4506')
Followed by:
2016-05-27 12:52:35,930 [ DEBUG] [17955] [salt.fileclient] In saltenv 'base', looking at rel_path '|salt/minion/configs/master.conf' to resolve 'salt://|salt/minion/configs/master.conf'
2016-05-27 12:52:35,933 [ DEBUG] [17955] [salt.fileclient] In saltenv 'base', ** considering ** path '/var/cache/salt/minion/files/base/|salt/minion/configs/master.conf' to resolve 'salt://|salt/minion/configs/master.conf'
2016-05-27 12:52:35,933 [ DEBUG] [17955] [salt.fileclient] Fetching file from saltenv 'base', ** attempting ** 'salt://|salt/minion/configs/master.conf'
2016-05-27 12:52:35,933 [ DEBUG] [17955] [salt.fileclient] No dest file found
Then some more of the zeromq-related log lines, then this:
2016-05-27 12:52:37,632 [ INFO] [17955] [salt.fileclient] Fetching file from saltenv 'base', ** done ** '|salt/minion/configs/master.conf'
2016-05-27 12:52:37,633 [ DEBUG] [17955] [salt.utils.jinja] Jinja search path: '['/var/cache/salt/minion/files/base']'
I had a look at logs from before the upgrade and there were nowhere near the same amounts of log lines regarding re-auth.
vagrant@orch:~$ salt-call --versions
Salt Version:
Salt: 2016.3.0
Dependency Versions:
cffi: 0.8.6
cherrypy: 3.2.3
dateutil: 2.2
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
Jinja2: 2.7.3
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.2
mysql-python: 1.2.3
pycparser: 2.10
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.9 (default, Mar 1 2015, 12:57:24)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 14.4.0
RAET: Not Installed
smmap: 0.8.2
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: debian 8.4
machine: x86_64
release: 3.16.0-4-amd64
system: Linux
version: debian 8.4
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 19 (17 by maintainers)
oohh, i see! as this ticket was marked as fixed, closed and then the 2016.3.1 was released, we all assume this version had the fix.
I tested with 2016.3.1 and applied the fix patch…and it worked! Still seems slower than 2015.8, but now is a lot faster than it was without the fix.
Thanks, i will wait for the 2016.3.2 release
Just upgraded again to 2016.3.1 and still takes a long time to process…
the salt-minion keeps using 100% of the CPU until it finishes the highstate.
salt-minion -l garbage i get this log showing always a AsyncZeroMQReqChannel and each 1~2 seconds i finally get a normal state being applied:
Doing a strace -enetwork -f shows in the loop this:
So this query is being done several times per second and with the encryption, it eats all the CPU of the machine
Fixed by #33896
Looks like I have the same problem.
salt.fileclientis super slow. Some examples for the log:It took ~4 seconds to copy a file with 2891 bytes!!