8

So this really baffles me.

Apparently because 1Gbit can transmit data in both directions simultaneously it should be possible to get 2Gbit of data transfer on a single NIC (1Gbit flow seend and 1Gbit receive). People claim that because 1Gbit is full-duplex (almost always) it is exactly 2Gbit in total. My intuition and electrical background tells me that something is not right here 4 twisted pairs 250Mbit capacity each gives 1Gbit. Unless it is really possible to transfer data in both directions simultaneously.

I did a test with iperf. Ubuntu server 12.04 <--> MacBook Pro. Both with decent CPU speed. Tested speed of connection individually and on Mac I can see 112MB/s regardless which direction data is going. On Ubuntu with vnstat and ifstat I got 970Mbit speeds. Now, launching iperf in server mode on both machines at the same time and sending data using 2 iperf clients shows that I'm for example on Ubuntu box sending at 600Mbit, and receiving 350Mbit. which adds up to pretty much 1Gbit link.

So to me there is no magical 2Gbit. Can someone confirm that or tell why I'm wrong?

Another thing that confuses me i the fact that e.g. 24-port switch has for example: Throughput»up»to:»50.6Mpps Switching»capacity:»68Gbps Switch»fabric»speed:»88Gbps

Which would suggest thay can handle 2GBit per port.

UPDATE

I did test again with iperf -s iperf -c 10.0.20.91 -d -t60

which sets window to 212KB. In last test and I got

rx: 961.41 Mbit/s 97603 p/s tx: 953.53 Mbit/s 84725 p/s

on the server NIC, so it's definitely 1GBit each way, simultaneously.

ivenhov
  • 81
  • 3
  • So many factors in each conversation. What was the switch doing at the time? Were you using jumbo frames? What kind of traffic was this? I just don't see this as being a productive question. The hardware can clearly handle 1Gbps in more than a few directions, but there are so many factors to whether each endpoint can realistically drive it. – SpacemanSpiff Nov 24 '12 at 01:49
  • Switch was doing absolutely nothing, dedicated for that test. But even if it was, GBit switch by definition has 1GBit per port (if backplane allows). MTU 1500, TCP with iperf. – ivenhov Nov 24 '12 at 01:55
  • A gigabit switch does not by definition support 1Gbit per port, just that every port can link at 1Gb. It sounds like this one does, but many budget and even managed switches share a single ASIC for 4, sometimes up to 8 ports at at time. They also have different buffer sizes per port. This is why a 24-port d-link will get absolutely destroyed by a Cisco or Juniper switch. – SpacemanSpiff Nov 24 '12 at 01:59
  • It's an Allied-Telesis 24-port stackable switch AT-8000GS/24. http://alliedtelesis.co.uk/p-1883.html – ivenhov Nov 24 '12 at 02:02
  • Take the switch out of the test, and use a crossover cable and see what you get. – SpacemanSpiff Nov 24 '12 at 02:16
  • 1
    That is a low end Switch of a Tier 3 supplier. I wonder how much capacity it really has. There is your Explanation. – TomTom Nov 24 '12 at 02:25
  • What's the point of all of this? Are you trying to solve a *problem*? – ewwhite Nov 24 '12 at 06:05
  • Yes. This is a performance problem. Iv – ivenhov Nov 24 '12 at 08:03
  • Yes. This is a performance problem. I've noticed that on heavy read on the NIC on Ubuntu box let say 750 Mbit the same Nic can send data anSpiff's tip with crossover is the first practical advice I got. Can I use regular Cat6 cable for that or does it have to be cross? – ivenhov Nov 24 '12 at 08:13
  • 1
    Which version of `iperf` did you use and what options did you pass it? Did you actually measure the amount of traffic on the network using any tool other than `iperf` at the time? – David Schwartz Nov 24 '12 at 15:40

2 Answers2

7

Duplex is a bit of a misnomer in Gigabit Ethernet as there are not separate send and receive channels like in 10Mb or 100Mb Ethernet. In the lower speeds 2 wires are used to send, and 2 to receive. The other 4 wires aren't used at all (for data anyway).

In Gigabit Ethernet all 4 pairs are used to send and receive. It uses a 2 of 5 trellis coding: For simplicity sake we'll say that each end uses 2 of 5 possible "voltages", one for "1" and the other for "0". It measures the "voltage" on the line, subtracts the "voltage" of what the near side is transmitting and thereby knows what the far end is sending.

The actual details of how this works are more complicated, but the end effect is the same. Regardless Gigabit Ethernet can transfer 2Gbps of aggregate data under ideal circumstances. "Real World" tests will frequently be slower. Also, the Ethernet frames suck down about ~10% overhead, TCP and IP suck down another ~10%; so TCP based tests will usually max out in the mid-80% range.

Your switch must have more than just 24 ports as the switching capacity is more than 48Gb (the 24 ports x 2Gb). The switch fabric is the internal switching capacity and they usually limit the advertised number to the external switching capacity.

Chris S
  • 77,337
  • 11
  • 120
  • 212
  • Interesting information. So assuming all that I should be getting let's say 800Mbit out + 800Mbit out? How can I prove/reach that? Another interesting fact is that on Windows in Windows Task Manager when you see 100% NIC utilisation and flat line on the graph when you select View->Network Adapter History, Bytes Sent, Bytes Received then yelow and red lines adds up to a green one, so 100% in total. I've never seen it flat on 200% or even 150% – ivenhov Nov 24 '12 at 10:00
  • 1
    Windows Task Manager shows the maximum of send or receive utilization; not total traffic, so it will never go higher than 100%. I can get iperf up to ~80MB bidirectional on my ~6 year old home server hardware. I don't know what chipset your MacBook has, but it's very difficult to get cheap chipsets to perform well (ie Realtek, Marvel, and some others; those named two are infamous for a wide variety of problems; even some of Intel's "workstation" chips are none too fast). – Chris S Nov 24 '12 at 12:33
0

There is nothing to baffle- instead of testing, reading would have been enough.

1Gbit is per Definition full Duplex, i.e. send and receive at same time.

TomTom
  • 50,857
  • 7
  • 52
  • 134
  • 1
    This is first thing people write. "It's full-duplex". So 100Mbit can be 200Mbit? Only because I read something it does not mean I need to believe in it. Especially if tests show something else. – ivenhov Nov 24 '12 at 01:59
  • That's not very constructive answer for someone who claims READING IS KNOWING is it? Any idea what I was doing wrong in my test? – ivenhov Nov 24 '12 at 09:49
  • No. Crappy setup, crappy equipment, crapy software. No idea. – TomTom Nov 24 '12 at 10:21