Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to optimize samba performance?
#1

Hello,

 

I have installed a linux server, centos gui server with Raid1, his role will be only a file server. I installed samba and configured it. The file system is EXT3. the server got 4 gigs of memory.

There is a program in windows that writes files to the share.

 

I searched and i found that there is some commands that you add and they boost the performance. This is what i added to smb.conf

 

refresh = 1

socket options = TCP_NODELAY IPTOS_LOWDELAY

read raw = No

write raw = Yes

max xmit = 131072

use sendfile = Yes

dead time = 15

getwd cache = Yes

otlocks = No

strict allocate = yes

 

 

 

I got complains that the writes are not fast enough. Before me another IT guy configured the file server and it was faster, what he told my customer that he changed some command of cache but i dont know exactly what he did. I have been asked to find how to boost the performance.

 

Please give me more commands to try to boost the performance of Samba or tell me if i need to change anything..

 

Thanks A Lot.

Reply
#2

Quote:I got complains that the writes are not fast enough. Before me another IT guy configured the file server and it was faster, what he told my customer that he changed some command of cache but i dont know exactly what he did. I have been asked to find how to boost the performance.

 

Please give me more commands to try to boost the performance of Samba or tell me if i need to change anything..
Firstly, you need to establish if it's disk writes that's the bottleneck, or SAMBA performance that's the issue (or even network traffic). For that you may need to try running some disk I/O analysis programs (like "hdparm", "fio" or "iostat") then compare them to network-based read/writes.

 

Secondly.. if another IT guy made some changes, are these changes recorded anywhere? That may be a first port of call - find out from him (or the customer) what they did, or try recovering a backup of his SAMBA config file to look at the settings he used.

Reply
#3

this is the results i got. what do you think ?

 

[root@lm2000 ~]# hdparm -tT /dev/sda

 

/dev/sda:

Timing cached reads: 1900 MB in 2.00 seconds = 950.94 MB/sec

Timing buffered disk reads: 156 MB in 3.03 seconds = 51.52 MB/sec

[root@lm2000 ~]# hdparm -I /dev/sda | grep -i speed

* SATA-I signaling speed (1.5Gb/s)

* SATA-II signaling speed (3.0Gb/s)

Reply
#4

I think you need to run them a few times when the disk isn't in use, and a few times when it *is* in use (when people are complaining writes are slow) to see if there is any difference in the values.

 

Also check the output of "top" - a %wa indicates there's disk thrashing going on (sometimes caused by large database work or quotas preventing file writes).

 

Note that I've had complaints about a "slow server" several times when it turned out someone was choosing specific times of the day to download large files, causing network congestion - monitoring on the server showed no discernible performance differences throughout the day, but once we had network analysis tools we were able to pinpoint the cause. People can be quick to (mis)identify the root of the problem based upon symptoms they observe and their lack of the bigger picture. Unless you have evidence that SAMBA itself is the bottleneck, you may be wasting a great deal of effort into trying to optimise an efficient service and completely miss the inefficient one.

 

The bottom line here is: you need to gather evidence to properly establish the reason behind the perceived slow writes. There are a few tools for this - have a hunt around and see.

Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)