DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-10-08 21:22:46

ericlitman
Member
Registered: 2007-06-04
Posts: 22

SOLVED: Poor Mac OS X SMB Performance

I've been seeing abysmally poor performance from my Macs connecting to a DNS-323 via my 802.11n Airport Extremes, while other devices on the same network have been working without issue. Some quick Googling for 'OS-X samba performance' lead me to try tweaking a few TCP stack parameters, with one change resulting in a dramatic performance improvement: setting delayed_ack to zero.

To test it yourself, start up a large transfer from your DNS-323 that would normally take a considerable amount of time. If you have a bandwidth monitoring tool, use it to measure performance objectively (I like iStat Menus for basic traffic monitoring). While the transfer is in progress, type the following:

sudo sysctl -a | grep net.inet.tcp.delayed_ack

You will see that the default value is set to 3. Now change it temporarily (will reset on reboot or if you set it back manually) to zero:

sudo sysctl -w net.inet.tcp.delayed_ack=0

If this affects you, you'll see an immediate and dramatic jump in the speed of your transfers. Mine went from fluctuating between ~60KB/s and 300KB/s to between 4MB/s and 5MB/s (yes, that's a capital 'B'.) You can switch back to the original setting by specifying a 3 instead of a 0:

sudo sysctl -w net.inet.tcp.delayed_ack=3

Switch back and forth to verify that the change does affect you. If so, you'll probably want to make the change permanent.

Add the following line to /etc/sysctl.conf:

net.inet.tcp.delayed_ack=0

Let me know if this helps anyone.

-Eric

P.S. Blogged about it here: DNS-323 Mac OS X Performance

Last edited by ericlitman (2007-10-10 01:48:57)

Offline

 

#2 2007-10-10 08:23:55

Speijk
Member
Registered: 2007-08-27
Posts: 36

Re: SOLVED: Poor Mac OS X SMB Performance

That is interesting! Will try this on my MacBook pro soon.
Does it also work on a desktop Mac or is it just wireless related?

Offline

 

#3 2007-10-18 14:51:15

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: SOLVED: Poor Mac OS X SMB Performance

I did try this both over wireless and over gig ethernet.

Either way I get aprox 10-12 MB/s over gig ethernet and aprox 1/4 over wireless.

Do you run the latest MacOS X?

Offline

 

#4 2007-10-18 19:46:07

ericlitman
Member
Registered: 2007-06-04
Posts: 22

Re: SOLVED: Poor Mac OS X SMB Performance

Yep, 10.4.10 with 2 AirPort Extremes (pre-GigE) meshed over 802.11n.

Offline

 

#5 2007-10-18 22:19:03

frodo
Member
From: Stockholm, Sweden
Registered: 2007-01-17
Posts: 259

Re: SOLVED: Poor Mac OS X SMB Performance

I have two Airport Expresses. And Gigethernet backbone. And 10.4.10 on a Mac mini and a Mac Book Pro.

Offline

 

#6 2008-02-01 00:57:18

kerguio
Member
Registered: 2008-01-30
Posts: 7

Re: SOLVED: Poor Mac OS X SMB Performance

anyone try this with leopard? Didn't see any noticeable difference myself, and performance is not gooooood.
Additionally, the file /etc/sysctl.conf no longer seems to exist in 10.5...

Thanks

Offline

 

#7 2008-02-03 00:05:44

Amateur
Member
Registered: 2007-12-24
Posts: 8

Re: SOLVED: Poor Mac OS X SMB Performance

Slows transfer down for me a bit. 3 works best, and according to the network monitor 0 also generates traffic to the router quite a bit more.

May help in some cases, but my transfer speed is just fine at 6.24MBps over draft n wireless (Netgear router) big_smile

Offline

 

#8 2008-02-11 15:30:12

Speijk
Member
Registered: 2007-08-27
Posts: 36

Re: SOLVED: Poor Mac OS X SMB Performance

Hi Guys,

I did some performance tests with several delayed ack settings:

This with delayed-ack = 0:
http://www.xs4all.nl/~rloef/Delayed_ack/Speed-tools%20ack=0.jpg

This with delayed-ack = 1:
http://www.xs4all.nl/~rloef/Delayed_ack/Speed-tools%20ack=1.jpg

This with delayed-ack = 2:
http://www.xs4all.nl/~rloef/Delayed_ack/Speed-tools%20ack=2.jpg

This with delayed-ack = 3:
http://www.xs4all.nl/~rloef/Delayed_ack/Speed-tools%20ack=3.jpg

This with delayed-ack = 4:
http://www.xs4all.nl/~rloef/Delayed_ack/Speed-tools%20ack=4.jpg

In general I see no real improvement by using ack = 0. The weird problem with 8k filesizes is solved. But since I use my DNS323 only for very large files (timemachine image) and video this is not relevant for me.

Last edited by Speijk (2008-02-12 16:26:50)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB