6

I have a very basic and newbie question. I was told that we have a "Gigabit Network". So, I ran a quick scp test by copying a file to another machine and the transfer rate is only 35MB/sec.

Shouldn't the transfer rate be near the 1GB/sec?

Also, is there a command line that will tell me that I have a "Gigabit network"? Eg. will ifconfig tell me that?

Carmen
  • 807
  • 3
  • 11
  • 13
  • Thank you for all your answers. But forgive me for asking another silly question, but is it possible to use ping to measure network speed? – Carmen Aug 13 '10 at 18:11

4 Answers4

10

GigaBIT Ethernet is 1 billion BITS per second. Theoretical maximum transfer is 125MB/sec.

Having said that, your 35MB/sec is a bit slow, but encryption is going to slow down SCP file transfers and that probably accounts for it.

Encryption aside, any file transfer is a poor network benchmark as your I/O subsystem may be bottlenecking the transfer, though. You mention ifconfig, so I assume you're running some *nix OS. Have a look at the ttcp utility. It gives a nice measure of TCP throughput on your network.

Evan Anderson
  • 141,071
  • 19
  • 191
  • 328
9

Gigabit is not Gigabyte. The best case transfer speed is 125MB/s (1000 gigabits / 8).

SCP is a poor tool to measure bandwidth. You have the overhead of the encryption, you may have compression enabled, and you will have to take into account the speed of the drives on both the source and destination.

Iperf is a much better tool to measure bandwidth.

If you want to see your link speed use ethool {interface} or mii-diag {interface} if you are using Linux.

Is it possible to use ping to measure network speed?

The bandwidth measurement you got with ping would most likely be even less accurate then a TCP or UDP based test like ttcp or iperf use. If you really wanted to try it you would need to start a capture in something like wireshark/tcpdump and do a flood ping ping -f against another host, then you analyse the capture and see how much ICMP traffic was passed during a time period. The problem is that several devices de-prioritize ICMP.

Zoredache
  • 128,755
  • 40
  • 271
  • 413
  • 1
    ++`iperf`. Use UDP tests to avoid TCP overhead and better approach link speed. OS choice may drive what you discover; prior experience shows Windows 2000 may top out at under 50% of link speed. – medina Aug 12 '10 at 19:45
  • 1
    I'm negative on UDP benchmarks, though, because most "getting work done" protocols (CIFS, HTTP, FTP, etc) are TCP-based. I'd rather see the TCP overhead and bandwidth-delay-product artifacts, so I test with ttcp. – Evan Anderson Aug 12 '10 at 19:47
  • 1
    SSH/SCP's internal buffers also limit performance: http://www.psc.edu/networking/projects/hpn-ssh/ – Gerald Combs Aug 12 '10 at 19:50
  • @Evan Anderson, I agree, about using tcp to test the majority of the time since TCP is used for almost everythign. Sometimes you do want a UDP test though, particularly in the case where you are supporting VoIP. – Zoredache Aug 12 '10 at 22:10
  • iperf can be very aggressive - plan accordingly if there is any chance of disrupting "other" network usage/access. – user48838 Aug 13 '10 at 08:25
  • @user48838, If your switching fabric can't take a single person doing 1Gbps without others noticing, it's time to rethink your design. – Chris S Aug 13 '10 at 18:21
  • @Chris S, I could see a bandwidth test being an issue in some cases. For example you not want to test form/against a server performing some important task during peak usage. But I agree, it shouldn't cause a problem with your switches. – Zoredache Aug 13 '10 at 18:29
5

Transfer speeds will only be as fast as the slowest of the client and recipient system, which is a combination of processor/memory speeds and harddrive access times.

SCP also adds a lot of overhead for all the encryption.

pfyon
  • 943
  • 1
  • 7
  • 10
4

Also, Ethernet seldom gives you your entire line speed. I've very rarely seen a full 125MB/s on a server, and that test was purely synthetic. In real world scenarios I've seen over 100MB/s frequently, and even 120MB/s a time or two. The caveat there is that I was dealing with servers doing disk operations (multiple backup-to-disk streams going to fast Fibre Channel storage).

I've seen 125MB/s a lot more often on our router and switch uplink interfaces. They're just shovelling packets around, not doing anything significant with them like I was. A true throughput test will be as pure network as you can get.

sysadmin1138
  • 131,083
  • 18
  • 173
  • 296
  • Switching capabilities will also come into play as well as the NIC capabilities and everything else already mentioned. If possible, a cross-over cable will take the switching component out of the equation. – user48838 Aug 13 '10 at 08:28