Articles September 5, 2006 at 2:42 pm

AFP. It’s really quite good (part #2)

So a while ago we put together an article on tuning your AFP server for OS X Server.

I’d been promising part #2 for a while, just to cover some odds and ends, but there has been a major development which made a lot of that work redundant, namely the release of the Universal version of OS X Server 10.4.7.

Read on for some perhaps surprising results…So when Apple announced the new Intel Xserve, they obviously found themselves in a position where they needed to release an Intel version of OS X Server. As it turns out, Apple decided to release a Universal version of OS X Server 10.4.7 that will happily install on both Intel and PPC machines.

The surprising part is that there are some significant differences between the PPC and Universal versions of OS X Server 10.4.7. I’m not going to cover all of them here, but am instead going to concentrate on the changes to the AppleFileServer.

For those of you who have been experiencing AFP server issues throughout the 10.4.x series, we have good news and bad news.

Good News: The Universal version of 10.4.7 Server provides a far more robust AFP server than the PPC version, one that performs better under heavy load, high numbers of connections, and with directories that contain many thousands of items.

Bad News: At this stage, if you get your hands on a Universal install of 10.4.7 Server, you have to do a clean reinstall. Here’s my best impersonation of an Apple employee (and I’m not even one… πŸ™‚ :


I can’t comment on any future products.


However, one would assume that we’ll eventually see these changes rolled into a future update for OS X Server 10.4.x PPC, which would make deployment easier.

So as we don’t have access to the source of the AppleFileServer, it’s very much a black box, and there’s no real way to tell exactly what changes have been made. From looking at the binary itself, the PPC side is much smaller, as we see below once we’ve used ‘lipo’ to split the fat binary into two.

nigelkersten@qualia: ~ $ ls -l PPC_version/AppleFileServer 
-rwxr-xr-x   1 root  wheel  1443224 Sep  6 05:54 PPC_version/AppleFileServer
nigelkersten@qualia: ~ $ ls -l Universal_version/AppleFileServer 
-rwxr-xr-x   1 root  wheel  1972432 Sep  6 05:55 Universal_version/AppleFileServer
nigelkersten@qualia: ~ $ lipo -info Universal_version/AppleFileServer 
Architectures in the fat file: Universal_version/AppleFileServer are: i386 ppc 
nigelkersten@qualia: ~ $ lipo -thin ppc Universal_version/AppleFileServer \
-output Universal_version/AppleFileServer.ppc
nigelkersten@qualia: ~ $ lipo -thin i386 Universal_version/AppleFileServer \
-output Universal_version/AppleFileServer.i386
nigelkersten@qualia: ~ $ ls -l Universal_version/
total 7704
-rwxr-xr-x   1 root      wheel  1972432 Sep  6 05:55 AppleFileServer
-rwxr-xr-x   1 nigelker  staff   956616 Sep  6 05:55 AppleFileServer.i386
-rwxr-xr-x   1 nigelker  staff  1009872 Sep  6 05:55 AppleFileServer.ppc

As we can see, the OS X Server 10.4.7 PPC AppleFileServer binary is about 1.4Mb in size, whereas the PPC side of the Universal 10.4.7 version is about 1Mb. This would suggest that a fair bit of refactoring has gone on, and poking around with otool seems to confirm this.

As far as real world results go, even after all the tweaking I’d gone through with my AFP servers as shown in the first article, I kept hitting problems with certain patterns of usage. These issues would crop up at any point after about 80 concurrent connections, and the symptoms are probably all too familiar to a lot of you… The AFP server would grind to a halt, network home directory users would start beachballing, and while all other services would continue to function normally, the AFP service would require a restart.

Those of you who have raised AFP issues with Apple support may have been quoted a rather low number for the number of concurrent connections they suggest. My experience with the Universal version is that the limit is well above the kinds of figures Apple have been quoting to people.

I haven’t seen any of these slowdown issues since installing the Universal version on my AFP servers. Previously I’d see a noticeable degradation of performance as soon as more than 40 concurrent connections were made, although performance would still be adequate up until about 150 connections or the dreaded slowdown.

With the Universal version so far, performance seems to be about the same until I hit 120 concurrent connections, and even then it’s only slightly degraded. You might think these numbers are much lower than the ones I was talking about in the first article, and that’s primarily due to me being forced to cut down the number of automounts and to shift my group folders to a dedicated server.

So far the highest number of concurrent connections I’ve hit is 190, and at these levels performance is still far superior to the PPC version at about 40 connections. This is for a dedicated home directory server for my students, so user sessions are continually being created and destroyed, and as I’m in a heavy multimedia environment with 2Gb home quotas, there is a reasonable amount of traffic. Network traffic has never been the bottleneck for me however.

Another difference I’ve noticed is that for the same patterns of usage, the number of concurrent connections seems to be lower in the Universal version compared to the PPC one. I’m not quite sure why this is, but it does generally seem as if the Universal version is more sane with regard to disconnects and automounts.

So in short, if you’re having AFP issues, try and get your hands on the Universal version of 10.4.7 Server. If you’re a premium ADC member you should be able to download it, and if you’re subscribed to a volume licencing program, you should also be able to get it somehow. If you don’t fall into either of these two groups, but you own licences of 10.4 Server, you may have some luck contacting your Apple rep and talking to them. Otherwise you can try and wait and see if a future PPC 10.4.x update contains the same improvements.

You might remember a tweak in the first article relating to the maxThreads setting of the AFP server. Apple have actually since put up AppleShare performance tuning for client and server article that covers this. This setting appears to have disappeared in the Universal version of 10.4.7 Server, and I haven’t tried applying it as there has been no need.

The one change I have made to the standard config has been to disable session reconnects, as they’re not a particularly useful feature in my environment, and I did notice stability improvements when I did this for the PPC 10.4.7 AppleFileServer. Apple have documented this quite nicely in this article: Understanding the “disconnect when idle” feature for AFP connections, so I’m not going to repeat that here.

Thanks must go to my Apple Consulting Engineers here in Australia who have been working with me on these issues and who promptly let me test out the Universal version as soon as they could.

No Comments

  • Rumour from Dave’s in San Fran is 10.4.8 for the rest of us mortals. πŸ˜‰
    More Tequila, Nigel?

    root@server: ~ $ uptime
     4:57  up 27 days, 48 mins, 2 users, load averages: 0.03 0.12 0.10

    So I haven’t had to restart AFP (or the servers themselves) on either of my
    home directory servers for over 3 weeks …. which is something I haven’t been
    able to say for a long time.

    Right now is a really heavy load for my servers as well, as the students are all
    in the labs a lot.

  • Hello,

    Is there any news on whether these issues have been addressed in PPC Server 10.4.8? We experience periodic file system crashes and I want to know if I should implement the fixes in part #1 or if I should look elsewhere.

    Thank You

Leave a reply

You must be logged in to post a comment.