Netatalk at 100% CPU

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
A few weeks ago I noticed, running top, that netatalk is always on top and shifting between 95 - 105 % WCPU.
top.PNG


Just a few minutes ago, I upgraded to 11.2-U4, but there is no difference to this.
I am running AFP for TimeMachine purposes, so I guess that´s why it´s there.
Tried restarting the AFP service, but I cannot stop it. Not in the GUI, not by running service netatalk stop, killall netatalk or kill 3368(pid).

The system rebooted in the upgrade process, so that did not help either.
Does anyone know how to fix this, or if it is no problem at all and I should just let it go?
Seems strange to me, but maybe it is the expected behaviour?
 
D

dlavigne

Guest
Please create a report at bugs.ixsystems.com that includes a debug after the system exhibits this behavior, and post the issue number here.
 

seanm

Guru
Joined
Jun 11, 2018
Messages
570
This doesn't really address your issue, but are you aware that you can now to Time Machine over SMB?
 

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
@seanm Yes I saw that. But since I already have this setup and working, I´d like to keep it rather than setting it up over again? I assume it´s not a matter of simply switching?

@dlavigne I´ll look into that. Include a debug sounds easy, but what does that mean exactly? What information is it and how do I get it from the system?
 

seanm

Guru
Joined
Jun 11, 2018
Messages
570
@seanm Yes I saw that. But since I already have this setup and working, I´d like to keep it rather than setting it up over again?

Of course, your old setup should work, I just pointed it out as an option.

I assume it´s not a matter of simply switching?

Not sure, I never used FreeNAS time machine with AFP.
 

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
@seanm Looking further I noticed that my existing TimeMachine does not work anymore. So now I am trying to get one going over SMB.
I have set up a new dataset with a windows type share, set the permissions and everything, the correct user can read and write to that directory.
But the Macbook cannot find it as a Time Machine.

There are a few steps that I´ve taken in order to get it going, according to this thread:
https://www.ixsystems.com/community/threads/smb-share-macos-timemachine.64440/
1) Enable vfs_fruit on all SMB shares
2) set the parameter "fruit:time machine = yes" as an auxiliary parameter for the SMB share.
3) restart the SMB service via the UI.

What am I missing? Why won´t it show up on MacOS? Any particular version I need there?
The Mac can open and see the contents via smb://path no problem...
 

seanm

Guru
Joined
Jun 11, 2018
Messages
570
What version of FreeNAS? You don't need the "fruit:time machine = yes" aux parameter, there's now a simple checkbox.

If you run 'dns-sd -B _adisk._tcp' in Terminal on your Mac, do you see your FreeNAS advertizing Time Machine over Bonjour?
 

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
What version of FreeNAS?
11.2-U4

You don't need the "fruit:time machine = yes" aux parameter, there's now a simple checkbox.
I assume that´s the Time Machine checkbox? That´s checked.

If you run 'dns-sd -B _adisk._tcp' in Terminal on your Mac, do you see your FreeNAS advertizing Time Machine
I think so. I get this:
macbook.PNG

Any thoughts?
 

seanm

Guru
Joined
Jun 11, 2018
Messages
570
Yup, so it's advertizing itself as a Time Machine. It doesn't show in System Preferences > Time Machine? (Did you try a magic reboot?)
 

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
Nope, not showing up in System Preferences > Time Machine.
It´s my wifes macbook, and she´s reluctant towards rebooting.
So, I googled, sort of alot, and found this:

https://www.makeuseof.com/tag/turn-nas-windows-share-time-machine-backup/

then, on the hidutil command I added -volname to set the name showing up in Time Machine.
Worked beutifully. Now backing up. And hey, no reboot :)

Thanks so much for the help!
 

stin9ray

Cadet
Joined
Oct 27, 2015
Messages
6
Hi everybody,

I have been trying to tackle a 100% netatalk CPU hog for a while. Previously I simply gave up letting it hog one of the 8 cores on my machine.

current system: FreeNAS-11.2-U6
but the issue has persisted across various 11 releases for a while.

Having that said, I may have found the issue:

/etc/local/afp.conf had an old bind IP address listed (afp listen = ) that the system no longer uses after an IP migration. The new IP address was in there as well. The old IP address does not show up in the web UI, so it can't be deselected there.

As a workaround I manually edited /etc/local/afp.conf and removed the old IP address from the "afp listen =" line while keeping the correct one.

I was unable to stop the afp service via the web UI. To get it back under control I used the following on a root shell running bash:
Code:
# send SIGTERM to all netatalk related processes
ps auxwww | egrep '(/netatalk|/afpd| dbd |/cnid_dbd|/cnid_metad)' | grep -v egrep | awk ' { print $2 } ' | xargs kill
sleep 5
# send SIGKILL to everything that survived round 1
ps auxwww | egrep '(/netatalk|/afpd| dbd |/cnid_dbd|/cnid_metad)' | grep -v egrep | awk ' { print $2 } ' | xargs kill -9
# restart the service
service netatalk status
service netatalk start
service netatalk status


I raised bug report: https://jira.ixsystems.com/browse/NAS-103297?filter=-2

Hope this helps somebody else.
 
Top