From owner-freebsd-fs@FreeBSD.ORG Sat Jan 16 16:58:15 2010 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 347B2106566C for ; Sat, 16 Jan 2010 16:58:15 +0000 (UTC) (envelope-from lehmann@ans-netz.de) Received: from avocado.salatschuessel.net (avocado.salatschuessel.net [78.111.72.186]) by mx1.freebsd.org (Postfix) with SMTP id AAD018FC17 for ; Sat, 16 Jan 2010 16:58:14 +0000 (UTC) Received: (qmail 51461 invoked by uid 89); 16 Jan 2010 16:31:32 -0000 Received: from unknown (HELO kartoffel.salatschuessel.net) (78.111.72.187) by avocado.salatschuessel.net with SMTP; 16 Jan 2010 16:31:32 -0000 Date: Sat, 16 Jan 2010 17:31:31 +0100 From: Oliver Lehmann To: fs@freebsd.org Message-Id: <20100116173131.07629963.lehmann@ans-netz.de> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.5; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Subject: UF filesystem performance 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: Sat, 16 Jan 2010 16:58:15 -0000 Hi, I had to recreate my /usr filesystem so I played around with the -f and -b switches of newfs. ======> newfs -U -o time -f 8192 -b 65536 /dev/ada1s1f Version 1.96 ------Sequential Output------ --Sequential Input- --Random- Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP nudel.salatschue 6G 96 99 50529 26 24165 17 251 99 57469 16 174.7 10 Latency 88795us 380ms 682ms 63203us 39098us 2737ms Version 1.96 ------Sequential Create------ --------Random Create-------- nudel.salatschuesse -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 962 9 +++++ +++ 2310 15 931 8 +++++ +++ 2268 15 Latency 248ms 66us 12908us 26791us 57us 32782us Then I created a RAID-1 with gmirror - the 2nd disk is of the same type and started bonnie++ again: Version 1.96 ------Sequential Output------ --Sequential Input- --Random- Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP nudel.salatschue 6G 89 99 59174 31 27738 18 250 99 63858 17 308.5 17 Latency 172ms 200ms 1763ms 44152us 123ms 308ms Version 1.96 ------Sequential Create------ --------Random Create-------- nudel.salatschuesse -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 12276 90 +++++ +++ 12796 96 14750 94 +++++ +++ 10542 97 Latency 18836us 72us 258us 18891us 82us 312us Then I've read tuning(7) and I thought that maybe newfs with standard -f and -b would be better because of FreeBSD performs best when using 8K or 16K file system block sizes. The default file system block size is 16K, which provides best performance for most applications, [...] ...] Using a block size larger than 16K can cause fragmentation of the buffer cache and lead to lower performance. Then I recreated the filesystem (still mirrored): ======> newfs -U -o time /dev/mirror/gm0s1f Version 1.96 ------Sequential Output------ --Sequential Input- --Random- Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP nudel.salatschue 6G 96 99 42068 23 21395 18 251 99 43891 12 308.8 13 Latency 86066us 132ms 361ms 54776us 120ms 295ms Version 1.96 ------Sequential Create------ --------Random Create-------- nudel.salatschuesse -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP 16 7817 72 +++++ +++ 30164 99 6111 41 +++++ +++ 29030 96 Latency 562ms 56us 72us 284ms 78us 98us So... why is it now massivly slower? -- Oliver Lehmann http://www.pofo.de/ http://wishlist.ans-netz.de/