From owner-freebsd-performance@FreeBSD.ORG Sun Jul 7 19:37:14 2013 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8FED7618 for ; Sun, 7 Jul 2013 19:37:14 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 59D9D118C for ; Sun, 7 Jul 2013 19:37:14 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:d1e6:17e6:7b26:3ee6]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id D1CB24AC1C for ; Sun, 7 Jul 2013 23:37:10 +0400 (MSK) Date: Sun, 7 Jul 2013 23:37:04 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <866737084.20130707233704@serebryakov.spb.ru> To: freebsd-performance@freebsd.org Subject: Samba server performance -- only 33MiB/s with one client on 1G network! MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Lev Serebryakov List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 19:37:14 -0000 Hello, Freebsd-performance. I have 9-STABLE/amd64 server on E4500 CPU (Core2Duo 2.4Ghz), with 6GiB of DDR2-800 RAM and intel 1G adapter (em0, "82566DM-2 Gigabit Network Connection"). It has SATA software RAID5 with 5 drives. Filesystem (UFS2, 32K blocks) is exported with samba36 (latest), with enabled AIO, sendfile and TCP options for 256K window (SMB2 is turned off, as Win7 clients has confirmed, but not fixed bug in it). Local read of directory like this: tar cf - "dir" | dd bs=128k of=/dev/null shows 280MiB/s read according to "dd" diagnostics. It is about 24GiB of data, so it could not be cached. Good result, I like it. This server is connected to small home netwrok via HP ProCurve 1400-8G switch. Also, I have client, which is connected to same switch and runs Win 7. It mounts this FS via Samba. iperf from server to Win7 client (Server sends) shows ~820 Mbits/sec. It is not best performanse, but client has loosy network adapter (Atheros 1G adapter). But when I run tar cf - "dir" | dd bs=128k of=/dev/null on client it shows only 33MiB/s. It doesn't look like something near 820Mbit/s! And smbd utilize only 50% of one core. So, smbd is NOT limited by: (1) FS (33MiB/s vs 280MiB/s). (2) Network (33MiB/s vs 820Mbit/s / 97MiB/s). (3) CPU (50% vs 100%, CPU is 150% idle!). Why samba performacne is so loosy? What could -- // Black Lion AKA Lev Serebryakov