apple mac os x, nfs, and the finder = slow

| 3 Comments

here's a tip to anyone planning to use nfs with mac os x through the finder: don't do it!

i mentioned on here i was helping a friend build a linux server with a 2 terabyte raid system (at least i think i mentioned it). well, i finished it last week. i decided nfs would be the easiest path for sharing out the data. i tested it at home on my mac -- it mounted, i could see the files, i created a directory. functionally, it worked.

i took it to my friend's place of business and (after reconfiguring his network setup) we brought it online. he went through the finder and used Go -> Connect to Server to enter nfs://linux.box.ip.address/folder and it mounted. he dragged some big folders and his mac said it was going to take some ungodly number of hours. maybe it said days. i mean, it was SLOW.

after mulling it over for a couple of days, i decided to troubleshoot it. we used a 2 gig file and i did ftp transfers, then nfs mounted from the command line and did copies (cp) from the command line. ftp vs. nfs performance was about the same, and pretty decent. as soon as we went into the finder to do a drag-and-drop transfer, the time increased by a magnitude of 10. seriously. the same system, using the command line, copied 10 times faster than through the finder. after discovering this, i did some google searches and found a few other people that have noticed the same thing. (the systems we used are 10.4.8/ppc, btw. since this the first time i've tried to use nfs with mac os x, i'm not sure if it got borked in recent revisions, or if this has been a long time thing, or if it doesn't happen to everyone.)

so i decided to use something besides nfs on the linux box. i contemplated smb and afp, and on a whim decided to give afp a shot. (i'm rather familiar with samba, having used it since 2000 or so, but i figured i'd try out netatalk since this is in a mac shop.) netatalk/afp functioned nominally. (i may do a performance comparison later against samba.) sorry nfs, i don't think it's your fault.

in a completely unrelated mac happening, a few weeks ago i plugged my griffin imic into my power mac and it worked. huh? it'd stopped working back in late july last year (2006), seemingly coinciding with my update to 10.4.7. i contacted griffin tech support and they offered no help, really, other than maybe it was too old or maybe it had died. now, months later, i plug it in and it works just fine, as if nothing had ever been wrong. i wonder if they fixed something in 10.4.8? or if it was something else that caused it to not work over several days/weeks of me mucking with it, then magically working months later? whatever the case, i'm enjoying being able to use it again. i'm also glad i didn't toss it months ago.

3 Comments

Try exporting NFS with async option it works fine...

thanks for the suggestion, pandurang!

i actually came across suggestions to use async mode while i was looking into what might cause the slowness, but the possible danger with it (losing changes and the client not knowing it, if the server crashes) caused me to decide against it. while it may be unlikely, i'd hate to have set up a system that caused someone to lose data because i chose speed -- as long as i can get good performance with some other method that doesn't have the same risk.

i still have the email i cut and pasted the web text into when i was emailing my friend about it, but unfortunately i did not include the url.

a bit of google from the text in my email found the page: http://www.bresink.com/osx/143439/Docs-en/Notes.html

It's worth noting that NFS's warnings about data loss apply to all networked filesystems. The sync mode is intended to stop applications that would otherwise abort and leave data in an undesired state.

AFP, CIFS (formally Samba) and company all have the same caveats. All NFS does is force an application to wait for confirmation.

Not that I'm an NFS advocate; I think it's sad how badly it performs even when exporting with async. Mounting my NFS export over my VPN is like swallowing a whole cactus. But I only trust NFS to maintain correct permissions and ownership while I'm editing, creating, and deleting files on my Linux server...

my twitter feed

stuff about me