OS X AFP Errors Causing Slow Performance?

Connecting to a share via Apple File Protocol (AFP) on my Mac, I’ve experienced slow performance listing large directories and have had a few instances of Time Machine corruption. I decided to fire up Wireshark and see if anything was off.

With directory enumeration, I see repeated errors – typically at least one for each file in the directory – in addition to repeated errors with Time Machine (error descriptions below from Apple’s AFP Reference Guide):

File Share Errors (Viewing directory in finder)

-5014: FPGetExtAttr: Non-AFP error occurred

-5025: FPGetFileDirParms: Input parameters point to the wrong type of object

Time Machine Errors

-5018: FPEnumerateExt2: Input parameters do not point to an existing directory, file or volume

-5019: FPGetExtAttr: (Long description, basically one of the parameters was wrong)

Are these somehow normal? Or could they be the cause of the slow performance I’m experiencing? I’m running the latest firmware and have disabled the thumbnail generation process discussed in another thread.

Edit: Formatting, clarity

I’m happy with the drive in many ways and regardless I’ve had it too long to pursue a refund. It’d be great if someone knowledgeable could help explain these errors.

Did you tried using smb (samba) instead AFP?

@sammarbella thanks for the reply. I thought I’d tried connecting via SMB before but I just tried it again and it did the trick: on a large directory (over 5000 files, each about 500k) AFP took about 5 minutes to enumerate the directory whereas SMB took 30 seconds. Thanks again for the suggestion.

It’s possible that AFP is faster than SMB in other scenarios I haven’t yet tested (streaming, file copying, etc) but we’ll see.

Also, for the benefit of anyone else encountering this issue, @DTrace’s suggestion also significantly improved my performance:

/etc/init.d/wdmcserverd stop
/etc/init.d/wdphotodbmergerd stop
# update-rc.d wdphotodbmergerd disable
# update-rc.d wdmcserverd disable