Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've setup Samba on my CentOS 5.5 server and its incredibly slow even to write a text file, talking like 5-10 seconds just to write an 8k file. I personally think its a miss configuration but not 100% sure. I run Apache, MySQL, tomcat and postfix off the server and they all run super fast. (It's just a personal server, next to no traffic)

Here is my config:

[global]
    workgroup = NONE
    server string = Laptop server
    preferred master = no
    local master = no
    domain master = no
    security = user
    passdb backend = tdbsam
    show add printer wizard = no
    load printers = no
    smb ports = 445
    hosts deny = ALL
    hosts allow = 10.0.
   log file = /var/log/samba/smbd.log
    log level = 2
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    preserve case = yes
    short preserve case = yes
    unix extensions = no

I realise the log level is high but it's only been raised to try and diagnose, it made no difference when it was off.

I did notice in the logs that when I did save it opened a lot of files (about 50), I'm connecting to it from a Mac but I also connect to a similar config at work and its quite fast.

Sign in is very quick too. Any suggestions?

share|improve this question
add comment

1 Answer

Does the server's network adapter happen to be a Realtek (especially RTL8111/8168B)? I've found that Realtek cards on Linux can be remarkably slow when used with Samba. The kernel driver source code had comments about Realtek's quality that provided a laugh unexpected from kernel comments.

From the server string, it appears the system is a laptop. That makes changing the NIC rather difficult, but you might try testing with the wireless or a USB network adapter. Wireless is of course not ideal for serving files with high performance, but in testing I bet it will beat 10 seconds for an 8k file.

share|improve this answer
    
Interesting, I'll take a look. I have a feeling it may be a Realtek. I had issues getting it connected through wireless so I just forgot about it, but I should be able to router it and get Samba only to listen on that adapter, I'll have to get back to you if it works though. –  Rudiger Jul 24 '11 at 0:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.