Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » OS and Software » All Things Unix » OS X client, linux server, samba pain.
Search Topic:
Uniqs:
3924
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
Post a:
Post a:
netstat segmentation fault »
« Simplify it for me please...  
page: 1 · 2
AuthorAll Replies


Crypto
Premium
join:2001-01-07
Saint Charles, MO


1 edit
OS X client, linux server, samba pain.

So, here's my basic problem: Samba and OS X arent playing nice together.

I've been fighting this for over 3 years now, and there's no resolution in sight. I'm convinced that something is broken in OS X's smbclient implementation, but I have no idea what it might be or how to address it. So I'm looking for workarounds , hoping that at least one of you might have run across the following scenario:

OS X clients (from OS X public beta all the way up to 10.4 Tiger), both when reading and writing, perform absolutely craptacularly when interacting with every version of Samba that Debian or knoppix has come with since 2000. When I saw craptacularly, I'm talking about transfer rates of about 128KB/sec on a gigabit link.


Client Server Result
________________________________________________
OS X Samba Slow
OS X Windows Fast
Windows Samba Fast


All scenarios have been tested with multiple test subjects of each platform

The problem, it seems, has to be limited to OS X, but I have been unable to find any solutions that have worked. When I look online, everything seems to center around twiddling various options in smb.conf, but none of them so far have made a difference.

For what it's worth, here's the relevant parts of my current smb.conf


############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
# socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# **PERFORMANCE TWEAKS ***
socket options = IPTOS_LOWDELAY TCP_NODELAY
large readwrite = no
deadtime = 15
max xmit = 65535

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
domain master = auto


Any experience you could share on this would be most helpful to me, because I'm frankly disgusted with not being able to fix this.

--

I may not agree with what you say, but I'll defend your right to encrypt it.


wmcbrine
Touched by His Noodly Appendage

join:2002-12-30
Laurel, MD
Have you considered NFS? Or maybe even AppleTalk? IMHO Samba is for talking to Windows.


Crypto
Premium
join:2001-01-07
Saint Charles, MO


1 edit
Yes, I've considered it and utterly rejected the concept as rediculous.

I've found that NFS is terrible for most client/server installations, honestly. Linux has a lousy NFS server, the protocol itself is terrible for security up until nfsv4 and then it's not well supported. The authentication is ugly as well up to v4 and relies on UID/GID, which arent usually homogenous in my environments. Maybe if you're in an entirely UNIX environment it's okay, but this is not where I am.

SMB and CIFS are excellent cross-platform implementations. When one's network consists of one Linux server and a bunch of PC's with a few macs thrown in, samba is the logical choice. NFS is a needless security risk and simply asking for trouble, IMO.

So, no. I'm not going to set up NFS just for a few macs. I just want to fix whats wrong with samba.
--

I may not agree with what you say, but I'll defend your right to encrypt it.

manifest
bitches

join:2004-08-14
Hartford, CT

When you say slow, do you mean responsiveness of the share or how fast the data is sent? I have a linux server running gentoo and samba 3 2 pc's and a mac mini. I can get 9mb/s from linux to mac and vice versa. When I upgraded from 10.3.9 to 10.4 on the mac I noticed about a 3mb/s increase.


sporkme
drop the crantini and move it, sister
Premium,MVM
join:2000-07-01
Morristown, NJ
·Optimum Online

reply to Crypto
Questions:

-How about ftp transfers? Similar speeds?
-Slow with samba in both directions? (putting vs. getting file)
-Slow if the Linux box mounts the OS-X box?

I highly recommend Netatalk. Much simpler than samba, and it performs quite well. Even works well from outside and only requires one TCP port open.


Crypto
Premium
join:2001-01-07
Saint Charles, MO

reply to manifest
When I say 'slow' I mean that the data moves at under 1MB/sec via samba. Oddly, writing to the linux samba share is a little faster than reading from it.

It moves at close to wirespeed using any other transfer method, like scp or ftp

I have not shared out anything on the OS X boxes, because they are not servers, and I dont care how the OS X smbd performs.
--
I may not agree with what you say, but I'll defend your right to encrypt it.


sporkme
drop the crantini and move it, sister
Premium,MVM
join:2000-07-01
Morristown, NJ
·Optimum Online

said by Crypto See Profile :

I have not shared out anything on the OS X boxes, because they are not servers, and I dont care how the OS X smbd performs.
You may not care, but you may gain some insight by trying that.

Daemon
Premium
join:2003-06-29
San Francisco, CA
·Comcast

reply to Crypto
I can tell you it's not a fatal flaw in the SMB implementation in OSX. I have a Fedora box connected to a 10.4 machine (used to be 10.3), and it just flies.

In fact, it flies without me having to do anything special.

OTOH, multiple Macs might change the equation. I have heard anecdotal evidence that Macs insist on being the master browser and force constant elections until they win. If true, who knows what happens if multiple macs get together.

I agree with sporkme. If something about the packets on the link or the topology of the network is slowing it down, it may show the same symptoms with smbd on OS X.
--
-Ryan
What 64 bit CPUs mean for most people: OMFG HUEG NUMBERZ!!!11!! NEED GIGGLEHERTZ AND 128BIT FOR W3RD!


Crypto
Premium
join:2001-01-07
Saint Charles, MO

said by Daemon See Profile :

I can tell you it's not a fatal flaw in the SMB implementation in OSX. I have a Fedora box connected to a 10.4 machine (used to be 10.3), and it just flies.
Thats actually the most valuable data point I have gotten yet from this whole thing. That tells me that there might be something peculiar to the way this version of samba was compiled. Maybe it's time to compile it from scratch and see what happens.
--
I may not agree with what you say, but I'll defend your right to encrypt it.


NOCMan
Verizon Fios User
Premium
join:2004-09-30
Flower Mound, TX

reply to Crypto
It does not seem that slow going to my NSLU2 samba shares.

I have a unbuntu box that houses the iTunes and that connection is NFS and it's pretty damn fast.
--
»www.silentbrouhaha.com


computx
Is it Friday yet?
Premium
join:2000-09-02
Kirksville, MO

reply to Crypto
It appears mac os/x supports nfs file sharing. If you don't need to have a windows box in the mix then it would make sense to go with nfs instead of samba.

Even if you have a windows box you can get it to use nfs, using services for unix, according to this microsoft knowledgebase article.

»support.microsoft.com/?kbid=324055

Also this might be useful for the mac.
»www.bresink.de/osx/NFSManager.html
--
To err is human...to really foul up requires the root password.


bbarrera
Premium,MVM
join:2000-10-23
Sacramento, CA
clubs:
·SureWest Internet

reply to NOCMan
said by NOCMan See Profile :

It does not seem that slow going to my NSLU2 samba shares.
There is definitely a speed difference between linux-based NSLU2 samba shares and WinXP Pro shares. My NSLU2 samba shares are a good bit slower than WinXP Pro shares (1GHz PIII Dell laptop). Copying a 33.7MB file from linux-based NSLU2 to Mac takes ~9.5 sec and copying same file from WinXP Pro to Mac takes ~6.5 sec. I'll reboot the WinXP laptop into Gentoo tomorrow and retest, that way we can take slower NSLU2 processor and disk drive differences out of the equation.

sirozha

join:2001-11-18
Kennesaw, GA


1 edit
reply to Crypto
There's a really cool NAS made by Infrant called ReadyNAS. It's a device with the size of a shoe box with four SATA drives configured as RAID 1 or RAID 5. They also have another sibling that has patent-pending XRAID that changes from RAID 1 to RAID 5 automatically when the number of HDs changes from 2 to 3 without you having to move the data out and reconfiguren the RAID level. This device has a special setting for OS X clients. Without this setting enabled, OS X clients are extremely slow transferring files to or from the NAS. With this setting enabled, the speed improves dramatically, but this setting negatively affects Windows NT clients (not Windows 2000 or XP).

So, if you are really interested to find out why your OS X clients are so slow, you may want to go to www.infrant.com/forums and ask what that setting does to change the performance of OS X clients. By the way, Infrant developed their own chip and their own OS called RAIDiator. It's based on Debian Linux, though.


Crypto
Premium
join:2001-01-07
Saint Charles, MO

reply to computx
Please stop trying to push NFS. It sucks.

I am not going to implement nfs just for the very few macs I support. After over a decade of dealing with nfs, I hate it and will not implement it unless I absolutely have to, and the idea of implementing a NFS client on a crapload of win32 systems just to make the mac happy is just rediculous.

Additionally, the macs and Linux server dont share UID/GID, thus making it entirely unsuitable for an NFS implementation.

This thing about the NAS device is absolutely intriguing, because it uses a Debian-based OS. I am really beginning to suspect the culprit is some default setting that debian compiles in that no one else does, since I am hearing that only people with debian or debian based distros are having this problem.

Additional test data from last night:

I have concluded that the problem only exists in one direction.

my write speed is almost as fast with samba as with ftp or scp, but the read speed is still abyssmal, under 1MB/sec.

Here are the various samba options I tried last night, with no success (they just made things worse)

large read write = on
max xmit =
all the SO_ buffer settings
all the NODELAY and LOWDELAY options.

I'll go over to that NAS forum and see what I can dig up, thank you.
--
I may not agree with what you say, but I'll defend your right to encrypt it.


sporkme
drop the crantini and move it, sister
Premium,MVM
join:2000-07-01
Morristown, NJ
·Optimum Online

said by Crypto See Profile :

my write speed is almost as fast with samba as with ftp or scp, but the read speed is still abyssmal, under 1MB/sec.
Have you run tcpdump to get an idea of what's different?

Are you dead-set against netatalk? You made it very clear you don't want NFS (although I don't see why one can't have both NFS and CIFS on the same box - I'm running samba, nfs and netatalk, all exporting the same stuff).


Crypto
Premium
join:2001-01-07
Saint Charles, MO

I tried netatalk, but its fairly ugly and has authentication issues of its own. Samba really is the preffered way to go for all clients because authentication ultimately needs to be done by the windows system anyway.

I've never had to use netstat in a performance diagnostic capacity before, can you point me towards a howto or drop me a few pointers?
--
I may not agree with what you say, but I'll defend your right to encrypt it.


computx
Is it Friday yet?
Premium
join:2000-09-02
Kirksville, MO

reply to Crypto
said by Crypto See Profile :

Please stop trying to push NFS. It sucks.
Not really pushing nfs just thought I would mention an alternative as In my opinion samba sucks. (looks like it sucks for you too.)
Good luck with your samba installation.
--
To err is human...to really foul up requires the root password.


wmcbrine
Touched by His Noodly Appendage

join:2002-12-30
Laurel, MD

reply to sporkme
said by sporkme See Profile :

although I don't see why one can't have both NFS and CIFS on the same box - I'm running samba, nfs and netatalk, all exporting the same stuff
I've done the same in the past, albeit only on a small LAN. I don't understand cbellers' reference to "implementing a NFS client on a crapload of win32 systems just to make the mac happy". Samba for Win32 clients, NFS and Netatalk for others; no problem that I'm aware of.


Crypto
Premium
join:2001-01-07
Saint Charles, MO

reply to computx
As I explained in detail before, I dont have matching UID/GID's on the mac and UNIX hosts. This means that I have to do NFS maps, something I hate, and something that I cannot support on this network. The idea is that this implementation needs to be so simple that it runs itself after I'm gone, and NFS isnt the way to do that, frankly.

On the NAS support front, it looks like the "optimize for macs" setting turns on an option I had never heard of called "sendfile", which is apparently not enabled by default on some samba implementations (and apprently not on the debian-based implementation shipped with this NAS device). When I get home tonight I hope to test this option and see what sort of results it gives.
--
I may not agree with what you say, but I'll defend your right to encrypt it.

MiloMindbend

join:2001-01-18
Jeannette, PA


1 edit
 reply to Crypto
Re: OS X client, linux server, samba pain.

Try this (on the OS X side):

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

(set it back to 1 when you're done playing)

It disables the TCP stack's delayed acks (that's what the TCP_NODELAY sockopts in smb.conf does). I haven't found a good way to pass this to the smb/cifs kernel extension, so I just twiddle the sysctl knob when I encounter a slow SMB server (in my case it's the corporate Win2K servers at work that are abysmally slow unless I turn off the delayed acks).
Forums » Tech and Talk » OS and Software » All Things Unixnetstat segmentation fault »
« Simplify it for me please...  
page: 1 · 2


Monday, 09-Nov 07:41:17 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 10 years online! © 1999-2009 dslreports.com.republican-creole
page compression OFF
Most commented news this week
· [156] Cable Uncapper Faces Criminal Charges
· [140] AT&T Sues Verizon Over 3G Ads
· [112] Why Run Fiber When You Can Run Ads That Pretend You Do?
· [109] Comcast Is Simply Getting Huge
· [93] Apple Cooking Up New $30 A Month TV Service?
· [83] Bits Of ACTA Agreement Leaking Out
· [81] Will 'Three Strikes' Come To The United States?
· [78] Verizon To Double Smartphone ETFs?
· [77] Verizon: Droid Tethering Will Cost $30 Extra
· [73] Comcast, NBC Deal Almost Complete
Most people now reading
· Divorce advice... [General Questions]
· [WIN7] Which Services in Win 7 Have You Turned Off? [Microsoft Help]
· 3.x Feral Druid - Bear Tanking Guide [World of Warcraft]
· Boeing 720 Demolition [56k Lookout (Broadband Heavy)]
· Windows 7 boot manager editing questions [Microsoft Help]
· Framed for child porn 151; by a PC virus [Security]
· Connecting to Google Voice Via SIP [VOIP Tech Chat]
· Security Software Updates - 09 Nov 2009 [Security]
· Is Gear Score now the new requirement to get pug invite? [World of Warcraft]
· My cat is reluctant to exercise. [General Questions]