[Samba] Am I getting the best performance?
John H Terpstra
jht at samba.org
Fri Mar 14 04:11:13 GMT 2003
On Fri, 14 Mar 2003, aragonx wrote:
> Okay, I've been chasing performance for a while now. I have no idea if I
> should be trying to get better performance or if I'm getting all I can out
> of my hardware. Here is the information:
> /sbin/hdparm -I /dev/hdd
> ATA device, with non-removable media
> Model Number: ST328040A
> Serial Number: 7BY034XB
> Firmware Revision: 3.07
> Supported: 4 3 2 1
> Likely used: 5
> Logical max current
> cylinders 16383 16383
> heads 16 16
> sectors/track 63 63
> CHS current addressable sectors: 16514064
> LBA user addressable sectors: 55704096
> device size with M = 1024*1024: 27199 MBytes
> LBA, IORDY(can be disabled)
> Buffer size: 512.0kB Queue depth: 1
> Standby timer values: spec'd by Standard
> R/W multiple sector transfer: Max = 16 Current = 16
> DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 *udma4
> Cycle time: min=120ns recommended=120ns
> PIO: pio0 pio1 pio2 pio3 pio4
> Cycle time: no flow control=240ns IORDY flow control=120ns
> Enabled Supported:
> * READ BUFFER cmd
> * WRITE BUFFER cmd
> * Look-ahead
> * Write cache
> * Power Management feature set
> * SMART feature set
> * DOWNLOAD MICROCODE cmd
> HW reset results:
> CBLID- above Vih
> Device num = 1
> /sbin/hdparm -Tt /dev/hdd
> Timing buffer-cache reads: 128 MB in 0.95 seconds =134.74 MB/sec
> Timing buffered disk reads: 64 MB in 2.43 seconds = 26.34 MB/sec
This appears to be measuring cache performance - not disk I/O performance.
Check the drive specifications. Probably more like 35MB/sec sustainable
> /sbin/hdparm /dev/hdd
> multcount = 16 (on)
> IO_support = 1 (32-bit)
> unmaskirq = 1 (on)
> using_dma = 1 (on)
> keepsettings = 0 (off)
> readonly = 0 (off)
> readahead = 8 (on)
> geometry = 3684/240/63, sectors = 55704096, start = 0
> socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192
Did you check the impact of increasinf the SO_RECVBUF and SO_SNDBUF to
> I'm running Redhat 8.0 using a custom built 2.4.20 kernel. The drive
> referenced above is a Seagate 7200rpm UDMA-33 IDE hard drive.
> I did a 2GB copy from
> Linux to a Windows98SE machine using Samba. I got 5.85MB/sec.
> I did the same copy on a Windows XP machine and got 6.99MB/sec.
> Then I copied from hdd to hdc and got 6.94MB/sec. (same channel)
> Then I copied from hdd to hdb and got 9.30MB/sec. (different channel)
> It seems to me that I should be able to get close to the 9.30MB/sec when
> transfering over the network.
> Still 9.3MB/sec is no where near the 26MB/sec hdparm is reporting...
> I'm on a 100Mb switch and I'm using 3Com 905TX NICs in both the workstation
> and the server.
An 100MB/s == 11 megabytes/sec at peak I/O and no network contention.
Copared with that 9.3 megabytes/sec is VERY good!
> I guess the best my network can put out is 12MB/sec. I was hoping to get
> around 10MB/sec with Samba. Is this unreasonable???
No - not reasonable. You have IP stack, a TCP stack, then buffering from
the kernel to samba's smbd with is user space, then I/O back to the kernel
and ultimately to the Disk subsystem. Lot's of overhead in other words.
You did well over 100Mbit ethernet!
What file system? ext2, ext3, reiserfs, xfs, jfs???? Even that makes a
- John T.
John H Terpstra
Email: jht at samba.org
More information about the samba