Slow Linux 2.2.x Telnet?
RelliK asks:
"I have a small LAN at home, 4 workstations and a gateway
sharing a cable modem. My workstation is running SuSE
6.1 and the gateway is running Debian 2.1. Both machines
are using the 2.2.9 kernel. The problem is that telnet and
rlogin from my workstation to the gateway is slow to the
point of being absolutely unusable. It takes several seconds
for a character to appear on the sccreen after I type it.
FTP is also jerky: It transfers files fast, but it appears
as though it's constanly "hitting speed bumps", so to speak,
especially when it's about 95% done. I've tried everything
I could think of to fix the problem, but no luck. I'd
*greatly* appreciate it if any of you could help me."
Now this just sounds downright strange. Does anyone have
any ideas as to what's causing this? Click below for more.
Rellik gives more details on his problem:
"I know it is not a network problem. Telnet from other machines to the gateway works fine. It is not a problem with my hardware either. When I telnet from windows it works fine. Also, if I boot the gateway with kernel 2.0.36, it works fine. So it appears as though the two boxes have problems talking to each other when both are running 2.2.x (doesn't seem to matter which since I tried it with 2.2.5 before). Also, if I telnet from my workstation to the outside, bypassing the gateway, it works fine. It also works if I telnet from the gateway to my workstation. And here is the weirdest thing: if I run tcpdump or iptraf while I'm telnet'ing it works fast!! But as soon as I stop them it starts crawling again...
Rellik gives more details on his problem:
"I know it is not a network problem. Telnet from other machines to the gateway works fine. It is not a problem with my hardware either. When I telnet from windows it works fine. Also, if I boot the gateway with kernel 2.0.36, it works fine. So it appears as though the two boxes have problems talking to each other when both are running 2.2.x (doesn't seem to matter which since I tried it with 2.2.5 before). Also, if I telnet from my workstation to the outside, bypassing the gateway, it works fine. It also works if I telnet from the gateway to my workstation. And here is the weirdest thing: if I run tcpdump or iptraf while I'm telnet'ing it works fast!! But as soon as I stop them it starts crawling again...
Detailed specs:
My workstation:
Cyrix 6x86PR-200
64 Mb SDRAM
Asus TX97e motherboard
6 gig hd
ATI 3d Pro Turbo video card
PCI ne2000 compatible network card (RealTek chip)
SuSE 6.1 / kernel 2.2.9
The gateway:
AMD 486dx4-100
32 Mb RAM
1.2 gig HD
Trident 1Mb PCI video card
2x PCI ne2000 compatible network cards (RealTek chip)
network: coax ethernet
Thanks for any help in advance!"
NE2000 cards barely qualify as ethernet cards, you should avoid them. Even the PCI ones... Get another card, say a 3Com or SMC, and you'll get decent hardware with decent drivers.
What does 'ifconfig' tell you about these interfaces? any errors? there are lots of stats to take a look at. Also, try disabling the 2nd NIC on your gateway and see if that helps.
Usually if it takes a long time to get a prompt, it cannot reverse the domain you put in. Make sure it can find itself forward and reverse and it will work fine.
I've used pgcc from 1.1 to 1.1.1 and 1.1.2 (egcs versions, dunno what the pgcc ones were...) and I've never had a problem. I thought the problems were mostly exhibited in the 2.1.x tree and solved with the latest 2.2.x builds starting from 2.2.5?
No wonder.... -O6 has is as optimized as you can get... well... not fully, but close. Anyway, -O2 and -O3 work for me.. anything higher bombs out.
I doubt -O6 works reliably with gcc 2.7.2.3
No wonder.... -O6 has is as optimized as you can get... well... not fully, but close. Anyway, -O2 and -O3 work for me.. anything higher bombs out.
I doubt -O6 works reliably with gcc 2.7.2.3
Two things... I find this confusing:
On the other hand, -O6 (which is equivalent to -O3 in gcc 2.7.2.3), works fine with gcc 2.7.2.3.
And just wondering, what C compiler is Redhat 6 shipping these days? I did a base install, about 20-30 megs and installed a binary egcs 1.1.1, used it to bootstrap pgcc 1.1.3 (or was it 1.1.2?) and then removed the binary egcs 1.1.1, and I've never had any trouble since... I'll try out gcc 2.7.2.3 though, since I've had a similar problem where I couldn't telnet into the local interface when the remote one was down... It would take a really long time.... or never.
Well, my friend had the same problem (although that was on Windows 98 boxen.. ugh), and he said changing the MSS fixed the problem completely. *shrug* :o)
Try "route add default gw mss 1460 dev eth0" (I think that's the syntax
I've got no qualms against NE2k cards (okeys
so it's a little high on CPU load, but still it's
usually quite negligable unless you're serving up
lots of pages). On the other hand, it does
well for its price range (incl. PCI NE2k).
But for serious networking performance, I'd go
for the "tulip" chipsets (DEC..erm.. I mean Intel
DC21143 based NICs). They're even rated by
Donald Becker as probably the most efficient
of the 10/100 Fast Ethernet cards (I use an Alloy 1430TX - 21143PD chipset - tulip 0.91 driver)
I'm not sure which gcc version you are using, but using egcs or pgcc on 2.x kernels gives me big trouble with networking code (like only replying to the first ping it gets from any machine...).
/usr/lib and find it there)
gcc 2.7.2.3 usually works much better. Try adding -V2.7.2.3 to CFLAGS, and probably a -b flag to (on my Slack 3.4 box it's -bi486-unknown-linux-gnulibc1, check your
/* Steinar */
(This comment is of course GPLed.)
I've had a similar problem with a computer running a 2.2.9 kernel. While doing a redhat 6.0 installation over ftp on a 10bT network, the server all of a sudden decided to slow down to the point that it was almost not responding. I couldn't even telnet into it. If you pinged it, the response time would be in the >2000 ms range. It has a 3com 3c905 card in it, while the receiving computer had a 3com 3c905B.
Ifconfiging the server up and down didn't seem to do anything, but as soon as I removed and inserted the ethernet card's module, it started working happily again. I still to this day have not figured the problem out, but I know for a fact, that when that machine was running 2.0.36, it never had a problem like that. It seems to me to be a kernel issue, but I have not been able to reproduce it again.
I have seen about 3 other people post comments to slashdot having the same problem. Hopefully this can get fixed quickly.
I'm currently running 2.2.10 with the latest development 3c59x driver without any problems.
Hmm, about the tcpdump and iptraf, they both are probably putting the card in promiscious mode, you can set this mode manually by typing as root
/sbin/ifconfig eth0 promisc
this may give you a temporary fix.
if you can't observe it with normal tcpdump, try
keeping it out of promiscuous mode to observe the problem.
ifconfig eth0 -promisc; tcpdump -np
unfortunately, packets have to get a little ways
through the kernel before tcpdump can grab them.
also, you might look at netstat -nt to see if
the bytes are being queued... I'm not sure what
that stuff really means, but when I have network
woes, queueing usually pops up there.
I have had a similar problem, but I haven't been
able to track it down; it seems to only afflict
my laptop with whole second (often up to 15
second) ping delays. If, when you run ping between
these hosts, you see latencies that are really
close to whole seconds, we might have an epidemic
here.
I have heard that the current Linux kernel (2.2) mainly the ppp code experiences slowdowns.
Only 'flamers' flame!
A while back, after first installing RH6 on my gateway (3c509), it began acting suspicious. Any traffic between my desktop (3c905TX, Win98, ugh), and the gateway would slow down to a crawl, then eventually drop packets. Bringing the interfaces down and up would fix it, but 5 mins later, it would slow back down again. I had a continuous ping -t running from my desktop to the gateway, and I noticed that it started slowing down when I started downloading/browsing from the 'net. If the line was idle, everything was fine.
After the swearing, and about a day, the problem completely disappeared. The only thing I can think of that would have fixed it was that I rebooted...