You are not logged in.

#1 2005-02-09 15:02:17

paulicat
Member
Registered: 2005-02-09
Posts: 40

Extremely slow ssh

Hello Everyone,

I've just starting using Arch, switched over from Slackware, and I've got everything going well with two major problems (that are probably related), ssh'ing into my box is INCREDIBLY slow. And it seems to take quite a while to resolve internet names. All of which worked just fine with slackware, so I'm pretty sure its not my network thats causing the lag. I use DHCP from m router for IP and DNS.
It is to the point where ssh'ing into it from within my home network is so slow that the delay between typing can be as much as 15-20 seconds...rather unusable. And a similar delay to resolve internet names...
I'm using a wireless card (PCMCIA laptop) that has the rate set for 11 mbps.
I'm using all defaults for ssh server.
Is there anything else I should look for?
I don't have access to the box right now (Im at work) but can anyone give me a sample of what my rc.conf should look like when using DHCP?

Thanks in advance for any help offered...
Archlinux, keep up the AWESOME work!!

Offline

#2 2005-02-09 15:20:40

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: Extremely slow ssh

ps. Saying "this worked in X but it doesn't work in Y" generally does not inspire people to assist.

Now on to your problem. A little more information about your setup and configuration would likely be helpful. Here are a few things to look at, though.

1) Is your hostname setup properly? If not, then sometimes resolving it will take a little time.
2) is your network setup properly? Is  your DNS setup correctly?
3) Is your hardware i686?
4) Did you recompile your kernel recentlly?
5) Is it possible something else is happening to slow things down? Try running top or ps to see if there is just something chewing up loads of cpu cycles.

That is all I can think of off the top of my head without more info about your setup.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2005-02-09 15:31:02

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Extremely slow ssh

If it only takes long to make a connection, but it's fast when the connection is established, then it's a DNS problem. Fix: either configure the dhcp server to give correct dns addresses (or fix the dns config of the router), or manually provide a good dns address.

If it's always slow, then you either have a slow connection or, more likely, a bad network which drops packets. Or, if it isn't a network problem, then it's a software problem like a new bug in e.g. the wireless drivers, or something along that line. To find out if it's a hardware or a software problem, you can do one or more of the following:

Try your laptop on another network, so see if that helps.

Try internet with just ethernet instead of wireless.

Try a livecd, different kernels, etc. to see if that changes anything.

Try another laptop on your network to see how that one behaves.

Offline

#4 2005-02-09 17:46:38

paulicat
Member
Registered: 2005-02-09
Posts: 40

Re: Extremely slow ssh

Sorry, I should have been more clear with comparing between distros...
<edit>
  Its a P3 Dell laptop with an orinoco_cs based Microsoft card.
  I'm seeing this slowness while I'm ssh'ing from within my home network that has only two machines on it (desktop and laptop). This is my primary concern as I need remote access to the box, but since I'm having this performance problem within my home network reaching it remotely is even worse.
</edit>
  What I meant was that earlier yesterday I had slack on my box, I put arch on my box later in the evening. In between this time, nothing changed within my network, or my hardware. My slack kernel was 2.6.10 which is what my arch (default kernel, no recompile) is at.
  All network settings remained as they were in slack, i.e. router is my dhcp and it provides all network setting, and I have configured arch (to the best of my knowledge) to work with dhcp.
  The system responds beautifully (Wow is arch fast!) while I am at the machine itself, so I don't think there is anything eating cpu cycles.
However, I do have a wired connection on the box that I will test ssh behaviour with tonight.
  If I find that it is only slow while on wireless, should I report a bug? If so, to whom?
  I'm sorry for all the questions, but this is the first really strange problem I've encountered using linux that I couldn't resolve myself and I'm not sure of the procedures to follow.

Offline

#5 2005-02-09 18:38:16

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Extremely slow ssh

No, no bugreport, it's just a hint where the problem is.

For sure it's not a DNS problem, as local networking is slow too, and nothing changed.

The procedure I'd follow is more or less to pin down what exactly causes the problems, and fix that, one way or the other.

Anyone know if Slackware has IPv6 support? If not, then that may be a difference.

Offline

#6 2005-02-09 18:57:40

paulicat
Member
Registered: 2005-02-09
Posts: 40

Re: Extremely slow ssh

Slackware does have IPV6 support (I built it as a module). Having the IPV6 module loaded or not didn't affect internet/network/ssh performance either way.
I'm sorry if I'm not being clear enough, my main problem is that when I connect to the box through ssh the response is horribly slow, 15-20 delay on typing.
So, to recap, my dns is working (albeit a little slow, but thats something I can deal with/fix at a later date),  so I can make a connection, I can log in, but everything in ssh window is very delayed/slow.
I will try connecting to ssh through the wired ethernet adapter, and if that works I'll attempt compiling the kernel to my custom config and try that.
If that fails, then I would be inclined to say there is a software problem in arch somewhere? Possibly in the ssh server package?
Purely speculation as I havent tried the wired connection yet, so please don't take an offense to that statement.
I want to resolve this badly because I'm already in love with arch after using it for only four hours! And I was a DIEHARD slackware user before yesterday at 5 p.m!!
One last question, does arch use completely vanilla kernel? Cause I noticed the ARCH appended to the end of uname, so I thought maybe there was some kernel patching.

Offline

#7 2005-02-09 19:16:29

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: Extremely slow ssh

mostly vanilla. I believe arch just started using as patchsets for increased stability.

Try running ssh client with a -vvv option for excessive verbosity. See what pops out.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#8 2005-02-09 19:34:19

paulicat
Member
Registered: 2005-02-09
Posts: 40

Re: Extremely slow ssh

Thanks for the tips guys, I'll try them when I get home.
I'll post an update as soon as I find out some more information.

Offline

#9 2005-02-09 20:24:47

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Extremely slow ssh

Perhaps it may be a good idea to make clear what the problem is exactly. As it's now it seems to be slow dns and slow ssh, two independent problems, or slow internet, one big problem.

How's your ping output from one pc to the other?

Offline

#10 2005-02-09 21:30:17

paulicat
Member
Registered: 2005-02-09
Posts: 40

Re: Extremely slow ssh

To be exactly specific, I am experiencing to issues (which I think may be related)
1:) DNS is a little slow, but names do get resolved. I think my arch configuration can still be tweaked because yesterday was my first install of arch.
2:) When I connect by ssh into my machine from within my home network, the response is so slow that typing can be delayed by as much as 15-20 seconds.

ping times are < 10ms and I'm only trying this from within my home network, so that keeps the internet out of the question for now.
As a side note I tried to connect by ssh from work to home and it was much worse...25-30 delay on typing. But I expected that considering the delay I'm having within my home network.

However, downloading from the internet (or general surfing) from within arch is absolutely perfect, speed wise, besides the initial time lost in DNS mentioned above. The DNS delay is maybe 5-10 seconds for things like my ISPs mail server or surfing to a site for the first time, etc.
I'm not too concerned with this delay right now, because the names ultimately do get resolved.

I'm going to try ssh'ing through the wired cable within an hour from now, and if that proves to be really slow too, I'll compile a custom kernel.
After that...I'm not sure yet, but I'm going to get this resolved one way or another :-)
Thanks again for your suggestions, and keep 'em coming...

Offline

#11 2005-02-09 21:39:48

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: Extremely slow ssh

you know, now that you mention it, I was experiencing a similar delay.
I couldn't really put my finger on it...
I think I ended up discovering that resolution of the local machine hostname was being very slow. I did this by trying to ssh out of the server, to a known machine on campus. I used the -vvv super verbose mode, and saw it waiting for some dns thingy..

Wonder why I didn't think of it till just now. I put the hostname in /etc/hosts, and it seemed to clear it up. Still, sometimes when the internet connection goes offline (dodgy cable modem), it will take longer to ssh into the server. I figured it was doing some type of dns lookup (maybe reverse) to double check one of the ends of the connection.

*shrug* Maybe if it gets figured out here, I will know what I did/didn't do before.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#12 2005-02-10 13:29:12

paulicat
Member
Registered: 2005-02-09
Posts: 40

Re: Extremely slow ssh

Well, you know what. I tried every combination I could think of, I added it in hosts like you mentioned, but to no avail.
So I recompiled the kernel (from vanilla sources from kernel.org) with the ck -5 patchset and everything is absolutely perfect.
Sorry I didn't find out what was causing it from the stock arch kernel, but man am I a happy camper!!
Congrats to everyone involved in the development of this fantastic distro!!
Great job! big_smile

Offline

#13 2005-02-10 20:20:18

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: Extremely slow ssh

I figured out the problem, at least on my end.
My internet went down again, and I was experiencing the very same delay on first login via ssh.
My initial hunch about it being dns related, and somehow about lookups, proved correct, at least in my case.
I went through the /etc/ssh/sshd_config file, and noticed a line
UseDNS yes

I changed it to no, and the problem went away. Instant logins again.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#14 2005-02-11 02:15:37

paulicat
Member
Registered: 2005-02-09
Posts: 40

Re: Extremely slow ssh

Awesome find. Oddly enough I was experiencing some severe slowness today on my custom kernel...but I believe it was internet connection...the problem I was describing before was happening within my home network...
I'm keeping an eye on this problem so, if this happens again, I'll try the sshd_config setting you found.
Thanks for the help!!

Offline

Board footer

Powered by FluxBB