阅读60 返回首页    go iPhone_iPad_Mac_apple


AFP vs SMB Performance

I've just updated to the latest release of Sierra.  I thought I had read somewhere that SMB was preferred over AFP in Sierra and that the performance would be improved.  I see no improvement.  My results are so drastically different, I thought I would post to see if someone else can tell me why my SMB performance is so abysmal???

 

I have a Mac Pro (non-cylinder) on a wired gigabit home network.  Synology DS412+ NAS running 4 disks in RAID 5.  I mounted this my my Mac using the basic "Connect to Server" option in Finder and typing in "afp://server:share" and "smb://server:share" for the tests.  Both were mounted and tested separately, meaning I disconnected AFP before mounting and testing SMB.  I used rsync with some verbose options to copy one 1.5GB file in order to see the speed and get some transfer stats.

 

Here are the stats for transferring the file over AFP:

 

[josh@jeter /joshtmp] --> transfer diskimage.ISO /Volumes/FILES/tmp/

building file list ...

1 file to consider

diskimage.ISO

      1.49G 100%  52.18MB/s    0:00:27 (xfer#1, to-check=0/1)

 

 

Number of files: 1

Number of files transferred: 1

Total file size: 1.49G bytes

Total transferred file size: 1.49G bytes

Literal data: 1.49G bytes

Matched data: 0 bytes

File list size: 121

File list generation time: 0.002 seconds

File list transfer time: 0.000 seconds

Total bytes sent: 1.49G

Total bytes received: 42

sent 1.49G bytes  received 42 bytes  52.20M bytes/sec

total size is 1.49G  speedup is 1.00

 

I think that's a pretty decent speed, but my concern is not the top speed, it's the disparity.

 

Here's the SMB speed:

 

[josh@jeter /joshtmp] --> transfer diskimage.ISO /Volumes/FILES/tmp/

building file list ...

1 file to consider

diskimage.ISO

      1.49G 100%  18.02MB/s    0:01:18 (xfer#1, to-check=0/1)

 

 

Number of files: 1

Number of files transferred: 1

Total file size: 1.49G bytes

Total transferred file size: 1.49G bytes

Literal data: 1.49G bytes

Matched data: 0 bytes

File list size: 121

File list generation time: 0.001 seconds

File list transfer time: 0.000 seconds

Total bytes sent: 1.49G

Total bytes received: 42

 

 

sent 1.49G bytes  received 42 bytes  18.71M bytes/sec

total size is 1.49G  speedup is 1.00

 

Also, here is the statshare info to see how it was mounted:

 

[josh@jeter /joshtmp] --> smbutil statshares -a

 

 

================================================================================ ==================

SHARE                        ATTRIBUTE TYPE                VALUE

================================================================================ ==================

FILES

                              SERVER_NAME                  rivera

                              USER_ID                      1026

                              SMB_NEGOTIATE                SMBV_NEG_SMB1_ENABLED

                              SMB_NEGOTIATE                SMBV_NEG_SMB2_ENABLED

                              SMB_NEGOTIATE                SMBV_NEG_SMB3_ENABLED

                              SMB_VERSION                  SMB_3.0

                              SMB_SHARE_TYPE                DISK

                              SIGNING_SUPPORTED            TRUE

                              EXTENDED_SECURITY_SUPPORTED  TRUE

                              LARGE_FILE_SUPPORTED          TRUE

                              CLIENT_REQUIRES_SIGNING      TRUE

                              DFS_SUPPORTED                TRUE

                              MULTI_CREDIT_SUPPORTED        TRUE

                              ENCRYPTION_SUPPORTED          TRUE

                              SIGNING_ON                    TRUE

 

 

-------------------------------------------------------------------------------- ------------------

 

Also, attached is a screenshot of my share settings from the Synology.  It shows both the SMB and AFP settings.  The pop-out box is the "Advanced Settings" options from the SMB section.

 

Any ideas at all????  Please and thank you.

 

See Image Here.



It seems that Apple still has not fixed their "quick and dirty" fix for Badlock as described in this thread: El Capitan 10.11.5 update SMB slow (bug)

 

If you believe that your network is secure from man-in-the-middle attacks and the Badlock bug, then you can disable client signing.

 

  1. Create a nsmb.conf file in /etc with vim. sudo will be required.
  2. Write into the file:

[default]

     signing_required=no


Then restart your machine. Your SMB3 speeds should be comparable to AFP again.


Here's the earlier post: Re: Re: Re: Re: El Capitan 10.11.5 update SMB slow (bug)



I'd try nfs if all machines are running Unix/linux.

to setup use NFS Mananger

https://www.bresink.com/osx/NFSManager.html

https://www.youtube.com/watch?v=6z38skeXb7U

 

Were both machine running Sierra.  Could make a difference.

 

R



I'll try the signing thing when I get a chance.

 

I was using NFS for a while.  The problem is that you cannot edit Microsoft Office files (.dotx, .xlsx, etc) from an NFS share on Mac.  When you open the file it tells you that it is locked and/or in use by another user and available for read only.  It's a pain.



Worked perfectly.  Avg transfer speed over the SMB after the change was 56MB/s.

 

Thanks!



Unfortunately, this does not compare to transfer speed of Windows at 110MB/s. A problem I am trying to figure out - details of my testing here: https://www.tech-knowhow.com/2017/01/mac-os-network-transfer-speed-still-broken- sierra/



I have just bought 2 thunderbolt-to-10gbps Ethernet adapters to connect my MacBook Pro to a Mac Mini used as a file server. Even with the signing fix, the implementation of SMB3 still *****. AFP provides slightly higher throughput, and folder listing is WAY faster with AFP! I have lost my nights googling on the Internet for a solution, but apparently we are out of luck :-(



最后更新:2017-09-16 16:34:14

  上一篇:go Unknown phantom "Mobile Device" claims to be co...
  下一篇:go How can I recover deleted video files from a ba...