[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speed concerns


On Monday 15 August 2011 12:48:45 you wrote:
> Sorry for the newbie question here -- I'm experimenting with libssh, and I
> was surprised at how slow it is to run a remote command. I've tried testing
> a quick prototype on a couple servers, and it has a ~1 second overhead to
> just run an "ls" command.

Which version are you running?

http://www.catb.org/~esr/faqs/smart-questions.html#beprecise

> More specifically: after I have opened a channel and issued a command
> with ssh_channel_request_exec, the *first* call to ssh_channel_read takes ~1
> second to return. Subsequent calls to ssh_channel_read - when the command
> has a large output - are quick.

Against which ssh server have you run this command?
 
> Is this a common problem - and are there any workarounds? I was going to
> implement a remote file browser, but this is way too slow. I was expecting
> subsequent commands to be ~instantaneous, like they are in an ssh
> terminal. Is libssh necessarily slower than an ssh terminal, or am I doing
> something wrong?

I don't see a problem here (libssh git master tree). I've compared it with 
openssh 'ssh' commandline client.

Why don't you simply use sftp for file browsing?

> 
> Thanks for your help,
> Brett

	-- andreas

-- 
Andreas Schneider                   GPG-ID: F33E3FC6
www.cryptomilk.org                asn@xxxxxxxxxxxxxx


References:
Speed concernsBrett Thomas <brettpthomas@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org