On 18 Nov 2008 at 10:36, Whyzzi wrote: > I'm looking to improve my samba writing performance but I Fear I've > either tweaked something wrong or not tweaked it enough and as such > I'm looking for any and all criticism that might improve my situation. > > Admittedly I'm running somewhat of a Frankenstein system - older P3 /w > too many pci cards that sadly in some ways have to share the same IRQ > (the Compaq BIOS in manual IRQ assignment is not very flexible). I > have however gone out of my way to disable whatever I am not using - > - eg sound, PATA, onboard usb 1.1, etc. And yes that is a CMD Silicon > Image 3512 PCI add-in card /w 1TB western digital SATA drive on IRQ 14 > -- it was fun to watch the machine boot from the SATA DVDRW. > > "Out of the box" was performance just short of abysmal. I can't > currently remember the exact output numbers but doing a windows to > samba copy worked at about 2MB/s (watching systat vmstat as it writes > to the HD). > > By adding the following to OpenBSD: > -------------- > net.inet.ip.ifq.maxlen=768 # Maximum input queue (256*number of > interfaces) > net.inet.icmp.errppslimit=1000 # Maximum outgoing ICMP error messages per sec > net.inet.ip.ttl=254 # TTL = "min-ttl" in scrub rule in pf.conf > net.inet.tcp.ackonpush=1 # acks for packets with the push bit no delay > net.inet.tcp.ecn=1 # Explicit Congestion Notification enabled > net.inet.tcp.mssdflt=1452 # maximum segment size (1452 from scrub > pf.conf) > net.inet.tcp.rfc1323=1 # RFC1323 TCP window scaling > net.inet.tcp.recvspace=262144 # Increase TCP "recieve" windows size to > increas > e performance > net.inet.tcp.sendspace=262144 # Increase TCP "send" windows size to > increase p > erformance > net.inet.tcp.sack=1 # enable TCP Selective ACK (SACK) Packet > Recover > y > net.inet.udp.recvspace=262144 # Increase UDP "recieve" windows size to > increas > e performance > net.inet.udp.sendspace=262144 # Increase UDP "send" windows size to > increase p > erformance > -------------- > > and the following performance option in smb.conf > -------------- > socket options = IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536 > sync always = no > read raw = no > write raw = no > --------------
First you manually set your TCP send/recv buffers to 256K (in sysctl.conf) but then you tell SAMBA to re-set them to only 64K. According to SAMBA docs, socket options get passed directly to the TCP/IP stack, i.e. these are not "internal" settings. OTOH, in all my personal tests I was unable to verify any perfomance gains beyond 64K buffers. Perhaps experts like henning@ or stu@ can chime in and advise what is the highest performance setting... Last but not least, if you are using a Gig switch and your internal computer(s) also have Gig NICs, you can get a boost in network performance by turning on Jumbo frames -- ifconfig re0 mtu NN, where 1500 < NN < 7422 (Realtek limitation). But beware that ALL computers need to have the same Jumbo frame setting or they will stop communicating. (which is probably the reason why Jumbo frames are NOT on by default.) > > I managed to get my internal network interface (re0) to 4000 > interupts/sec and a wd0 write speed between 4MB and 12MB per second. > Again any help anyone can give me that might improve my overall write > speed would be greatly appriciated. > > incase you're wondering the system is for a home network firewall /w > wireless support. dmesg follows: > > OpenBSD 4.4 (GENERIC) #1021: Tue Aug 12 17:16:55 MDT 2008 > [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC