View previous topic :: View next topic |
Author |
Message |
|rt| n00b
Joined: 10 Aug 2003 Posts: 14
|
Posted: Wed May 05, 2004 3:34 pm Post subject: Samba 3.x performance issues |
|
|
I'm running Samba 3.0.2a-r2, 2.6.5-r1 kernel, and XFS is being used for the file system on a hardware raid5 setup and I'm seeing smbd eating up alot of cpu cycles on the server under certain situations which result in poor performance.
When a windows client is "preparing to copy" a number of files out of a directory that has alot of files it takes roughly 1 sec per file. During this time the smbd process associated with that client is pegging the system to nearly 100% cpu usage. Moving 10k files around over the network isn't uncommon...especially between the Linux and Windows file server.
Also I noticed today that when opening a 12 meg image in ACDsee from the samba share it took 346 seconds to open and during this time the smbd process was pegging the cpu.
Granted my directory stucture is not the norm and having 45k or more files in a single directory is not uncommon but the windows file server deals with the same situations without any problem or cpu load.
Anyone else see similar behaviour? |
|
Back to top |
|
|
kezzla Apprentice
Joined: 21 Aug 2003 Posts: 253 Location: Austin, TX
|
Posted: Wed May 05, 2004 3:53 pm Post subject: |
|
|
Not having issues here ? I don't have *that* many files in one directory but my server is ALWAYS fast. I'm running development-sources 2.6.6-rc3 with gigE crossover connection to my windows box. I had some issues when I first got the gigabit. The trick was to set these options in smb.conf:
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
Before I had these extra options and was really slow:
SO_RCVBUF=8192 SO_SNDBUF=8192
I'm also using ext3 instead of xfs. No raid on server. Just JBOD via EVMS.
3 drives = 1 300GB partition. I run a lot of ~x86 stuff:
# cat /etc/portage/package.keywords
sys-libs/zlib ~x86
net-fs/samba ~x86
net-www/mod_bandwidth ~x86
sys-kernel/linux-headers -*
sys-kernel/development-sources ~x86
sys-devel/gcc ~x86
x11-base/xfree ~x86
sys-libs/glibc ~x86
sys-devel/binutils ~x86
sys-devel/automake ~x86
media-fonts/corefonts ~x86
net-p2p/overnet ~x86
net-p2p/mldonkey ~x86
net-mail/postfix ~x86
net-dns/bind ~x86
net-dns/bind-tools ~x86
net-misc/openssh ~x86
net-mail/MailScanner ~x86
dev-perl/Net-CIDR ~x86
net-www/apache ~x86
I am also running: Latest version installed: Samba 3.0.2a-r2
I'd try an FTP test of 700+ MB, if FTP is fast then is strictly a samba issue.
My server is Nforce2 A7N8X Deluxe w/2400 AthlonXP 1GB ram.
Hope this helps ? |
|
Back to top |
|
|
|rt| n00b
Joined: 10 Aug 2003 Posts: 14
|
Posted: Wed May 05, 2004 4:28 pm Post subject: |
|
|
The problem seems to be how the windows client and samba interact. The result normally isn't in slow transfers once they get going but it takes a long time up to an hour or more for the "preparing to copy" to finish and it to start copying files.
What I've been doing to work around this is use smbmount to mount the share I'm moving the data too and push the files from linux rather than try to pull them from the windows client. |
|
Back to top |
|
|
|rt| n00b
Joined: 10 Aug 2003 Posts: 14
|
Posted: Wed May 05, 2004 6:07 pm Post subject: |
|
|
Ok this problem seems to be directly related to the number of files in a directory.
Open a 17 meg image with acdsee that's in a directory with 45k other files and it takes 360 seconds (6 minutes).
Copy that 17 meg file into an empty directory and it takes 2 seconds. |
|
Back to top |
|
|
|