Friday, February 19, 2010

NFS write performance

In prior posts, I've complained about the poor NFS write performance I've seen. A bit of research later, I've discovered that it's because OpenSolaris is strict about syncing NFS writes to disk (ref: NFS and ZFS, a fine combination)

There are ways to improve the time (ref: Disabling the ZIL, Don't) but the prevailing view is to put the ZIL on a separate device from the main ZFS data. I decided to give it a try using a 16 GB Sony USB flash disk.

I couldn't get it to work because the flash drive kept getting ZFS errors (ref: Bug 14676 – ZFS pool fails on Sony USB Flash drive - device disappears during use). A different flash drive worked but was too slow to help as a separate log device. Maybe I'll have to break down and buy a SATA flash drive. In the mean time, SMB is working out.

Saturday, February 6, 2010

OpenSolaris Realtek Network Interface Redux

In my last post, I tried using the "gani" driver for my Realtek RTL8111/8168B Gigabit network interface. In OpenSolaris bug 6892693, they patched the original driver so I decided to try the update.

I switched to the development repository but I couldn't find a way to get the package system to install the rge driver by itself. I set up another boot environment for the entire dev tree and updated to rev 131. I played around a bit with the dev boot environment but it was too buggy for me. I then copied /kernel/drv/rge and /kernel/drv/amd64/rge back to my stable boot environment and replaced the original rge drivers.

The new drivers worked reliably but didn't help the NFS transfer rate. I did find that scp (secure copy over ssh) clocked in much faster at 22 MB/sec. so I decided to set up SMB file shares.

If you haven't already bought it, the OpenSolaris Bible has great history and timesaving advise for setting up SMB and other parts of OpenSolaris. Using Sun's kernel implementation of SMB, I also got 24 MB second. I have to see if I can find tuning advise for NFS.

Sunday, January 24, 2010

OpenSolaris Realtek Network Interface

The ASUS M4A785-M motherboard has a built in Realtek RTL8111/8168B Gigabit network interface. While it worked out of the box with OpenSolaris 2009.06 (svn-111b) it would drop the connection at random points never to return. The logs were silent about the cause.

Found lots of trouble reports on the net including Bug ID: 6807184 rge driver drops off network. One of the later replies to serialized.net » The littlest Thumper: OpenSolaris NAS on an MSI Wind PC summed it up well: "There’s no know work around for this with the native rge driver. However, there is a third party driver “gani” that seems to have fixed the issue for me: http://homepage2.nifty.com/mrym3/taiyodo/eng/"

One of the many great things about OpenSolaris is that you can set up multiple boot environments, that is snapshot your existing setup, with beadm. See Working With Multiple Boot Environments on the OpenSolaris OS for details.

I pulled down the 2.6.4 "gani" driver and installed the amd64/gcc version into a new boot environment. It solved the network dropping problem but it's painfully slow. Writes over NFS top out at 2.1 MB/sec on a gig link. The old rge driver didn't do any better. I may have to get another network card...

Saturday, January 16, 2010

OpenSolaris host

I decided to build an OpenSolaris server but wanted to keep the cost down. The parts were:

Component

Cost

Case and PS

$74.99

Motherboard and CPU

$179.99

Memory

$101.98

Mirrored drives

$0.00

Keyboard

$17.99

Mouse

$0.00

DVD-R, CD-RW

$0.00

Display

$0.00

Graphics card

$0.00

Total

$374.95


The case and power supply were a Fry's special. Antec Two Hundred Mid Tower case and Antec Basiq 550W Plus PSU ($20 rebate shown in cost). The case has lots of room for expansion but isn't a tool-less design.

I got a motherboard and CPU combo that was shown in the OpenSolaris compatibility list verified as compatible. The ASUS M4A785-M AMD AM3 Motherboard has good expandability and on-board graphics. The AMD Athlon II X4 620 2.6 GHz AM3 CPU is an inexpensive quad code CPU.

I got 2 Kingston 2GB 240-Pin DDR2 SDRAM DDR2 800 (PC2 6400) KVR800D2N5/2G memory sticks and have two slots for future expansion.

I used two 1 GIg drives from a failed Sans Digital external mirror case. I'm using ZFS to mirror the drives in OpenSolaris.

Other than a SIIG Mini USB Keyboard, I had spares for the mouse, DVD drive and display. Except for the initial install, I'm planning to run the machine headless.

The OpenSolaris initial install went smoothly so now it's time to have fun with ZFS, xVM, etc.


Friday, October 16, 2009

VMware vs. VirtualBox on Windows

I've been using VMware Workstation 6.5.3 under Windows XP for a while primarily running Ubuntu 9.04. While it works well, I've chafed at the 2 processor (core) limit and the lack of 3D support (for compiz).

Sun's VirtualBox 3.0.8 supports more cores and has 3D support. The clincher was that it could use the same virtual disk format as VMware so I didn't have to start from scratch! I got the VirtualBox machine pointing to the VMware disk image and installed the guest additions. I then enabled compiz from the System-->Appearance menu.

Compiz worked well but there were repaint problems whenever a pop-up from VirtualBox or Windows appeared. Alt-tab refreshed the screen well though. Shared folders and USB support were different as well but workable.

Some limits that were more annoying were:
  • I couldn't set the memory to allocate for Ubuntu to anything more that 1500 MB even though my machine has 3.x Gig usable.
  • Full screen mode (no window boarders) only supports a single monitor.
    • I could stretch the normal non-full-screen client to span both monitors but then I lost a lot of vertical space to menu bars, etc.
The clincher for me was that I couldn't shut down VirtualBox and use the modified virtual disk under VMware again. VMware would start to boot Ubuntu but GRUB stage 1.5 would fail with an "Error 18".

Thank god for backups...

Saturday, July 4, 2009

Windows 7 Performance on Mac

I recently bought a Mac mini and wondered how it's NVidia GeForce 9400M graphics would stack up against an older PC with an NVidia GeForce 8600 GT. The Mac uses 256 MB of memory that it shares with OS-X. The PC has 256 MB of dedicated memory on the graphics card.

Windows 7 RC (build 7100) has a built-in system benchmark that includes graphics tests. I installed it on the Mac in a boot-camp partition using boot-camp version 2.1 drivers.


Mac Mini Dell GX-280
Processor 5.4 3.8
Memory (RAM) 5.5 4.9
Graphics 5.2 5.7
Gaming graphics 4.4 4.9
Primary hard disk 4.9 5.3



Base score 4.4 3.8

The processor and RAM show the difference a few years make but the Mac mini graphics can't keep up with a decent dedicated card. The laptop drive in the mini is slower than the desktop drive in the PC.

I'd love to see how the MacBook Pro with the optional NVIDIA GeForce 9600M GT discrete graphics processor does. It'd be great to see how the Solid-State drive does too.



Sunday, June 14, 2009

Virtual machine, physical disk

I've been a big fan of using virtual machines with products like VMware, Parallels and Sun's free VirtualBox. I recently had an old linux server die with a bad power supply but I still needed some of its data and services.

I removed the server disk and connected it to a ATA-USB converter. I could have just connected it to a linux virtual machine if I just needed the data but I wanted to boot from it.

VirtualBox makes it possible to connect a virtual machine to the physical disk. I plugged the USB converter into my Mac running OS-X and told the Mac to ignore the foreign file systems. Running diskutil in Terminal.app gave me the device assignment:

~/: diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *111.8 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS Macintosh HD 111.3 Gi disk0s2
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *38.2 Gi disk
1: Linux 101.9 Mi disk2s1
2: Linux 18.6 Gi disk2s
3: Linux 19.3 Gi disk2s3
4: Linux_Swap 188.2 Mi disk2s5


Virtual box has a command line tool to create a mapping from a virtual to a physical device:

~/: VBoxManage internalcommands createrawvmdk -filename `pwd`/linux.vmdk -rawdisk /dev/disk2
VirtualBox Command Line Management Interface Version 2.2.
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

RAW host disk access VMDK file /Users/verket/Library/VirtualBox/HardDisks/linux.vmdk created successfully.

I then used the VirtualBox GUI to define the IDE Primary Master as linux.vmdk. Booting my virtual machine accessed my physical drive through the USB converter giving me my server back but in virtual form.