From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 18 20:12:12 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 02A42C2A; Fri, 18 Jan 2013 20:12:12 +0000 (UTC) (envelope-from dieterbsd@gmail.com) Received: from mail-ie0-f177.google.com (mail-ie0-f177.google.com [209.85.223.177]) by mx1.freebsd.org (Postfix) with ESMTP id A9670369; Fri, 18 Jan 2013 20:12:11 +0000 (UTC) Received: by mail-ie0-f177.google.com with SMTP id k13so6799254iea.22 for ; Fri, 18 Jan 2013 12:12:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=vlKrdXk0EKjr4rKgFz4eK6NWxAp+9FByx7Tm0xKwPrM=; b=eBEfKkfOgZz6FOkSbABqXd6bn7byfzyhskslOH24Q76ylpmDtdei+JMl0tHhxA+o+Y Lg54SDF0TVX0XNGs4E60XUyqAeqFev/TbGbHpn4k6hSMSUBE+mN/eeKFUOToj/+/gXSS 5bWzMXVVwnJ9HbfzxbjeTq5P+EX5VwdpXb8+cK7eeZ4TnZo8QR7cr296PfliikBL9cxh zpJRXLjdqDtHagCdCpenafTCMsFBJxe5DaANWZ8r9yBT0BUI/n8utU3SmE592Zjhg2DV fH/q7GEb6wVlVjZJrIIac9rG0o3RLDOhGYbUdglW9IEJaT6FJc36Am+VCyJLqa0+mqQR uauA== MIME-Version: 1.0 X-Received: by 10.50.159.165 with SMTP id xd5mr3189532igb.82.1358539931237; Fri, 18 Jan 2013 12:12:11 -0800 (PST) Received: by 10.64.107.196 with HTTP; Fri, 18 Jan 2013 12:12:11 -0800 (PST) Date: Fri, 18 Jan 2013 12:12:11 -0800 Message-ID: Subject: Re: IBM blade server abysmal disk write performances From: Dieter BSD To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: gibbs@FreeBSD.org, scottl@FreeBSD.org, mjacob@FreeBSD.org 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: Fri, 18 Jan 2013 20:12:12 -0000 Wojciech writes: > If computer have UPS then write caching is fine. even if FreeBSD crash, > disk would write data That is incorrect. A UPS reduces the risk, but does not eliminate it. It is impossible to completely eliminate the risk of having the write cache on. If you care about your data you must turn the disk's write cache off. If you are using the drive in an application where the data does not matter, or can easily be regenerated (e.g. disk duplication, if it fails, just start over), then turning the write cache on for that one drive can be ok. There is a patch that allows turning the write cache on and off on a per drive basis. The patch is for ata(4), but should be possible with other drivers. camcontrol(8) may work for SCSI and SAS drives. I have yet to see a USB-to-*ATA bridge that allows turning the write cache off, so USB disks are useless for most applications. But for most applications, you must have the write cache off, and you need queuing (e.g. TCQ or NCQ) for performance. If you have queuing, there is no need to turn the write cache on. It is inexcusable that FreeBSD defaults to leaving the write cache on for SATA & PATA drives. At least the admin can easily fix this by adding hw.ata.wc=0 to /boot/loader.conf. The bigger problem is that FreeBSD does not support queuing on all controllers that support it. Not something that admins can fix, and inexcusable for an OS that claims to care about performance.