WebDAV versus Sshfs

At Gioorgi.com we evaluted a internet file system common gateway for connecting network resources. We compared two solutions: a webdav file system and an ssh-fs file system. The solution should be viable via MacOSX and Linux, but also Windows support will be a plus.

WebDAV

Samba and NFS are for sure more fast and reliable, but webdav offers some nice feature:

  • Webdav is easy to set up on apache web server
  • Webdav uses simple http protocol extension, so you can use it also behind web proxy
  • You can use HTTPS protocol to get SSL encryption
  • Apple uses it for its iDisk solution, so you get the ability to run it smoothly under MacOSX and Linux with minimum effort.

The problem is Windows: there is a MS-WebClient built in with WindowsXP, but it is difficult to map the URL as a simple network drive.

There is an old Novell utility called netdrive which do the trick, but it is unsupported and difficult to find.

After some work we tried NetDrive, which is a commercial solution but it is free for personal use.
For the webdav server we chosed apache 2.0, on a smooth linux box.

WebDAV userful things you can do on Mac:

  • Altrought slow, you can export photos from iPhoto to a webdav disk.
  • Some guys as found a way to  hack MobileMe-iDisk to map to a user-defined iDisk
  • We also managed to clone a mercurial repository in this hybrid way, which can avoid installation of the mercurial cgi, simpl

Limits:

  • It is tricky to map symbolic links, even if apache is configured to follow it.
  • Configuration can be a pain on Linux.

SSHFS

We have also tried sshfs, after reading this very clear blog.

The main advantage of sshfs is its simplicity: we reuse an ssh connection, via a “fuse” driver.
We tried two version: a mac port version and the google static linked version.

[Updated on May 2010] For Linux Ubuntu users try out also this detailed explanation

If you need to use it on windows, it is bit difficult. We only find this japanese port of fuse for windows.

DavFS vs Ssh-FS

We tried a “find” on an idisk, to check performance. Both ends (client and server) was linux machines, with the server exposed to the  internet.

Sshfs is easier to set up: you can reuse your ssh keys. WebDav is a bit complicated to set up on linux: the manual pages lack of examples, but this article solves our problems.

The DavFS was connected in https. It takse about 3,5 minutes to scan 2175 files, with about 0,097 seconds per file.

SSHFS takes a bit less, about 3 minutes and 24 seconds for about 0,094 seconds per file.

Then we try a disk usage (du). We have done the tests two times in sequence, to test also the overall caching provided by the two file systems.

Operation WebDav SshFS
du on 2175 files 2m33,8s

2m32,3s

3m24,6s

3m24,9s

So far, sshfs seems a bit more fast, but it is less easy to set up on windows. WebDav on the contrary uses http, which is a more compatible protocol.

On Macosx sshfs seems slower then webdav, perhaps because  webdav is developed as a kernel module, while sshfs uses macfuse driver.

2 thoughts on “WebDAV versus Sshfs

  1. Thank you for the quick and dirty comparison – this was written a while ago do you have any thoughts since then on performance? I am struggling to use WebDav as a filesystem and Eclipse IDE to develop on the server directly.

  2. Hi Daniel, in my huble opinion SSH is still a strong protocol. For instance, I have issue checking out a big subversion project via WEBDAV (connection errors, drops etc) but no problem with git+ssh. So the ssh transport is far more stable. Http is very good for fast and small connections, and network file system seems not fit so well

Leave a Reply