Salt SSH performance problems (extremely slow)

523 views
Skip to first unread message

Paul Walsh

unread,
Jan 16, 2016, 3:45:48 PM1/16/16
to Salt-users
 I've just setup salt-ssh for the first time and find it is extremely slow. 

time salt-ssh "*" test.ping
host1
:
   
True
host2
:
   
True


real
0m57.232s
user
0m1.587s
sys
0m0.923s

Compared to a normal ssh connection to either host taking around 3 seconds.

I'm on OS X in a brand new virtual environment with the latest salt-ssh from pypi. 

I have the following Saltfile:

salt-ssh:
    config_dir
: etc/salt
    log_file
: logs/salt
    max_procs
: 30
    wipe_ssh
: True

Any ideas why this is so slow?

Sergey Kandyla

unread,
Jan 17, 2016, 1:11:25 AM1/17/16
to salt-...@googlegroups.com
Salt is much more then 'normal ssh connection'.
Personally I don't see any issues there. Communication between services
always add some overhead.
Also, you can try launch your commands with -l debug option for more
details.
> --
> You received this message because you are subscribed to the Google
> Groups "Salt-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to salt-users+...@googlegroups.com
> <mailto:salt-users+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Paul Walsh

unread,
Jan 17, 2016, 1:14:57 AM1/17/16
to salt-...@googlegroups.com
Hi,

Sure it is more than a ’normal ssh connection’. 1 minute for a ping still seems…. slow? If other salt-ssh users confirm this is expected behaviour, then, ok.
> You received this message because you are subscribed to a topic in the Google Groups "Salt-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/salt-users/5hVfKH5-13g/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to salt-users+...@googlegroups.com.

Sergey Kandyla

unread,
Jan 17, 2016, 1:24:14 AM1/17/16
to salt-...@googlegroups.com
ops, sorry.
I've incorrectly read the time output, thinking about some seconds.

Expected behavior is about 5 sec for remote ssh host (when launching
salt-ssh .. test.ping).

I would add the debug log, and see on any dns resolving options for both
client and server hosts.

Because seems ssh also works wrong for you.
Expected time is about 1-2 sec for remote ssh host, when you launch
something like
time ssh remote.host.com 'uname'

Sergey Kandyla

unread,
Jan 17, 2016, 1:29:47 AM1/17/16
to salt-...@googlegroups.com
>>>> Compared to a normal ssh connection to either host taking around 3
>>>> seconds.

Oh, It seems to be not a my day...)
so, all is fine with your ssh, while salt-ssh is really slow.

Paul Walsh

unread,
Jan 17, 2016, 1:29:51 AM1/17/16
to salt-...@googlegroups.com
Hi,

No, ssh works fine for me. Here is a representative sample to connection to one of many remote servers on a range of providers (Linode, Digital Ocean, AWS, Google Cloud):

time ssh remote.host ‘name'

real 0m1.157s
user 0m0.010s
sys 0m0.005s


Although I can say that now (new day :)) salt-ssh is closer to acceptable for no obvious reason. 

For the same host as the sample above:

time salt-ssh remote.host test.ping 

real 0m11.370s
user 0m0.617s
sys 0m0.399s

Best,

Paul

On 17 Jan 2016, at 8:24 AM, Sergey Kandyla <skan...@gmail.com> wrote:

time ssh remote.host.com 'uname'

Sergey Maranchuk

unread,
Jan 17, 2016, 3:18:48 AM1/17/16
to Salt-users
try remove `wipe_ssh: True` from config

Paul Walsh

unread,
Jan 17, 2016, 4:24:27 AM1/17/16
to salt-...@googlegroups.com
No performance difference.

On 17 Jan 2016, at 10:18 AM, Sergey Maranchuk <slav...@gmail.com> wrote:

try remove `wipe_ssh: True` from config

Sergey Maranchuk

unread,
Jan 17, 2016, 4:32:17 AM1/17/16
to Salt-users
 recheck twice ;)

with wipe_ssh: True salt transfer tar archive with salt-call/etc every time and it's really slow (5-7sec vs 2 )


Paul Walsh

unread,
Jan 17, 2016, 4:34:19 AM1/17/16
to salt-...@googlegroups.com
Hi,

Ah, you are right: on subsequent calls it is now down to ~3 seconds. Thanks!

On 17 Jan 2016, at 11:32 AM, Sergey Maranchuk <slav...@gmail.com> wrote:

 recheck twice ;)

with wipe_ssh: True salt transfer tar archive with salt-call/etc every time and it's really slow (5-7sec vs 2 )



Reply all
Reply to author
Forward
0 new messages