WebDAV versus Sshfs
At Gioorgi.com we evaluted a internet file systema 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.
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.
Related posts:
- Mastering clusters of Unix machines part1: the right VM One day, we have the need to create a fast cluster of linux machine, specialized and easy to segragate in...
- Mastering clusters of Unix machines part2: the right tools After working with unix for years, we noticed it is difficult to get a very uniform approach to unix management....
- Designing Interfaces with Balsamiq In the last seven months I have the need of sketching a bunch of interfaces, but I cannot find a...
- Interactive map of Linux kernel Slashdot reported an interactive map of the Linux kernel: Interactive map of Linux kernel. Slashdot comments here Happy Friday Hacking!...