Network Speeds

Last night I needed to transfer a vmware image from a linux host to a windows laptop. I was surprised it took over an hour to do so considering it was on a wired network, so I decided to do some testing on my network.

I have two ubuntu linux hosts which I will be calling linux1, linux2. I also have a mac laptop (apple1), a windows laptop (win1), plus a windows vm running on the mac (win1-vm). All have onboard gigabit network interface cards and are connect to a single 10/100 24 port switch in the basement.

So the first thing to do is benchmark the network and get a baseline
linux1 to linux2

linux1:$ iperf -t 60 -c linux2
------------------------------------------------------------
Client connecting to linux2, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 10.1.1.50 port 45045 connected with 10.1.1.136 port 5001
[ 3] 0.0-60.1 sec 674 MBytes 94.1 Mbits/sec

and apple1 to linux2

apple1:$ iperf -t 60 -c linux2
------------------------------------------------------------
Client connecting to linux2, TCP port 5001
TCP window size: 129 KByte (default)
------------------------------------------------------------
[ 3] local 10.1.1.125 port 64143 connected with 1.1.1.136 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-60.0 sec 664 MBytes 92.9 Mbits/sec

Here is the output from the endpoint linux2

linux2:$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 10.1.1.136 port 5001 connected with 10.1.1.50 port 45045
[ 4] 0.0-60.2 sec 674 MBytes 93.8 Mbits/sec
[ 5] local 10.1.1.136 port 5001 connected with 10.1.1.125 port 64143
[ 5] 0.0-60.0 sec 664 MBytes 92.9 Mbits/sec

This gives us a baseline of 92.9 Megabits to 93.8 Megabits per second, which look pretty good for a 10/100 Megabit per second switch.

Now to do some real world testing with scp
Transfer from linux2 to apple1

apple1:$ scp user@linux2:/usr/local/vm/test.vmdk .
user@linux2's password:
test.vmdk 100% 3549MB 10.5MB/s 05:39

Transfer from linux2 to linux1

linux1:$ scp user@linux2:/usr/local/vm/test.vmdk .
user@linux2's password:
test.vmdk 100% 3549MB 11.2MB/s 05:18

so we are getting 84 and 89.6 Megbits/s which are acceptable apple1's lower number might be related to having vmware fusion running on the same machine.

Now we test the same situation I had last night of transferring a file form linux2 to a windows host. I am using pscp V0.60

(win1-vm):\>pscp user@linux2:/usr/local/vm/test.vmdk .
test@linux2's password:
test.vmdk | 176000 kB | 936.2 kB/s | ETA: 01:01:34 | 4%

That gives us 0.914 Megabytes/s or 7.31 Megabits per second which is a far cry from 93.8 Megabits recorded by iperf

Putty also has a beta snapshot Version 2009-01-04:r8377 so I tried that

(win1-vm):>\pscp-b user@linux2:/usr/local/vm/test.vmdk .
user@linux2's password:
test.vmdk | 3634240 kB | 6975.5 kB/s | ETA: 00:00:00 | 100%

That gives us 6.812 Megabytes/s or 54.49 Megabits/s which is a lot better than V0.60 but still not as good as native scp to scp. The above pscp tests were on a windows vm on a mac so that might account for some of the slowness. The final test is for a transfer from linux2 to a dedicated Windows XP machine.


test.vmdk | 3634240 kB | 9665.5 kB/s | ETA: 00:00:00 | 100%

Which resulted in a respectable 9.44 Megabytes/s or 75.5 Megabits/s, still not quite as good as linux scp to scp but bearable.

So to conclude pscp V0.60 has some serious issues and should be avoided.

Sometimes you got to hate linux

The boot drive on my file server has been really slow, hdparm was returning some really low numbers and CPU was spiking, which i wasn’t expecting on my new hardware. I decided this morning to do some google searches.

Here is the original hdparm results

sudo hdparm -t /dev/sdf
/dev/sdf:
Timing buffered disk reads: 4 MB in 3.56 seconds = 1.12 MB/sec

Then i added the following in /etc/modprobe.d/blacklist

blacklist ata_generic

and in /etc/initramfs-tools/modules added

pata_atiixp
blacklist ata_generic

rebuilt the initramfs

sudo update-initramfs -u -v

rebooted and now I get

sudo hdparm -t /dev/sdf
/dev/sdf:
Timing buffered disk reads: 220 MB in 3.02 seconds = 72.83 MB/sec

Geek Christmas

Since I had some time off over Christmas and we didn’t have any major plans so I decided to tackle some outstanding IT project in the house.

The first thing was to clean out all the computer that used to live close to the litter box in HY’s old appartment. That was the most icky of the projects, vacuuming out the layer of the cat litter dust, stripping out all the drives, and wiping down everything. I also needed to wipe down all the stuff I dumped in the basement after moving for similar reasons.

I ran nine cat 5 cables, 2 to the TV in basement, 2 to the TV in living room and 4 to basement room with all the computers and one to the phone demark. I still need to find out if I can easily pull some cables up into the attic and over to HY’s office.

I rebuilt the asterisk server with PBX in a flash and hooked the Sipura 2002 into the house telephone lines so we can use normal cordless phones for making calls. I also signed up for axvoice to get 200 minutes of US/Canada minutes. The international rates also appear to be good.

I also needed to centralize all my mp3/acc files on one computer, over the years the files have spead out over a number of computers. I also borked my raid array on the file server a couple years back and had a lot of MP3’s that didn’t play all the way through. So I wrote a script that copies all the mp3 from my laptop to the file sever. If it was already on the fileserver then it would over write the file, if it didn’t then it added the song to a ‘new’ folder. After after a month or so and a couple iterations fixing dumb things like ; and ‘ in the song names I had all the files in one location which are being sharing out via iTunes on the mac mini.

I also backed up all my files on my laptop and installed Leopard (macos 10.5). Apple makes it really hard to accidentally wipe your computer so took me few goes to work out how to do a full wipe. The first time I missed the small “options button” in the install that gives you the non idiot upgrader. The second time i selected to do a fresh install, but preserve user applications and files in a separate folder option. I didn’t realize it was going to copy in all saved files and applications back into the normal folders after installing. So the third time I did the nuke and destroy option to wipe the computer then install. After all that I now have a fresh install with just the applications I want. It runs nice and fast now.

I am really like 10.5, the time machine option is nice and easy for backing up the computer. The Screen Sharing App is the best way to remotely control another Mac, very very fast compared to Chicken of VNC or Vine. I had some issues with X11 doing control click for pasting till I found the developers site where I could install an unofficial update. I am not impressed with the new version of Front Row. Apple synced Front Row to match the version that comes with the AppleTV’s. It seems slower especially when viewing media on another mac. They also removed the extra level between selecting a TV Season and the episodes so you it now goes straight from TV Show to all the episodes. This sucks if you have 4 or 5 seasons of a show and only want to watch season 3.

The final thing on my geek list was to upgrade the file server to something less ancient than Suse 9.3. Ubuntu has been my Linux distro of choice for over a year now, but it doesn’t have a nice gui for setting up LVM and RAID partitions so I wanted to see what open suse 10.3 was like. I tried out the live cd on another computer and wasn’t hugely impressed with the newer version of KDE. I didn’t like the equivalent of the start menu, the final decision was made when I couldn’t get the live cd to boot on file server, so ubuntu it was. After installing I had some issues with the raid drives. I wasted most of Sunday trying different things, but both raid arrays are now online and keep working even after rebooting. I had a number of issues, first the partitions on two of the disks wouldn’t show up in /dev till I removed the entry in /etc/blckid.tab. I then had to build the raid mirror with just one drive, then wipe the super block on the other drive, reboot, then add the second drive back in. The only thing I can think of is that the drive had the superblock in both the /dev/sdd and /dev/sdd1 which was confusing it.

I still have to install vmware server, setup samba and some other junk on the file server but nfs is up and running and the macmini can see all the media.

Oh and I got a Garmin GPS Bike computer from Hongying that allows my to track my heart rate and the path I took.

So thats my Christmas geek fest.

What did everyone else do?

For future reference
to update a ubuntu install from a basic install to a desktop install

sudo apt-get install ubuntu-desktop

to upgrade a distribution do the following

sudo sed -e ’s/sdapper/ edgy/g’ -i /etc/apt/sources.list

sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get dist-upgrade

# the second dist-upgrade is needed to clean out in the init changes.

sudo apt-get -f install

sudo dpkg –-configure -a