afp server issue - very hign cpu load

hallo

i googled an searched this forum al long time but i found no solution.

my problem is that my os x 10.5.4 server with about 30 networked homeddrive users have an issue with the afp server. the afp server process uses all 8 cores of this newest intel xserve with 14 gigs of ram installed. when this happens all users get an spinning wheel. the incoming network traffik is reduced to some kb´s.

ok all users shut down there clients - restart server and about 30 minutes later i have the same problem.

i have dumped the network traffic with wireshark and there i see some tcp retransmissions.
now i need someone who can help me analyse the wireshark protocol, because i cant´s handle that.

so if there is someone out there who can help me plz send me an email to support@premedia.at so that i can send you the wireshark log.

thank you in advice

Macbook Pro, Mac OS X (10.5.4)

Posted on Aug 29, 2008 2:47 AM

Reply
279 replies

Jan 13, 2009 11:01 AM in response to Manfred Rumpl

Just wanted to signal a "we too" on this problem.

What is strange is that the server has had no issues up until 2009 (Jan). The server was bought in Sept 2008 and has been running great up until this week.

We went from 5 spikes an hour to about 1 every 3-4 by performing the following:

1. Setting AFP wan threshold
2. Turning off spotlight on server by marking AFP volume as private
3. Turned off Time Machine even though no backup volumes where defined
4. Set kern.maxfiles=200000 and kern.maxfilesperproc=5000 sysctl's
5. Turned DS_Store off on both clients and servers
6. Turned off smb (windows samba) file server

However, one spike every couple of hours still has our production / design folks screaming so we really need a resolution to this problem. Will be happy to test anything reasonable that comes across this thread.

Jan 13, 2009 11:52 AM in response to sullrich

From the continuing posts on this problem, it appears that this problem is quite extensive. As I indicated earlier, I just don't get an up/down spike, I get a spikes that remain at 100% on a core until we kill the AFP (AppleFileServer) process. 6 of our 8 cores were pinned this morning with AFP @ 600%.
I am working with an Apple Engineer on this issue. If you have an Apple support contract, I strongly suggest opening a support call and escalate immediately to their backline engineer support group. We need to work towards resolution with their assistance as none of the measures we (and everyone else on this discussion) have implemented up to this point have resolved the issue.
This morning, with Apple's recommendation, we implemented a different version of the AppleFileServer binary supplied by Apple and will be forwarding a process sample the next time we have a spike.
Will keep everyone informed.

Jan 13, 2009 12:31 PM in response to md2298

We where seeing the same thing where every core would max out at 100% pushing AppleFileServer to 800% usage. After all of the changes listed above the problem is not as severe but still occurs from time to time. The only difference was that our maxed out CPU's would never last for more than 5-9 minutes. Maybe we are just lucky but it is very much a major problem for us (and other folks it appears).

null

Jan 13, 2009 12:54 PM in response to md2298

I don't mean to sound like a broken record but has anyone tried to change

afp wanquantum = 131072
afp wanthreshold = 1000

on the 10.5 machines?? I did it on Monday and today we had a very very busy day on the network and nothing, no freaken problems, not AFP crashes, things are good but again please more people try it.

its 10.5 clients

cheers

rob

Jan 13, 2009 1:10 PM in response to sullrich

Okay I think there are two issues here. Some people are just having intense CPU when the server is being used. But some people are seeing crazy full weird 800% (or whatever) on just the AFP service and it never going down, to the point where you have to restart the server.

Now spikes when you have people using the servers is fine, its a server, it does that. The problem that for me and the reason why I posted here is because I was having major problems like

md2298
Timothy Stewart

and a few others. Where the CPU would go up then it would bring the server to 100% for each CPU, so 100% to 800% depending how many CPUs were in the server.

Now my servers now are spiking up and down depending when I have students logging in or whatever, but its not staying up all the time.

People who have the issue where AFP takes everything from the server and then it brings everything down, please try to check your clients to see if they are set properly, once I did that I seem to not have this run away CPU problem with the AFP service. It has been only one day with very crazy usage but I would like more feedback.

thanks

rob

Jan 13, 2009 1:14 PM in response to Rob@Bis

We have very similar problems. Never before would the server ever use more than 2-3 CPU's at once for AppleFileServer. As of Jan 1st we have spikes that reach 800% and during that time clients receive the "beach ball" and have to wait it out (all of them do!). Of course a server is going to vary in spikes from time to time but like I said, this was never a problem like this until Jan 1st.

Nothing has changed on the clients or the servers. Nothing.

Jan 13, 2009 2:37 PM in response to Manfred Rumpl

I had this problem when Safari 3.2.1 came out and my 450 clients all check our update server and downloaded it. On every client that reported a problem they were using Safari. Since then I have disabled Safari in Workgroup Manager and moved everybody to Firefox and for the last month I have not had any issues whatsoever. I have six Xserves serving home folders and they run 10.5.6 and the clients are 10.4.11 and 30 of those are on 10.5.6 as an "experiment".

Jan 14, 2009 1:34 AM in response to Mathew Hennessy

hi all 😉

first of all @md2298
it is realy nice to here that apple is testing with an new apple fileserver.

here is what i tested:
i traced applefileserver an what it is doing when the cpu spikes up.
you can try doing this with sc_usage PID (applefile server pid)

it seems the systemcall swtch_pri is going up very high at this time.
but i don´t know what is causing this or if it´s the result of the high cpu usage
maybe someone has some knowledge about this system call.

here you find an simple decription of this call:
http://www.gnu.org/software/hurd/gnumach-doc/Hand_002dOff-Scheduling.html

maybe someone has some knowledge on dtrace and how to monitor the systemcall switch_pre
and post the right syntax here.

also an german mac website take care about our discusion...
http://www.mactechnews.de/news/index.html?id=143026

Jan 16, 2009 8:09 AM in response to Eric Browning

Same problem Here,

overhere Server = quad-core xserve-10.5.6 (freshly installed last friday) ran perfectly till yesterday, 15 afp-clients server-load:
localtime 15:22 load averages: 15.49 14.94 14.26
localtime 16:53 oad averages: 19.67 19.58 18.94

size shared volume = 5 Tb
subnet various client 172.16.107.x
subnet server 172.16.100.x

clients mostly 10.4.11, some 10.5.x

So What's do you guy's have ? (i'm afraid size of volume and / or subnet might have to do with it......)

looking forward to ur responses, kind regards from The Netherlands.

Jan 16, 2009 1:28 PM in response to MrBelloNLD

We are having the same problem. AFP taking all the CPU after just a short time of useage and then never letting it go. Illustrator

Server is an iMac C2D running 10.5.6 server, we have changed out RAID for a HD, no effect. Users are only using the serve for filesharing, no other features. illustrator is the issue with us, trying to save a file during the 200% CPU senario can lock up a clients Illustrator CS3 and a force quit results in illy and freehand and sometimes filemaker pro all locking up and pot force quit they are still open in the dock but not in activity monitor - only a hard restart will recover the client 😟

Just started since the update to 10.5.6, before it was operating correctly

Applefileservice always has 202 threads, and at first uses little cpu and quickly in an hour or two is 80-90% and within a day or two the machine is at 200% with applefileservice using all thats available.

Users 5 that access the files erver regularly, another 10 that rarely access. Were all 10.5.6, some i downgraded to 10.5.4 but no effect.
Services on are AFP, SMB (for one PC), DNS, Firewall

I tried the spotlight deletion and no effect, i have just tried the threshold and will report back

is the 202 threads on restart and always unchanging expected?

EDIT: the WAN threshold changes had no effect - as soon as a few people logged in the Applefileservice is up to 98% cpu, if only i knew what made it jump to 200% that might be a clue.

null

Jan 17, 2009 2:18 AM in response to Eric Hilferding

but you are doing the afp wanquantum = 131072 and afp wanthreshold = 1000 on your 10.5 clients right? So every wired client should have these settings. And then the clients should be restarted.

Also in Activity monitor its the AFP service that is taking all the CPU right?
What is the hardware in your server, and how much RAM do you have, for you could increase the treads that AFP services takes..

sudo serveradmin settings afp:maxThreads=400

then restart the server. You will notice that in top or activity monitor it will take 400 threads right off the bat, actually it will be 402 threads.

Let me know how it goes, I will try to help.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

afp server issue - very hign cpu load

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.