From owner-freebsd-scsi@FreeBSD.ORG Tue Feb 10 18:26:34 2009 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C487B1065760 for ; Tue, 10 Feb 2009 18:26:34 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id B9C508FC29 for ; Tue, 10 Feb 2009 18:26:33 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n1AIQTwD053899; Tue, 10 Feb 2009 11:26:29 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <4991C6D5.4050400@samsco.org> Date: Tue, 10 Feb 2009 11:26:29 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Sebastiaan van Erk References: <4991BD19.1000409@sebster.com> In-Reply-To: <4991BD19.1000409@sebster.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-scsi@freebsd.org Subject: Re: Disk performance on ESXi with FreeBSD 7.1 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2009 18:26:35 -0000 Sebastiaan van Erk wrote: > Hi, > > I'm running FreeBSD on ESXi but I'm having serious issues with disk > performance, and I'm wondering if it might have something to do with the > scsi driver (or the virtual hardware not returning proper values for its > capabilities or something).. > > I have both a FreeBSD-amd64 and Linux Ubuntu 8.10-amd64 virtual machine > (8GB disk, 512MB RAM, 2-CPU) and run dbench on both of them. The linux > machine is out of the box, not optimized for vmware, > VMI/paravirtualization is off, as is VMotion. The results for dbench > are as follows: > > 1 2 4 > freebsd 12.0009 13.6348 12.9402 (MB/s) > linux 376.145 651.314 634.649 (MB/s) > > Thus there is approx a factor 30 difference for dbench 1, and I cannot > imagine linux being that much faster just due to some performance tuning > kernel parameters. > > I tried both the VMware LSI Logic controller and the BusLogic > controller. Here is the relevant dmesg output of both: > > LSI: > mpt0: port 0x1080-0x10ff mem > 0xf4810000-0xf4810fff irq 17 at device 16.0 on pci0 > mpt0: [ITHREAD] > mpt0: MPI Version=1.2.0.0 > da0 at mpt0 bus 0 target 0 lun 0 > da0: Fixed Direct Access SCSI-2 device > da0: 3.300MB/s transfers > da0: 8192MB (16777216 512 byte sectors: 255H 63S/T 1044C) > > BusLogic: > bt0: port 0x1060-0x107f mem > 0xf4810000-0xf481001f irq 17 at device 16.0 on pci0 > bt0: BT-958 FW Rev. 5.07B Ultra Wide SCSI Host Adapter, SCSI ID 7, 192 CCBs > bt0: [GIANT-LOCKED] > bt0: [ITHREAD] > da0 at bt0 bus 0 target 0 lun 0 > da0: Fixed Direct Access SCSI-2 device > da0: 40.000MB/s transfers (20.000MHz DT, offset 15, 16bit) > da0: 8192MB (16777216 512 byte sectors: 255H 63S/T 1044C) > > Something that I noticed was the extremely slow transfer rates mentioned > with the da0 device. > > When I'm running dbench the server is not very busy: > > CPU: 0.2% user, 0.0% nice, 6.4% system, 0.7% interrupt, 92.7% idle > 1172 root 1 -8 0 4604K 1228K biowr 1 0:41 4.98% dbench > > I really want to get this working because I want to run a big production > site on FreeBSD. But currently the disk speed is just unworkable. > > I was wondering if anybody had any ideas about how to get proper disk > speeds on FreeBSD, making it a viable guest operating system. > > If any other info is needed, I'm willing to invest quite some time to > provide it! > > Regards, > Sebastiaan Run the following command: sudo camcontrol tags da0 If it returns something like this: (pass0:mpt0:0:0:0): device openings: 1 then run the following command: sudo camcontrol tags da0 -N 64 If this works in improving performance, it can be put into a startup script. I have no idea why the controller is misbehaving with this yet, but I'm working on it. Scott