Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highstate from salt-master is very slow unlike local salt-call #38710

Closed
dosercz opened this issue Jan 12, 2017 · 7 comments
Closed

Highstate from salt-master is very slow unlike local salt-call #38710

dosercz opened this issue Jan 12, 2017 · 7 comments
Labels
info-needed waiting for more info
Milestone

Comments

@dosercz
Copy link

dosercz commented Jan 12, 2017

I'm running state.apply from salt-master and it's very slow unlike local salt-call after upgrade to v 2016.11.1. I have there 495 states, 185 sec on salt-master but only 14 sec on salt minion. Why so big difference, where could be a problem? Any ideas? Both servers are in the same network, so there should not be a problem with slow connection.

Salt-master

Salt Version:
           Salt: 2016.11.1

Dependency Versions:
           cffi: 0.8.6
       cherrypy: Not Installed
       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.5
        machine: x86_64
        release: 3.2.0-4-amd64
         system: Linux
        version: debian 8.5

Salt-minion

Salt Version:
           Salt: 2016.11.1

Dependency Versions:
           cffi: 0.8.6
       cherrypy: Not Installed
       dateutil: 2.2
          gitdb: Not Installed
      gitpython: Not Installed
          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: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5

System Versions:
           dist: debian 8.5
        machine: x86_64
        release: 3.2.0-4-amd64
         system: Linux
        version: debian 8.5
@Ch3LL
Copy link
Contributor

Ch3LL commented Jan 12, 2017

@dosercz you might be running into this same issue: #38071
If you apply the PR in #38167 does it help with performance?

@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt severity-high 2nd top severity, seen by most users, causes major problems fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 labels Jan 12, 2017
@Ch3LL Ch3LL added this to the Approved milestone Jan 12, 2017
@dosercz
Copy link
Author

dosercz commented Jan 12, 2017

I can try it, but do you have some manual, how to apply changes in PR to installed salt? I'm not familiar with python. I have salt installed as debian package.

@bobrik
Copy link
Contributor

bobrik commented Jan 19, 2017

I think this is the same as #38758.

@Ch3LL
Copy link
Contributor

Ch3LL commented Jan 24, 2017

@dosercz yes you might be running into #38758 as @bobrik pointed out. Looks like there was a performance hit with file.managed and setting a source in 2016.11. Can you confirm that this is the state thats causing issues. If you don't call a file.managed state do you see an okay performance result?

The PR I did mention might help increase execution time. It helps improve the time it takes the master to publish a command. I would be interested to see if its the file.managed state performance hit that is causing the issue first though.

But to answer your question on how to apply the fix. Its simply a master side edit. So on the master you would just need to add that fix from teh PR. But as stated above I think you actually miht be running into that other issue. Let me know. THanks

@Ch3LL Ch3LL added info-needed waiting for more info and removed Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt severity-high 2nd top severity, seen by most users, causes major problems fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 labels Jan 24, 2017
@dosercz
Copy link
Author

dosercz commented Jan 27, 2017

We are using file.managed so much. For minions with hundreds states is the performance difference between local/remote call big. I have tested it on small set of states with/without file.managed, and it could be a same problem probably. Set with file.managed is much slower with remote call than with local call. Set without it has similar times for remote/local call.

@Ch3LL
Copy link
Contributor

Ch3LL commented Feb 9, 2017

@dosercz are you okay closing this issue and tracking it on #38758 ? Since you are using file.managed I bet when this is fixed performance will increase for you

@dosercz
Copy link
Author

dosercz commented Feb 9, 2017

ok

@Ch3LL Ch3LL closed this as completed Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed waiting for more info
Projects
None yet
Development

No branches or pull requests

3 participants