La Vita è Bella

Monday, November 19, 2007

AFP versus SMB

I have a Linux file server in my home running Debian Lenny, and I always use SMB for file sharing, it have a very very bad performance. Today I suddenly remember Apple have an AFP protocol, so gave it a try.

I use "apt-cache search afp" to find out that there's a package named "netatalk" can provide AFP file sharing, so install it. But I can only login use guest account, not my system user, from Leopard.

I googled it and found that the problem is: on the Debian side, as a license issue, the Debian package didn't come with SSL support; on the Leopard side, it didn't allow you exchange your password with AFP server without SSL. So the solution is build netatalk yourself, with SSL.

The building steps are described on this blog, and I also disabled atalkd as the author suggested, it caused netatalk to start-up much faster than before.

So finally I got a AFP server for my Mac (compare this icon to the famous BSOD icon for SMB servers in Leopard :P):

AFP server icon in Leopard

And as expected, AFP is much much faster than SMB, here's the write test:

For AFP:

fishy@McManaman:~$ dd if=/dev/zero of=/Volumes/Home\ Directory/foo
^C57345+0 records in
57345+0 records out
29360640 bytes (29 MB) copied, 11.0833 s, 2.6 MB/s

And for SMB:

fishy@McManaman:~$ dd if=/dev/zero of=/Volumes/fishy/bar
^C4235+0 records in
4235+0 records out
2168320 bytes (2.2 MB) copied, 10.6889 s, 203 kB/s

I'm impressed!



tags: , , , , , ,

22:38:32 by fishy - linux - Permanent Link

Revision: 1.1/1.1, last modified on 2007-12-22 @ 12:23.

Karma: 30 (63.64% out of 110 were positive) [+/-]

You can subscribe to RSS 2.0 feed for comments and trackbacks

Trackbacks:
There are currently no trackbacks for this item.
Use this TrackBack url to ping this item (right-click, copy link target). If your blog does not support Trackbacks you can manually add your trackback by using this form.

atppp

atppp wrote:

looks like your smb is unreasonably slow.

Tuesday, November 20, 2007 00:54:13

fishy

fishy wrote:

My router is weird these days, and maybe Leopard has a poor support for SMB, anyway, I've got a quick file sharing protocol and I'm happy with that...

Tuesday, November 20, 2007 01:00:37

Miggyb

Miggyb wrote:

Yup! I just tried that out, and I have a tenfold increase in speed too! amazing!

Sunday, December 23, 2007 05:43:41

sharonbaby

sharonbaby wrote:

My name is yuxuan wang as well!!

Monday, December 24, 2007 21:11:31

Add Comment

 

May the Force be with you. RAmen