From owner-freebsd-stable@FreeBSD.ORG Mon Dec 3 06:03:02 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FDCE16A41A for ; Mon, 3 Dec 2007 06:03:02 +0000 (UTC) (envelope-from ian@niw.com.au) Received: from cerberus.apdata.com.au (cerberus.apdata.com.au [202.14.95.17]) by mx1.freebsd.org (Postfix) with ESMTP id 41CA113C46B for ; Mon, 3 Dec 2007 06:03:02 +0000 (UTC) (envelope-from ian@niw.com.au) Received: from cerberus.apdata.com.au (localhost [127.0.0.1]) by cerberus.apdata.com.au (Postfix) with SMTP id A314F5C3B for ; Mon, 3 Dec 2007 16:12:10 +1030 (CST) Received: from aleph.niw.com.au (aleph.niw.com.au [192.168.101.4]) by cerberus.apdata.com.au (Postfix) with ESMTP id 7555F5C38 for ; Mon, 3 Dec 2007 16:12:09 +1030 (CST) Received: from aleph.niw.com.au (localhost [127.0.0.1]) by aleph.niw.com.au (Postfix) with ESMTP id 7D33B23398F for ; Mon, 3 Dec 2007 16:12:08 +1030 (CST) Received: by aleph.niw.com.au (Postfix, from userid 1000) id 31516233965; Mon, 3 Dec 2007 16:12:08 +1030 (CST) Date: Mon, 3 Dec 2007 16:12:08 +1030 From: Ian West To: freebsd-stable@freebsd.org Message-ID: <20071203054207.GA1153@aleph.niw.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11 X-Kavpostfix-Config: /etc/mail/kavpostfix.aleph X-Kavpostfix-Perl: /etc/mail/aleph.pl X-Kavpostfix-Version: 5.048 X-Spam-Not-Checked: Message sender whitelisted X-Complete-Junk: NO X-Kavpostfix-Config: /etc/mail/kavpostfix.cfg X-Kavpostfix-Perl: /etc/mail/testcode.pl X-Kavpostfix-Version: 5.028 X-Spam-Not-Checked: Message sender whitelisted Subject: Swapping caused by very large (regular) file size X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Dec 2007 06:03:02 -0000 Hello, I have noticed while benchmarking a system with a fair bit of ram (3G usable of 4G installed) that when using a very large file (3G upwards) in a simple benchmark it will cause the system to swap, even though the actual process does not show in top to be using a lot of memory, as soon as the swapping starts the throughput degrades dramatically. The 'inactive' ram shown in top increases rapidly and 'free' ram reduces, this seems fair and sensible, but allowing it to then page to possibly the same spindle/array seems like a bad idea ? I have tested this on a 4.11 system with 512M of ram as well as a RELENG-6 system with an areca raid controller, both behave in the same way, once the file gets to a certain size the system starts paging. Is there any way to tune this behaviour ? The test I have been doing is just generating a big file full of nulls, but bonnie++ causes the same behaviour with very large file sizes. dd if=/dev/zero bs=32768 of=junkfile count=100000 seems to do it quite reliably on all the boxes I have tested ? Using cp to copy the file doesnt appear to cause the problem. Any thoughts or suggestions would be much appreciated ?