I'm trying to debug performance issues on a SmartOS joyent_20140613T024634Z 
server that is running netatalk in a zone.

After some investigation with the help of netatalk developer Ralph Böhme, I 
find that the netatalk afpd is spending a very long time in the syscall

        getcwd()

in some cases. Ralph provided a Dtrace script which breaks down the time spent 
in various syscalls, and getcwd() seems to be the major bottleneck here. I've 
attached an excerpt of the Dtrace analysis below.

Is there any reason why getcwd() should take a long time? Disk I/O does not 
appear to be an issue. For reference, I got similar results before and after 
starting a zpool scrub on the zones pool, and the scrub is proceeding at 940 
MB/s.

Further background on the issue is discussed here:

        <http://sourceforge.net/p/netatalk/mailman/message/32660961/>

and the full output of the Dtrace script is here:

        <https://gist.github.com/ferebee/99016ccd293b3f616c77>

All sugestions are most welcome!

Thanks,
Chris


===== Quick details: =====

The server is a dual Xeon E5-2620 with 128 GB RAM, LSI 9211 SAS controller, 24 
SAS disks in 12 x 2 mirrors + ZeusRAM, running SmartOS joyent_20140613T024634Z.

I compiled netatalk 3.1.2, and it works as expected except for a major slowdown 
in the Finder of clients running OS X 10.9. While the slowdown is probably 
triggered by inappropriate behavior of the Finder (which loops continually over 
the AFP share, performing calls to 

syscalls elapsed time average
=============================

  getuid                                                            0
  lwp_sigmask                                                       1
  seteuid                                                           1
  fstat                                                             2
  close                                                             3
  fcntl                                                             3
  recv                                                              3
  setcontext                                                        4
  setitimer                                                         5
  unlink                                                           11
  acl                                                              12
  read                                                             13
  rmdir                                                            14
  getdents                                                         15
  open                                                             17
  send                                                             18
  writev                                                           19
  statvfs                                                          31
  openat                                                           36
  chdir                                                            40
  lstat                                                            40
  sendfilev                                                        42
  stat                                                             48
  pollsys                                                         426
  getcwd                                                        94245



-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to