From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 12 09:54:30 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 017132F9 for ; Tue, 12 Aug 2014 09:54:30 +0000 (UTC) Received: from natasha.panasas.com (natasha.panasas.com [209.166.131.148]) by mx1.freebsd.org (Postfix) with ESMTP id A4C7424ED for ; Tue, 12 Aug 2014 09:54:29 +0000 (UTC) Received: from seabiscuit.panasas.com (seabiscuit.panasas.com [172.17.132.204]) by natasha.panasas.com (8.13.1/8.13.1) with ESMTP id s7C6uRm6001788 for ; Tue, 12 Aug 2014 02:56:27 -0400 Received: from SEABISCUIT.int.panasas.com ([172.17.132.204]) by seabiscuit ([172.17.132.204]) with mapi id 14.03.0181.006; Mon, 11 Aug 2014 23:56:26 -0700 From: "Pokala, Ravi" To: "freebsd-hackers@freebsd.org" Subject: IO chunking Thread-Topic: IO chunking Thread-Index: AQHPtfqI63Kw96jg+06V8le/JTT3Wg== Date: Tue, 12 Aug 2014 06:56:26 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.4.3.140616 x-originating-ip: [172.17.28.63] Content-Type: text/plain; charset="us-ascii" Content-ID: <5E483D88CA179944B0C3C8525A9DF361@panasas.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 09:54:30 -0000 Hi folks, I'm doing moderately-large block IO (16KB - 1MB) directly against drive devices (i.e. /dev/adaX), and I see that `iostat -d adaX' reports a transaction size of at most 128KB. I believe this is because transactions are limited to at most MAXPHYS bytes (128KB), and requests larger than that are broken into smaller chunks; is that correct? If so, where does that chunking happen? In low-level GEOM code (geom_io.c, geom_dev.c)? In CAM? In the drive device driver? In VFS? The context here is that I'm doing some testing in multiples of the drive's logical sector size. At low LBAs, SATA allows up to 256 sectors per command; (256 sectors) * (512B / sector) =3D 128KB =3D=3D MAXPHYS, so w= e can reach maximum sector counts w/o chunking on 512n or AF-512e drives. However, on AF-4Kn drives, (128KB / txn) * (sector / 4KB) =3D (32 sectors / txn), so chunking happens well before maxing out the SATA command (256 sectors). Any pointers? Thanks, Ravi