Windows Vista: Fucking with Samba?

My fileserver of choice for a while now has been a Gentoo Linux box as I’ve posted previously. It’s been working like a charm with Windows XP, I can’t complain at all about the transfer speeds.

However, Microsoft have changed pretty much everything in Windows Vista, and for no apparent reason than for the hell of it. One of the changes is SMB2, a new version of the Windows File Sharing protocol which, although not adding any improvements past changing the integer count from 16 to 32-bits, is apparently a huge improvement. If you believe Microsoft PR.

A podcast I listened to recently, FLOSS Weekly, featured Jeremy Allison from the Samba team. One of the most interesting parts of the cast was a talk about SMB2. Jeremy said something like this:

I don’t know whether you know, but there’s a new protocol that’s been added in Vista, SMB2. And, if you read the Microsoft publicity, it’s sort of “oh, it’s this new internet-friendly filesystem, it’s designed to reduce latency!” […] Anyway, so we’re unsure about this thing, and I run into a guy — who shall remain nameless, for this podcast anyway — he was a fairly senior person at Microsoft, who had left to join an open source company. We’re chatting about SMB2, and he just sort of shook his head, and said “yeah, you know why we did that?” I said “no”, and he said “yeah, and the engineers were told to fuck with Samba.”

It reminded me of my first attempts to try Windows Vista, which have resulted with me going back to XP. I managed to turn off the UAC rubbish (which just gives users a false sense of security anyway) and get the UI set up the way I wanted, but I couldn’t help notice transfer speeds from my fileserver were absolute rubbish. I did some testing that confirmed it, went back to XP after not being able to find a solution, and have been with XP since.

I did notice that Samba were bringing out a new version to try and improve performance to Vista clients though, which is now out in the form of 3.0.25/3.0.25a. Although this isn’t in portage yet as far as I can tell, I decided to download the sources and give it a shot anyway. After all, it’s the only thing really stopping me from using Vista on a daily basis. I thought I’d do some proper tests this time though, to see what sort of difference there was between 3.0.24 and 3.0.25.

Here’s the test setup:
Server
AMD Athlon 64 3000+
Gigabyte K8NF-9 motherboard
1Gb PC3200 DDR RAM
Onboard nForce4 gigabit network adapter
500Gb software RAID-5 array (3×250Gb Seagate 7200.10 HDDs) connected through onboard nForce4 SATA controller
Gentoo Linux 2006.1, 2.6.19-gentoo-r5 kernel, x86_64 arch

Client
AMD Athlon 64 X2 4400+
ASRock nForce 6100 motherboard
1.5Gb PC3200 DDR RAM
Repotec PCI-E 1x Gigabit network adapter (Realtek 8168 chipset)
200Gb Seagate 7200.10 HDD
Windows XP Pro SP2, Windows Vista Ultimate (both 32-bit)

All running through a gigabit switch with Cat6 cabling.

First test was a few passes of Netperf to ensure the adapters, cabling, drivers and switch were all A-OK. Run with a 30-second pass on the default settings.

Netperf Benchmarks

All good here, although it’s only a theoretical benchmark it shows that both adapters are capable of hitting the theoretical 100Mb/s over a gigabit network.

Next came the actual file copy benchmarks. To ensure any issues with the tests were isolated to Samba, as well as ruling out anything like fragmentation affecting the results, I ran both Samba and FTP benchmarks on the same files. Samba tests were run with both 3.0.24 from Gentoo’s Portage, as well as 3.0.25a from the official Samba website.

The three test files were all around 172 megabytes, give or take a few.

The results were, interesting, to say the least.

Netperf Benchmarks

Vista is showing up pretty much a whole ten times slower when copying from a Samba server than via FTP, or even compared to Windows XP. That pegs Vista’s performance at a quite frankly appaling 5Mb/s over a gigabit network.

I’m not sure whether the blame lies with Samba or Microsoft yet. An ex-Microsoft employee claiming that SMB2 was written specifically to “fuck with Samba” sure doesn’t help. I do know that I’ll be holding off my Vista “upgrade” until Samba can implement SMB2, because the alternative is Windows Home Server, and at the moment I love my Linux box too much. I may try WHS in the near future though, comparing that for file transfer speeds would be an interesting task indeed.

Edit: One of the Linux gurus on the OCAU Forums pointed out that I didn’t have VFS Readahead turned on, which is one of the new features in Samba 3.0.25a supposed to improve performance with Vista.

Well, no dice there either. It still can’t top about 5Mb/s.

Also, multiple transfers don’t seem to stack. If I’m copying 2 files, they both drop to around 2.5Mb/s.

0 Responses to “Windows Vista: Fucking with Samba?”


  1. No Comments

Leave a Reply