Rosher Consulting

Software Consulting and Development Services

Blog upgrade

Finally got round to upgrading the blog from BlogEngine.NET 1.2 to 1.4.5! Everything seems to be working ok, so it looks like I haven't broken anything which is a good thing but if anything appears amiss please shout!

Server reboot

Rebooted the server today and it appears to have re-published all of my previous posts (that's right all 10 of them ;-), so my apologies if you thought I'd suddenly become a prolific blogger!

Gigabit networking part 2 + Thecus N4100+ part 2

The first parts of this post can be found here and here.

I've combined part 2 of both of these posts as ultimately the problems I had getting Gigabit network speeds and the performance of the Thecus were interrelated.

After my previous unsuccessful attempts at improving my Gigabit speeds I didn't completely give up and over the next few months I tried a few more things, the main change being moving everything over to Cat6 cabling, but as with most of my other changes I didn't see any massive improvements worthy of the Gigabit name.

During my travels I'd previously read about the impressive speed of the Intel NIC's and especially how well they performed when paired together, which got me to thinking 'what if you used the same NIC's in every PC?', I was sure I'd read something about this somewhere as well but as per usual my ninja Google skills let me down (back to ninja training school for me!) and I couldn't find the article I'd read.

A bit more Googling around and it seemed to me that the Intel PRO/1000 GT was getting some good reviews and more importantly the high speeds I was after, but at around £25 each (I needed 4 of them) I was a bit hesitant to commit down a path that I wasn't sure would yield any positive results. I managed to remain hesitant and keep my gadget spending in check for at least a couple of weeks, which is pretty good for me, before I finally buckled and 'thought to hell with it' and placed the order.

As per usual, eBuyer's excellent service meant that the NIC's arrived nice and quickly so I was able to get them installed into a couple of machines to test with. I chose the kitchen media center and the lounge media center since both PC's were easily accessible and they were both plugged into the same switch. Once the NIC's and drivers were installed I made sure I disabled the old NIC's to avoid any conflicts, enabled 4k jumbo frames, prepared a 1gig test file and loaded up FastCopy.

When those first test results came in I was like a kid at Christmas, wow, I was getting around 45Mb/s which I had never, ever got before. A few more tests in both directions confirmed the first result and I was very happy, I'd justified the money I'd spent (the missus might say otherwise of course :-)). I played around with the jumbo frame size, increasing it to 8k and then 16k, testing with a batch of smaller files as well as a single large file, there was hardly any difference seen with the large file, but with the smaller files the performance was worse with the higher frame sizes, so I stuck to 4k.

I then proceeded to install the other 2 NIC cards in the server and the kids media center, performing similar tests to what I had already done and on all occasions I got similar results in the 40-50Mb/s range. I was so pleased with everything that I begun to wonder what the performance would be like with the Thecus NAS, which up until this point had been sitting in the box it came in gathering dust.

Since I'd installed the 500gig drives that were originally meant for the Thecus into the server I didn't have any spare SATA drives that I could use to test with. I decided that it was about time I finally used the Thecus rather than just leaving it there wasting money so I ordered a new 1TB Samsung drive which would then be used primarily for backup purposes.

When the drive arrived I once again unboxed the Thecus and installed the drive, I then set the NAS up like I had done many times previously, making sure I enabled 4k jumbo frames to match my new NIC's. Testing the NAS didn't yield the 40-50Mb/s results that the new NIC's had done but then again I never expected it to, what I did get was speeds of around 20Mb/s which based on all the information I could find was pretty much the maximum I could expect from this NAS drive so I was happy, at least now I had some fairly decent file transfer times.

You may be reading this and thinking to yourself that Gigabit has a maximum speed of around 100Mb/s so why is this guy so happy with 40-50Mb/s? The answer is actually quite simple, all of my tests involved reading and writing to a hard disk, with most modern hard disks having a maximum throughput of around 75Mb/s. Don't believe me? After all SATA 300 is supposed to offer 300Mb/s isn't it? Have a look at this great article series on SmallNetBuilder entitled How To Build a Really Fast NAS, it really is worth reading all of the parts especially as it's near the end that they give you the hard drive benchmarks. Taking this into account and the fact that I have a mixture of old IDE drives and not so new SATA drives coupled with a range of CPU's means that achieving 40-50Mb/s is pretty good in my book.

Here's a summary of the setup that achieved the best speeds for me (your mileage may vary):

  • All NIC's same make and model
  • Cat6 cabling
  • 4k Jumbo frames
  • Gigabit switches

No other changes I made significantly affected the transfer speeds. I haven't made any other changes since installing the new NIC's and I've been living with a reasonably fast network ever since, so I'm a happy bunny.

Making your own steering wheel rack for the XBOX 360

The finished article Just before Christmas I was a little bored one day and was itching to do something when I remembered a little project I was thinking of doing. Back in 2007 when Forza 2 came out on the XBOX I picked up a Logitech steering wheel but I never could use it properly as I didn't have anywhere to fix it to.

Not so long ago I came across the Fanatec steering wheel rack, which seemed perfect but at £80+ for something I wouldn't use that often it seemed a bit steep. Looking at the basic design I thought I could replicate that with some wood I had lying around. All it needed was a board for the base, a batten for the column and another board to mount the steering wheel to.

I went to the shed and found all the bits I needed, I did think I had a couple of hinges I could use to be able to fold the rack but couldn't find those. Armed with supplies I then proceeded to measure everything to get the right height, this involved sitting on the sofa in front of the TV, holding the steering wheel at what I thought was the right level and then attempting to measure, all very scientific!

I then started cutting the base and column to size, once that was done I was able to better gauge whether I had the right height, which luckily it appeared I did. I then cut the board that the steering wheel would mount to, I made this slightly wider than the wheel and long enough so that it overhung the column equally both ways.

The beginnings Cutting the top board Fixing the top board First version

Once all assembled I was able to test it properly, the steering wheel was attached, the foot pedals put in place and all was connected to the XBOX and Forza was fired up. The rack worked well, but the foot pedal was a bit loose, so I added in a couple of blocks of wood to stop it moving backwards when you pressed down.

Slight adjustments All finished

With these in place the rack worked really well, I was able to sit back comfortably on the sofa and drive like I was sitting in a real car.

Obviously when the kids saw what I had done they wanted to have a go, which was fine except everything was sized for me so they had to stretch a bit to use it. This is where something like the Fanatec rack would prove useful as it's quickly adjustable.

Overall I've been really pleased with the rack, sure it's not pretty, but it does the job and I've got some ideas about how I can improve it, most notably being able to fold it up so it's easier to store, but otherwise it's been the ideal complement to the steering wheel and made me appreciate just how uncompromising Forza 2 is all over again!

NAS - Thecus N4100+

4100 Running a server 24/7 can become an expensive business especially when you're using an old power hungry Pentium 4 processor and you've got a lot of hard drives, which is why around December 07 I decided to get myself a NAS drive. I figured I could put all of my media files on the NAS and then keep the existing server in standby and have it wake up and shut down automatically to record TV.

Before I started looking for a NAS I drew up a list of requirements that I wanted to have, in order of priority:

  • At least 4 drive bays
  • BitTorrent client
  • iTunes server
  • UPNP compatible
  • FTP Server

I wanted 4 drive bays because it would allow me to start off with one drive and then add more as required, I wanted the BitTorrent client because I download some TV episodes and didn't want to have the server on for this, the iTunes server was required so that I didn't have to maintain separate iTunes libraries on various PC's, UPNP was more of a future requirement as more and more devices use this to discover content on the network and finally the FTP server as I occasionally upload files to the server.

Finding a 4 bay NAS drive wasn't a problem, there were plenty on the market, but finding one with the features I required was a bit of a problem as most 4 bay's were targeted at enterprise users, ones with the features I required had only 2 bays and I wasn't willing to compromise.

I eventually came across the Thecus N4100+ during my search that had everything I wanted and also had some really good reviews, most notably the reviewers pointed out the excellent features and the data transfer performance, which was something I was also interested in given my recent experiences with gigabit networking.

I did a bit of shopping around and eventually picked one up for £330 from Ultimate Storage, as I already said I was thinking of starting off with one hard drive and then adding more as time went on, but I've got no willpower when it comes to gadgets and when I saw the price of 500gig drives I ended up ordering 4 of them to give me 2 terabytes of storage!

When everything turned up I installed the drives and proceeded to get the NAS configured, which was reasonably straightforward once I'd read the manual of course. I decided to go with a JBOD setup rather than configuring a RAID array as I wanted to utilise all the available space and I wasn't bothered about backing anything up. Waiting for the NAS to configure the drives took about an hour, not sure why, but it would appear this isn't uncommon, in fact I've heard reports of configuring RAID arrays taking days, which I think is a combination of most cheap NAS drives using a slow CPU and having a software raid implementation, but anyway it got there in the end.

I then started to copy my media off of the server and on to the NAS, which is when I thought that perhaps Windows had a problem with its file transfer calculation time routine as it was way off the charts, heck, this NAS is supposed to be fast! I then busted out FastCopy to see what transfer rates I was getting and was disappointed to see that it was only around 5meg, doing some research on the net made me even more despondent and made me realise I should have done more of my usual research before buying the NAS drive as I wasn't the only one experiencing slow transfer rates.

I persevered for a while and tried all the usual tricks such as jumbo frames and any other suggestion I could come across but the best transfer rate I ever got was around 8meg, which when transferring gigs and gigs of files is going to take a long, longggg time!

Ultimately the problem with the NAS is that it's underpowered, even though it's got a gigabit Ethernet port and utilises SATA hard disks the CPU just can't keep up with high transfer rates, when I was doing my testing the CPU was always pegged at 100%, so no matter what configuration changes I made I was never going to improve the transfer rates.

I decided to cut my losses on the drive and send it back, the only problem was that I'd bought it just before Christmas and being Christmas I'd been a bit lax, Ultimate Storage don't exactly have a long return period either, so combined that meant that I was over the limit and wouldn't get a full refund. I couldn't accept the restocking fee, so I figured I'd probably eBay it or something... in the mean time I had to decide what to do with the four 500gig drives...

However, that and what eventually happened to the NAS drive is all a story for another time.

Gigabit networking - Part 1

GS605 Sometime around September 2007 I decided to upgrade the network to Gigabit as I was increasingly transferring large files around and I'd also noticed some occasional lagging and jerkiness when watching some HD content on the lounge media center (this was prior to the Quad core upgrade).

I did a little bit of research on the topic and decided that all I needed was to buy myself a Gigabit switch, transfer the network cables from the wireless router to the switch and then add another cable from the switch to the router, sounds simple enough!

I'd seen some really good reviews of the Netgear GS608 but decided to go for the cheaper 5 port version, the GS605, both models had good reviews on ebuyer.

I was already using Cat5e cables, so I connected everything up and then proceeded to do a few tests. I regularly use FastCopy to move files around the network as it's a lot more reliable than Windows Explorer and it also displays the current transfer rate, which is perfect for testing the new switch.

I used some large video files >1GB for the tests as you tend to get better results than lots of smaller files, unfortunately while the transfers were faster than the old network, they were rather disappointing considering that gigabit has a maximum (theoretical) throughput of 1000 mbps as I was getting about 8-9 mbps.

So...this is the point where I started to do a lot more research into gigabit networking and I realised that all was not quite as straightforward as it first seemed!

I tried tweaking Window's registry settings such as TCP window sizes, turning on Jumbo frames etc. but none of the above ever really gave me a great jump in transfer speed. I then came across a really good article (which typically I can't find now) that discussed using Jumbo Frames and how to work out the maximum transmission unit (MTU) for your network as it turns out that all NIC manufacturers use different sizes, so you have to do some manual tweaking to get everything working efficiently.

To give you some background on jumbo frames, all packets of data that travel around your network are transmitted in frames, so a 1gig file will be split up into multiple frames as required. A fast ethernet network will have a frame size of 1.5k, this is also known as the MTU, a gigabit network will also have a frame size of 1.5K, but with jumbo frames enabled you can increase the frame size up to 16k. Straightaway you should be able to see that your 1gig file using jumbo frames will result in less packets being sent around your network, hence why it will be faster. Here's the kicker though: if you configure your NIC with a frame size of say 8k, it will send out an 8k packet, if the NIC your sending to doesn't support or isn't correctly setup to receive an 8k frame, an error will get sent back to the source NIC that will then split the frame up into smaller packets and re-send it, hence why your super-duper gigabit network can appear to give no noticeable performance improvements over your fast ethernet network and in some scenarios can even appear to be worse!

All gigabit NIC cards should allow you to change the frame size, some will give you a pre-defined list of options such as 4k, 8k and 16k, others will allow you to manually enter the frame size. This all sounds simple and straightforward, except that some manufacturers include the size of the frame header and some don't, so working out which values to choose or enter can be a hit and miss affair.

Fortunately there is a way to work out the MTU by using the ping command which allows you to set the frame size (ping -l xxxx, where xxxx is the buffer size in bytes), thereby seeing whether the specified frame size will successfully get sent across your network. Using this technique you can gradually increase the frame size until the point at which it fails to determine the maximum frame size.

This all sounds fine and dandy, except that the process, when coupled with more than a couple of PC's quickly becomes arduous and still isn't guaranteed to give you great results.

Along with trying out some of the suggestions here the maximum transfer rate I ever got between any of my PC's was about 15Mb/s, which isn't too bad but is pretty disappointing considering the results I was expecting.

Whoa...this post has turned out to be a bit more wordy than I was expecting, but I guess it's important to include all the details that fully explain my disillusionment with gigabit networking as a whole.

In part 2 I intend to explain how I finally managed to get transfer rates in the 40-50Mb/s range and why gigabit networking will at the moment struggle to get past 75Mb/s.