Friday, November 16, 2007

VLAN for the SunRay interconnect and performance issues

The Sun Ray in the living room has been getting terrible performance - its connected via a NetgearGSM7224 gigabit switch to my OpenSolaris box running build 76 which I recenlty upgraded with a new e1000g intel Gigabit NIC. utcapture was reporting 30% packet loss in some cases - which equates to bad performance.

So I've done a bit of tweaking and the SunRay and the Server now have a dedicated VLAN to themselves.

Its worth nothing that I did this via a serail console - network reconfiguration is hard to do over ssh unless your careful about the order you do things in!

Firstly I configured the switch - it has a gui or a cli but I was feeling lazy and used the gui.

Port24 (my servers port) is now tagged with vlan IDs of 999 and 1 (the default vlan)
Port7 (the sunray) is marked untagged as vlan ID 999

On the solaris box you can bring up vlan aware interfaces using
ifconfig e1000g1000 plumb 192.168.2.252 up
gives a vlan ID of 1
ifconfig e1000g999000 plumb
gives a vlan of 999

though if you want it permanently (like I do) you need to put the ip address in
/etc/hostname.e1000g1000
Though as I'm always going to need interfaces with tagged vlans to use the switch port from now on I will just move the files:
mv /etc/hostname.e100g /etc/hostname.e1000g1000

Next step is to setup the Sun Ray interconnect.

As my dns setup is somewhat lacking (its on the list) I had to set my /etc/hosts file to point my machine at my IP adress not the loopback 127.0.0.1
utadm seems to do a getent hosts and refuses to work untill this is configured correctly.
root@frank sbin $cat /etc/hosts
192.168.2.252 loghost frank

Using the manual I configured the SunRay interconnect for the pre-plumbed e1000g999000 VLAN aware interface.
root@frank sbin $ /opt/SUNWut/sbin/utadm -a e1000g999000

The defaults where fine for me in this case so I just hit Y to confirm and let it do its stuff.
and the system should configure a DHCP server running on your new vlan interface.

After that - the Sun Ray was up and running correctly - though not quite as quick as I feel it should have been. utcapture was still listing 30% packet loss on a regular basis

A bit of further investigation (google) found this forum posting. It seems to suggest that UDP traffic might be getting dropped by the switch because it can't send it to the SunRay fast enough. After playing around with the settings on the switch I discovered that setting the server switch port to 100 Full Duplex massively reduces the packet loss observed using utcapture.
The next stage will be to try a different network card and maybe a different switch for the SunRay interconnect to see if I can get better performance for the SunRay and still keep the Gigabit speed connection for my main connection to the server. I'll keep reading up on the switch to see if their is a way to adjust the way it handles UDP packets - but its only a Level 2 Netgear so I'm not convinced.

No comments: