Gigabit Ethernet Test

I recently installed a Gigabit Ethernet switch, and Gigabit ethernet cards in both my laptop and my server. I want to test to make sure I am actually getting a Gigabit, so I am trying this test:

On the server I have made a memory based filesystem so I won’t have any latency reading or writing to disks. I use OpenBSD, so I did this with:


 mount_mfs -s $((200*1024*1024/512)) /dev/wd0b /home/justin/test

  • -s is the number of sectors. (I wanted a 200MB filesystem since thats about how much memory is free).
  • /dev/wd0b is my swap partition. mount_mfs just wants to know this in case it needs to swap out of memory
  • /home/justin/test is the directory this filesystem is mounted in.

So I am able to write to this at about 87 MB/sec. This should be adequate for my test since 10MB/sec is the theoretical limit for 100 megabit. Gigabit should be around 100MB/sec or so:



$ dd if=/dev/zero of=testing bs=$((1024*1024)) count=185
185+0 records in
185+0 records out
193986560 bytes transferred in 2.224 secs (87196061 bytes/sec)
$


OK, so on the laptop, I’m trying this by mounting the directory I just created on the server through samba:


net use t: \\172.16.0.1\justin\test

Now, with Cygwin, I will do the same thing I did locally on the server:


$ cd /cygdrive/t

justin.h.haynes@ACN3GFLJ71 /cygdrive/t
$ dd if=/dev/zero of=testing bs=$((1024*1024)) count=185
185+0 records in
185+0 records out
193986560 bytes (194 MB) copied, 10.828 seconds, 17.9 MB/s

justin.h.haynes@ACN3GFLJ71 /cygdrive/t
$ dd if=/dev/zero of=testing bs=$((1024*1024)) count=185
185+0 records in
185+0 records out
193986560 bytes (194 MB) copied, 9.149 seconds, 21.2 MB/s

justin.h.haynes@ACN3GFLJ71 /cygdrive/t
$ dd if=/dev/zero of=testing bs=$((1024*1024)) count=185
185+0 records in
185+0 records out
193986560 bytes (194 MB) copied, 9.884 seconds, 19.6 MB/s

justin.h.haynes@ACN3GFLJ71 /cygdrive/t
$ dd if=/dev/zero of=testing bs=$((1024*1024)) count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 5.787 seconds, 18.1 MB/s

justin.h.haynes@ACN3GFLJ71 /cygdrive/t
$

Reading is about the same



justin.h.haynes@ACN3GFLJ71 /cygdrive/t
$ dd if=testing of=/dev/zero bs=$((1024*1024))
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 5.944 seconds, 17.6 MB/s


So this is slower than possible, but faster than 100 megabit. I’ll try exchaning the switch for another. This is a cheapey airlink.

Leave a Reply