From owner-freebsd-fs@FreeBSD.ORG Tue Sep 18 18:09:36 2007 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A17616A469; Tue, 18 Sep 2007 18:09:36 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [82.208.36.70]) by mx1.freebsd.org (Postfix) with ESMTP id 0EFC513C465; Tue, 18 Sep 2007 18:09:35 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from localhost (localhost.codelab.cz [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 523C019E02A; Tue, 18 Sep 2007 19:51:12 +0200 (CEST) Received: from [192.168.1.2] (r3a200.net.upc.cz [213.220.192.200]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTP id C0B4619E027; Tue, 18 Sep 2007 19:51:09 +0200 (CEST) Message-ID: <46F0105A.3060309@quip.cz> Date: Tue, 18 Sep 2007 19:52:26 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: cz, cs, en, en-us MIME-Version: 1.0 To: Ivan Voras References: <1189978356.30388.11.camel@afrodita> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: slow transfers on webshare service X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2007 18:09:36 -0000 Ivan Voras wrote: > Miroslav Valenta wrote: > >> Hi >> i have problem with slow transfers on my web filesharing server. I'm >> running FreeBSD 6.2 >> files are sending by lighttpd 1.4.18 : >> >> server.max-worker = 8 >> server.max-fds = 8192 >> server.network-backend = "writev" >> >> ----- >> >> HW: >> xeon 3160 4GB of RAM >> areca arc-1260 disk controller with 1GB cache + 8x 500GB sata2 hdd >> >> >> file transfers slow down when i'm about 500 downloading connections >> but when i send same file from same storage by same line it's sending >> fast. > > > Please characterize "slow" and "fast" - how is it slow and how fast do > you think it should be? > > Some general tips/ideas: > > - Do you really need 8 workers? Lighttpd is async server so it's about > as fast as it gets. If you only serve static files, larger number of > worker processes (and CPUs...) won't make a difference. > - Do you use the "kqueue" extension for Lighttpd? > - 500 parallel downloads probably mean lots of seeking on the disk drive > array, have you verified you can sustain the speed you need with the > drives? I am running Lighttpd for about 2 years on download server. With 1 worker, lighttpd seems limited to 110Mbps. After change to 4 workers throughput increase to about 190Mbps serving 250-400 clients. (daily traffic is ~750GB) I am using these settings: server.event-handler = "freebsd-kqueue" # needed on OS X #server.network-backend = "freebsd-sendfile" # better for small files server.network-backend = "writev" # better for large files? server.max-keep-alive-requests = 6 server.max-keep-alive-idle = 5 server.max-read-idle = 60 server.max-write-idle = 180 Miroslav Lachman