can a Gigabit switch give Gigabit connections to all ports simultaneously?

swapjim

Member
Nov 16, 2015
113
2
81
First, I'll start by saying that I understand that 1Gbit is a theoretical upper limit and various factors will limit that. The CPU (since my NICs are on-board), the cables, and so on. I have read people saying that, realistically, you get around 30MB/sec.

Ok, on with the question.

Lets say that I have 4 computers connected on the switch, all having Gigabit Ethernet cards and Cat6 cable.

Computers on ports 1 and 2 exchange data with each other and no other computer anywhere (LAN or WAN). To make things really simple, lets make it unencrypted HTTP being used to download one big file. Theoretically, I should get close to 100MB/sec.

Now, if I simultaneously do the same with computers in ports 3 and 4, should I expect to also get 100MB/sec?

My question boils down to: is Gigabit the total theoretical limit of the switch, or what can the switch deliver to each port?
 
Last edited:

sdifox

No Lifer
Sep 30, 2005
98,431
17,044
126
1 gbps per port. There is an in-switch maximum and it is usually found in the spec. The TP-Link you linked to in the other thread has a 16Gbps ceiling.
 
Feb 25, 2011
16,975
1,607
126
Most newer "dumb" (not managed or "smart", no layer 3 capabilities) 8 or 16 port switches can hurl data at full speed to all of their ports simultaneously. Or at least pretty close to it. I wouldn't worry about it.
 

smitbret

Diamond Member
Jul 27, 2006
3,382
17
81
First, I'll start by saying that I understand that 1Gbit is a theoretical upper limit and various factors will limit that. The CPU (since my NICs are on-board), the cables, and so on. I have read people saying that, realistically, you get around 30MB/sec.

Ok, on with the question.

Lets say that I have 4 computers connected on the switch, all having Gigabit Ethernet cards and Cat6 cable.

Computers on ports 1 and 2 exchange data with each other and no other computer anywhere (LAN or WAN). To make things really simple, lets make it unencrypted HTTP being used to download one big file. Theoretically, I should get close to 100MB/sec.

Now, if I simultaneously do the same with computers in ports 3 and 4, should I expect to also get 100MB/sec?

My question boils down to: is Gigabit the total theoretical limit of the switch, or what can the switch deliver to each port?

30MB/s? The people that told you to expect 30MB/s shouldn't be dispensing advice.

Unmanaged switches are pretty much a commodity. Any Gb switch of any quality will get you just about 1Gbps on all ports. My Windows PCs usually run 750-850mbps when I speed test them and that is with integrated LAN ports. I could probably get more if I added a nice Intel Gb LAN card.
 

sdifox

No Lifer
Sep 30, 2005
98,431
17,044
126

Gryz

Golden Member
Aug 28, 2010
1,551
204
106
First, I'll start by saying that I understand that 1Gbit is a theoretical upper limit and various factors will limit that. The CPU (since my NICs are on-board), the cables, and so on. I have read people saying that, realistically, you get around 30MB/sec.
To set the record straight, that is not true.

With some transmission technologies, the two endpoints of a link will test and see what the best obtainable transmission-rate is. DSL is completely built around this idea. WiFi works like this too, because moving endpoints mean that the circumstances constantly change.

Ethernet is not like this. Not at all.

If two devices with ethernet-interfaces connect, they will do a little hand-shake. And they will do "auto-discovery".
https://en.wikipedia.org/wiki/Autonegotiation
Basically auto-discovery is a short conversation:
A says: hi, I support 1 Gbps, 100 Mbps and 10 Mbps speed. What do you support ?
B then says: hi, I support 100 Mbps and 10 Mbps.
A says: ok, let's do 100 Mbps
B says: ok, we'll do 100 Mbps

And then the two devices will communicate at a bit-rate of 100 Mbps. Even when there are no packets to be transmitted, the speed stays are 100 Mbps.

This speed does not on the quality of the cable. If the cable is really bad, then maybe auto-negotiation won't even work at 1 Gbps. And only handshaking at 100 Mbps will work. And then both sides will communicate at 100 Mbps.

The speed does also not depend on the distance (like with WiFi or ADSL). There are different types of interfaces and cables for Gbps-ethernet (e.g. copper-wire or fiber). But the spec will tell you what the max distance is. If you go shorter, your speed not improve at all. It will always stay at 1Gbps or 100Mbps.
See e.g. this table for the maximum distance:
https://en.wikipedia.org/wiki/Gigabit_Ethernet#Varieties
E.g. with twister-pair cables (like Cat-5) you can go 100 meters. With fiber you can go up to 70 km.

Of course, both devices must have the "oomphf" to actually transmit and receive at those speeds. Cheap ethernet cards might not be able to send at 1 Gbps (but almost all do). Then there are different protocols or different implementations that might limit the max speed. But even then, bits are transmitted at 1 Gbps. It just might be that the sender will not send packets back-to-back. Or the receiver might drop packets at input.

It's like a road where you are allowed to drive at 100 km/hour. If you have a car that can only go 70 km/hour, then you won't reach 100 km/hour.

I hope this clears things up.
 
Last edited:

smitbret

Diamond Member
Jul 27, 2006
3,382
17
81
This is where I read it: https://blog.codinghorror.com/gigabit-ethernet-and-back-of-the-envelope-calculations/

This guy seems reputable but the post is 10 years old so things might have improved from back then. I guess I'll know for sure when I get it.

So on-board NICs are slower than dedicated NICs. Got it! Is it because they utilize the CPU?

Not necessarily, that's why I specifically mentioned Intel as a brand. Their NIC cards are pretty much a sure bet to maximize that link in your network. There are of course other variables.

I read that link and I don't know if it is just the article showing its age (2005) because hardware wasn't up to snuff or if the guy just didn't know his stuff. e exact type of file(s) being transferred can make a difference as a collection of small files will be pretty slow but I know when I transfer BD Rips that are 8GB+ my network can handle 80-95MB/s for the entire duration of the transfer. In some cases, the HDD is the slowest link.
 
Last edited:

RadiclDreamer

Diamond Member
Aug 8, 2004
8,622
40
91

swapjim

Member
Nov 16, 2015
113
2
81
[...] I know when I transfer BD Rips that are 8GB+ my network can handle 80-95MB/s for the entire duration of the transfer. In some cases, the HDD is the slowest link.

That is GREAT news!

And yes, I've noticed that too; transfer of small files is slower. It's like the connection takes a while to reach full speed.
 

mv2devnull

Golden Member
Apr 13, 2010
1,518
153
106
So on-board NICs are slower than dedicated NICs. Got it! Is it because they utilize the CPU?
No.

There are quality differences between NICs. That is unrelated to whether they are integrated or external.

Data has to be transferred to and from the NIC. That is a property of the bus. For example, you can plug an external 1 Gbps NIC to the USB2 port of Raspberry Pi, and then it is not the NIC that limits the bandwidth.

Using the CPU is not necessarily the weakest link, but some NIC can "offload" -- do some number crunching on behalf of the CPU. Again, that is unrelated to whether the NIC is integrated or discrete.
 

Mir96TA

Golden Member
Oct 21, 2002
1,950
37
91
Ip perf is a great utility to find the network through out put. Without the influence of the HDD and Bus.
Most of the time people are limited by HDD.
 

smitbret

Diamond Member
Jul 27, 2006
3,382
17
81
That is GREAT news!

And yes, I've noticed that too; transfer of small files is slower. It's like the connection takes a while to reach full speed.

On a Gbe connection, a spinning HDD cannot saturate the network if it is forced read/write a bunch of small files versus one big one. It has nothing to do with the network. HDD seek times are a huge factor. The HDD simply can't find and feed 1000 1MB files as fast as it can find and feed a single 1GB file.
 
Feb 25, 2011
16,975
1,607
126
Oh, I didn't know that. Even though I suspect it's basic knowledge about HDDs :p

Nah. You'd be amazed how often I have to remind people who definitely knew that. (I work in software dev., and some of the code repos are hundreds of thousands of tiny files. Others are not. Performance of cloning/copying repositories varies a LOT.)

It's not something people think about, they just know that the doodad is doing its whatchamacallit slower than they'd like.
 

Pandasaurus

Member
Aug 19, 2012
196
2
76
The short answer to your question is... It's theoretical, but most new switches can.

A few things to keep in mind:

Generally a switch manufacturer will list (at a minimum) the switching capacity (also referred to as backplane or fabric) of the switch. This is usually derived from how many packets the switch can forward per second (usually with 64 byte packets, if I recall correctly). Not all manufacturers will list the PPS (packets per second) rate of their switches. Your performance may vary depending on the size of your packets.

Switch ports are (usually) full duplex, meaning you have a theoretical maximum of 2 Gbps per port. This means an 8 port switch would need a 16 Gbps fabric to support all 8 ports at full speed at the same time.

Most new-ish switches will have a fabric capable of supporting all of the ports, with the exception being many switches with additional SFP ports. Most manufacturers seem to not expand the fabric to include the SFP ports, so a 24 port switch with 2 SFP ports (26 ports total) will have a 48 Gbps fabric, rather than 52 Gbps. I'm ignoring high-end enterprise switches here. Just because my switches have a 176 Gbps fabric, doesn't mean they all do.
 

Red Squirrel

No Lifer
May 24, 2003
69,522
13,200
126
www.anyf.ca
Switches will often be rated with a total throughput value, like say, 16Gbps, which I think means you can have that much data flowing in/out at a time.

I get about 115MB/sec (that's mega byte) on my network transfers depending on the protocol I'm using, so not sure where the 30MB comes from, that's rather low.
 

Gryz

Golden Member
Aug 28, 2010
1,551
204
106
Switch ports are (usually) full duplex, meaning you have a theoretical maximum of 2 Gbps per port. This means an 8 port switch would need a 16 Gbps fabric to support all 8 ports at full speed at the same time.
The marketing cool-aid has spread far .... :)

If a switch has 8 ports, of each capable of 1 Gbps in and 1 Gbps out, then still only 8 Gbps of traffic can reach the switch. If the switch-fabric forward all traffic from 1 port to another port, it is still switching only 8 Gbps of traffic. The fabric still doesn't need more than 8 Gbps capacity. Unless I am missing something fundamental.

Until the late nineties, total capacity was always measured in through-put. In the case of a switch with 8 ports, it was said that the max through-put wat 8 Gbps. But then some marketing-%&#&%(% started counting the traffic twice. Going in and going out. I don't know why. Imho it's fraud. I think it was cisco that did it first (not 100% sure, but that's what I remember. Cisco technical people were ashamed of their own marketing people). Once the double-counting gets accepted by some customers, then every vendor has to follow the math. Pretty sad. :) And now customers are starting to believe that the switch-fabric is really transporting double the traffic.


Back on topic: when you buy switches from recognized brands, you can assume that they can forward at line-speeds. At least at average packet-sizes or larger. (Is average still ~500 bytes ?) That's usually good enough. Only with the high-end, very expensive switches, you can assume they can do 64-byte packet forwarding at linespeed. (My guess, I've been out too long to know this for sure. Maybe mid-segment switches can all do it now too). But for cheap switches (under $50), I wouldn't count on it that they can forward 64-bytes frames at linerate.
 
Last edited:

sdifox

No Lifer
Sep 30, 2005
98,431
17,044
126
The marketing cool-aid has spread far .... :)

If a switch has 8 ports, of each capable of 1 Gbps in and 1 Gbps out, then still only 8 Gbps of traffic can reach the switch. If the switch-fabric forward all traffic from 1 port to another port, it is still switching only 8 Gbps of traffic. The fabric still doesn't need more than 8 Gbps capacity. Unless I am missing something fundamental.

Until the late nineties, total capacity was always measured in through-put. In the case of a switch with 8 ports, it was said that the max through-put wat 8 Gbps. But then some marketing-%&#&%(% started counting the traffic twice. Going in and going out. I don't know why. Imho it's fraud. I think it was cisco that did it first (not 100% sure, but that's what I remember. Cisco technical people were ashamed of their own marketing people). Once the double-counting gets accepted by some customers, then every vendor has to follow the math. Pretty sad. :) And now customers are starting to believe that the switch-fabric is really transporting double the traffic.


Back on topic: when you buy switches from recognized brands, you can assume that they can forward at line-speeds. At least at average packet-sizes or larger. (Is average still ~500 bytes ?) That's usually good enough. Only with the high-end, very expensive switches, you can assume they can do 64-byte packet forwarding at linespeed. (My guess, I've been out too long to know this for sure. Maybe mid-segment switches can all do it now too). But for cheap switches (under $50), I wouldn't count on it that they can forward 64-bytes frames at linerate.

Full duplex... Granted I did not benchmark the switch to know if it actually can push 16gbps, but outside of server farms it's pretty academic.
 

Pandasaurus

Member
Aug 19, 2012
196
2
76
The marketing cool-aid has spread far .... :)

If a switch has 8 ports, of each capable of 1 Gbps in and 1 Gbps out, then still only 8 Gbps of traffic can reach the switch. If the switch-fabric forward all traffic from 1 port to another port, it is still switching only 8 Gbps of traffic. The fabric still doesn't need more than 8 Gbps capacity. Unless I am missing something fundamental.

Until the late nineties, total capacity was always measured in through-put. In the case of a switch with 8 ports, it was said that the max through-put wat 8 Gbps. But then some marketing-%&#&%(% started counting the traffic twice. Going in and going out. I don't know why. Imho it's fraud. I think it was cisco that did it first (not 100% sure, but that's what I remember. Cisco technical people were ashamed of their own marketing people). Once the double-counting gets accepted by some customers, then every vendor has to follow the math. Pretty sad. :) And now customers are starting to believe that the switch-fabric is really transporting double the traffic.


Back on topic: when you buy switches from recognized brands, you can assume that they can forward at line-speeds. At least at average packet-sizes or larger. (Is average still ~500 bytes ?) That's usually good enough. Only with the high-end, very expensive switches, you can assume they can do 64-byte packet forwarding at linespeed. (My guess, I've been out too long to know this for sure. Maybe mid-segment switches can all do it now too). But for cheap switches (under $50), I wouldn't count on it that they can forward 64-bytes frames at linerate.

You answered your own question (which wasn't really a question, more of a statement). 8 Gigabit ports at full duplex = 16 Gigabits of potential throughput (assuming you are saturating every port both upstream and downstream at the same time, which is highly unlikely in any consumer situation). The switch fabric needs the switching capacity to saturate the connection in both directions, as the switch is transmitting and receiving at the same time. Regardless, virtually any switch made in the last few years should be capable at forwarding at line-rate, or at least close to it (close enough that you likely won't notice in a consumer situation).

Full duplex... Granted I did not benchmark the switch to know if it actually can push 16gbps, but outside of server farms it's pretty academic.

Exactly. The majority of situations, you're unlikely to notice. If you're really pushing 16Gbps through a home switch, in a typical (IE: Not mine) home environment, I'd be interested to see your setup.