Weird Samba slowness problem

MissingGhost

Weaksauce
Joined
Jan 18, 2006
Messages
104
Hello, I'm having some problems with a samba server.
Here is what I have: a samba server (3.2.5) running on debian lenny with windows vista clients.

The problem is that, while the server speed is quite fast (in MB/s), it sometimes has unusual latencies before the data transfers can start, something like 20-60 seconds.

I have been trying a lot of stuff to try to identify the source of the problem and I've narrowed it to something very specific: this latency only happens when the file being accessed is owned by a different user. To explain more, I'll give an example:

Say there are two users: user1 user2
both are in a group: group1

if user1 tries to access a file, it will be slow with files like this: (ls -lh output)
Code:
-rw-rw---- 1 user2 group1 93K 2009-11-07 01:32 somefile
-rw-rw---- 1 root group1 93K 2009-11-07 01:32 somefile

but it will be extremely fast with a file like this:
Code:
-rw-rw---- 1 user1 group1 93K 2009-11-07 01:32 somefile

this is absolutely reproducible: if I change the file ownership with chown it will be fast, and if I revert it it will be slow again.

this server has been in use since about 2 years and I *think* the problem started when I upgraded its hard drives.

Any help will be greatly appreciated, as I've searched with no success for a long time.
 
Code:
   workgroup = WORKGROUP
   server string = Samba Server %v
   log file = /var/log/samba/log.%m
   max log size = 50
   map to guest = bad user
   security = user
   encrypt passwords = yes
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   dns proxy = no
   #dos charset = 1255
   unix charset = UTF-8
   display charset = UTF-8
 
Back
Top