Resolving Poor Mac OS X Samba Performance with D-Link’s DNS-323 NAS
Published by Eric Litman on Monday, October 8th, 2007 3:02pm
A few months ago I bought a couple of D-Link’s DNS-323 low-end network attached storage devices as part of my ongoing mission to reduce and simplify the hardware in my home. For about $375 ($175 for the DNS-323 and $100 each for two 500GB hard disks) and almost no setup effort†, you can have 1/2 TB of redundant storage in a small, quiet, Gigabit Ethernet-capable server with some pretty nifty features out of the box. And if you’re a tinkerer with some Linux experience, you can draw from the thriving hacking community supporting it. For the money, I love these little things.
But while my Windows machines communicate with them without issue, performance with my Macs has been abysmal. Even on an 802.11n network, OS X’s average transfer rate is somewhere around 80KB/s. Fortunately, I tracked the problem down to a tunable network parameter tied to OS X’s FreeBSD roots: net.inet.tcp.delayed_ack.
Under 10.4.10, the default value for delayed_ack is 3. If you’re seeing similar performance issues either with the DNS-323 or other Samba servers in general, try setting it to a value of 0:
sudo sysctl -w net.inet.tcp.delayed_ack=0
I recommend doing this while transferring a large file so you can immediately observe any change in performance. To make this setting permanent, add the following to /etc/sysctl.conf (you may need to create the file):
net.inet.tcp.delayed_ack=0
[hat tip to r. i. pienaar's blog]
Greetings. I'm Eric Litman, I'm an Internet entrepreneur, investor and executive, and I run a mobile ad and analytics company called 

Andrew on Saturday, October 13th, 2007
Are you sure about the “requires Windows” part? I don’t remember ever using Windows to format and install the drive. I believe I did everything through the DNS-323’s web interface. But I guess I could be mistaken.
anthony on Saturday, November 3rd, 2007
thank you
Rube on Tuesday, November 13th, 2007
Holy mackerel, nice tip with that sysctl there! My Samba throughput on Leopard just went up 600%.
Patri Friedman on Sunday, November 18th, 2007
Fun to do while copying files. Zooom!
Note: this seems to work in Leopard.
Sean on Sunday, December 30th, 2007
Any ideas what the performance is like on gigabit and/or 100mbps?
gary on Wednesday, January 9th, 2008
Hi,
I just read your post, and I’m seriously in need of speeding this device up, however I have no idea what your talking about. Is there anyway you can explain it in laymens terms.
Thanks
Gary
Steve Brown on Sunday, January 13th, 2008
Hi,
I read your article on the DNS-323 with great interest as I have on with a mac on the network and file transfer rates are poor.
Your solution I’ve seen on other sites and still it remains a mystery for me, not being used to modifying these types of things. Would you do a blow by blow, dummies guide for making this modification as I would love to make this work faster with my mac.
You may consider this already to be very basic, but please I wouldn’t know where to start (Which file, how accessed etc.) Even a reference book where I could read what I’m doing would be helpful.
Please help.
Thanks in anticipation
Steve
dan on Saturday, January 19th, 2008
Hi Eric
I have had nothing but issues- Set up the DNS 323 as a mirrored drive – two 500 gigabyte drives, however, all of my files wont copy. I noticed that any file with a space and or a dot will not copy to the drive for some “windows” reason. Anyway to resolve this? I surely do not want to rename ever file I have which is over at least 100,000 items of data…..
Thank you. ANy help would be most appreciated. Best Dan.
dan on Saturday, January 19th, 2008
PS. by the way I am on a MAC running Tiger’s latest.
Jon on Saturday, January 26th, 2008
Um….I’m not a math major, but I think two (2) 500 gig hard drives would make 1 terabyte, not 1/2. Unless you didn’t hook one of them up and just put it in there because it looks pretty. Last time I checked 500 + 500 = 1000. If that’s in gigabytes, well you get the picture.
dan on Saturday, January 26th, 2008
thanks. But that response wasn’t helpful nor did I mention half… But when you make a raid and mirror the drives it gives you 500 gigs worth of space, technically under 500 not 1 terrabyte. Anyway I found out that the DNS link drive does not support macs naming structure, nor will it, as it is Linux based. But does anyone have a workaround as my mac files will not copy to it as I continue to receive file error messages “cannot copy” thanks and best D.
Eric Litman on Saturday, January 26th, 2008
Right. The drives are mirrored (RAID0), and while technically not 1/2 TB en toto, for the sake of brevity it’s a reasonable shorthand. For the record, they’re not really 500GB, either. If you like, you can configure the DNS-323 to make the total combined capacity of both disks available, but you’re then left without any redundancy.
@Dan: Samba can be picky about filenames, but I believe it’s a tunable parameter. Look up the syntax/rules for smb.conf files and see if there’s something you can do to make samba more permissive on the DNS-323.
Serge on Wednesday, January 30th, 2008
great stuff. Just got one myself, but am experiencing some issues, namely around the built in itunes server (the shared music folder only shows a very small portion of my music).
Did you have the same issues? Or did you end up installing Firefly?
Thanks
Alfred Lam on Thursday, February 14th, 2008
Thanks for the hint. Applying same hint actually helped me fix a different but related problem. Windows clients connected to My Mac OS X (Tiger) samba is very slow when writing to Tiger but very fast when reading from it. Now it is very fast even for writing after applying the sysctl change
Jonathan on Monday, July 28th, 2008
I try you command on my osx 10.5 but that dont work, speed stay slow!!
i plug my dns 323 on a gigabyte switch and plug the g5 on the gigabyte switch and speed are slow !!!!
i call d-link support and they refer me here héhéhé!!
Eddie on Wednesday, November 26th, 2008
Just remember to backup/make a copy of that .conf file incase you make any OS changes in the future (updates or next version…). Thanks for the SMB speed up!
Rich Baty on Monday, August 17th, 2009
Thanks Eric, exactly what I’m looking for…
Hoping you can explain where to edit the lines for us nOObs (a Mac version of .ini file? or CMD???)