What network troubleshooters are there?

rharder

Do not read this sign.
I only get 30KB/sec throughput transfering files between my TiBook with OS X and my Win98 machine on my home 100-baseT network.

Is there any good way to test the network for collisions or errors or something that would be causing the abysmal performance. I gather that other people have had better luck with their throughput.

-Rob
 
To look at the kinds of collisions and errors (in and outbound) your X box is seeing, run 'netstat -in'. It'll look something like:

Code:
Name  Mtu   Network       Address            Ipkts Ierrs    Opkts Oerrs  Coll
lo0   16384 <Link>                           62938     0    62938     0     0
lo0   16384 127           127.0.0.1          62938     0    62938     0     0
en0   1500  <Link>      00.30.65.01.02.03  1168653     0  1389006     0     0
en0   1500  192.168.7     192.168.7.10     1168653     0  1389006     0     0

The interesting points are under Ierrs (input errors), Oerrs (output error), and Coll(isions). Also be sure to check /var/log/system.log to see if there are any complaints.
 
One of the most common problems you'll run across is the classic duplex mismatch problem. In this case one side of an Ethernet link (switch/hub or PC) is set to half-duplex, while the other side (switch/hub or PC) is set to full-duplex.

When this happens, the side that is set to full-duplex incorrectly does NOT detect collisions when they happen, and lots of packets are lost (forcing retransmissions). This can be killer on performance depending on the app, depending on whether you're using a hub with a lot of devices plugged into it, etc.

There are two ways this can happen - either manually hard-coding one side to full-duplex while hard-coding the other side to half-duplex (keep in mind that hubs ONLY support half-duplex). The other way is to set one side to full-duplex, and the other to "auto-negotiate". The side set to auto will automatically drop back to half-duplex.

If you have a cheap switch (even one built into a cable/DSL router), you may not be able to set flow control manually (meaning it's in auto-neg mode all the time), in which case you MUST set your Mac and PC to either auto or half-duplex.

This happens soooo often - double-check that you have things set up right, and I bet you'll see a big performance boost!

Ian
 
BTW -

You can also look for errors on the Win98 machine with the command "netstat -e" (netstat -i doesn't work). Unfortunately Win98 doesn't report collisions, but does give you error statistics...

One symptom of the autoneg problem is that the side that is set to full-duplex will see a lot of input errors, while the side set to half-duplex will see a lot of collisions.

Also, keep in mind that you need to verify duplex is set correctly between the Mac and the switch/hub, and between the PC and the switch/hub, NOT between the Mac and the PC! (Each one can be configured independently)

Ian
 
Hey, this is the first I've heard of this. Sounds intriguing.

I do have a hub (not a switch), and I noticed somewhere that my Mac is in full duplex mode. You're saying that's a red flag?

How do I force half-duplex on OS X?

How do I force half-duplex on Win98?

That's all I've got plugged into the hub now.

-Rob
 
Yeah, that's a Big Problem and and is probably at least a big chunk of your problem (ESPECIALLY if you have more than just the Mac and Win98 machine on the same or another, cascaded hub that might be talking at the same time).

Unfortunately I'm not sure how to do this in OS X, though I'm sure someone here would know (Though as soon as I get my Mac next Tuesday, I'll figure it out =).

With Win98, usually you can find it under the "Advanced" tab in your network adapter properties. To get there, go to "Control Panel" -> "Network" -> Double-click on your network adapter.

Usually the option is marked "Duplex" or "Line/Duplex". Even if your Win98 box is set to "Auto", you probably want to force it to Half Duplex (or 100/Half) just to be sure. Some cards (especially early 100mbps cards) don't autonegotiate well, and may default to full duplex (which again would cause you problems)

If the utility isn't there, you may have to get the utility disk from the card's manufacturer (some 3Com and Intel cards, for example, require you to run a seperate utility to set duplex)
 
I changed my Win98 machine to "100 half," and now I'm getting one MB/sec throughput. That's an improvement, but shouldn't it be better?

Has anyone discovered how to change the duplex mode under OS X? Or even determine which duplex mode it's currently in?

-Robert
 
Running,

ifconfig en0

should show the current setting for speed and duplex, but ifconfig doesn't yet appear to support actually changing it, unless Apple's put it into another command.
 
testuser, good question. I use a number of tools including a Network Statistics dockling and Granet - both can be found on www.versiontracker.com - as well as Win98's System Monitor. I'm not sure if they report raw byte throughput or actual meaninful-data throughput. That is, I don't know if they count all the IP header information and such in their numbers.

In any event, 10% of the theoretical maximum on a 100Mbs network is disappointing to me. Like testuser said, "Is that expected?"

-Rob
 
testuser: Your test is perfectly valid for looking for a rough estimate for throughput. It's a little unscientific, but hey, it works.

If you're using CIFS (Windows networking), NFS, Appletalk, FTP, etc. to transfer files across a network, then you're talking between 10-25% overhead, and 90-75% "real data". That means that at the very least you should be seeing 75Mbps (~9.375MBps).

Why are you seeing low numbers? Believe it or not, CIFS and NFS take up a lot of CPU overhead, especially when using 3rd party utils like Dave, MacNFS, etc. You may want to make sure that your CPU isn't hitting 100% when transferring (though 1.7MBps is REALLY slow!)

I'd also say that there's a pretty good bet that you are experiencing the duplex mismatch problem I was talking about earlier (even with the crossover cable hooked up). I'd estimate that <b>95%</b> of all ethernet performance problems stem from this basic problem.

Incompatibilities: Yes, it's possible that there are slight protocol differences between the prog you're running on 9.2 and on OS X. This is pretty unlikely, though, and implies that the implementation on one (or both) of the two machines is buggy or broken. Do you know what protocol you're using to copy files with (i.e. AppleTalk, CIFS, etc)? I don't know what OS 9 and X use by default.

Ian :D
 
Back
Top