From owner-freebsd-hackers@FreeBSD.ORG Sat May 18 04:04:17 2013 Return-Path: Delivered-To: freebsd-hackers@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 9F36598C for ; Sat, 18 May 2013 04:04:17 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id 65DC2E6C for ; Sat, 18 May 2013 04:04:17 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UdYNT-0004Mb-I4 for freebsd-hackers@freebsd.org; Sat, 18 May 2013 06:04:15 +0200 Received: from 137.122.39.160 ([137.122.39.160]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 May 2013 06:04:15 +0200 Received: from ivoras by 137.122.39.160 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 18 May 2013 06:04:15 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Subject: blogbench and write-open serialization Date: Sat, 18 May 2013 00:04:05 -0400 Lines: 17 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 137.122.39.160 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 May 2013 04:04:17 -0000 During the BSDCan & DevSummit I got interested in finding out why blogbench is so slow on FreeBSD. After talking to jhb, it looked like one of the reasons might be that opening files with O_RDWR or O_WRONLY (anything opening the file for writing) is serialized. To check this, I've written a small test program, which I've run on CentOS 6.3 and FreeBSD 10-HEAD on the same hardware. Here are the results: https://wiki.freebsd.org/Benchmarking/OpenCloseBenchmark Conclusions: * Linux opens and closes files much faster than FreeBSD * Linux does not serialize write-open operations, while FreeBSD does * Even with O_RDONLY, FreeBSD is much slower in opening (and closing) files. I'd welcome a review of these results and comments.