From owner-svn-src-all@freebsd.org Fri Oct 16 21:01:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD007A171F2 for ; Fri, 16 Oct 2015 21:01:00 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B214F83C for ; Fri, 16 Oct 2015 21:01:00 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by padcn9 with SMTP id cn9so15311948pad.2 for ; Fri, 16 Oct 2015 14:00:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=DMcmxZeTV6vfIknNiDjqRCx0HvY/gwFCGbBFWy4mvQY=; b=MpBCI1HlkEUgRAwF32IY7+8b86kMvcWgAgjxpypMoWhp5X3oJg1Qr56yN/jGnDVxT/ DCxDsprrER4Q0uX/idqCFpsFG9cp5p0Kh8C3gfzPs2BRK+QLBcbf84DBkT2cLl9N5UA1 QBYRzoPlsOltb4yR5zHzJYQXpeCG9diTQW9HBtJoeILKppI1cwwEd01UEe1svSu8OVO6 +pJTp5NXQhNhMuxkJY8mdhqSRPqlrKuVlZdouWS1Efd4gaza7moJumsSF9OMMgynFpqX 3cysmpQx7rOJk2PA894Gtx6XEP+4ImgjyzwEqyTHfqp7vTVc/TCQloY0sovpTMybjywm YQ1A== X-Gm-Message-State: ALoCoQkCvGphwH6XqbooQiIcLLbIRmu0mprOlfXxhWqb4rPHUwvPiT8XumVI3UkyaWVFivouFH1S X-Received: by 10.66.221.170 with SMTP id qf10mr18277308pac.134.1445029254443; Fri, 16 Oct 2015 14:00:54 -0700 (PDT) Received: from ip-100-127-128-61.ec2.internal ([69.53.245.6]) by smtp.gmail.com with ESMTPSA id fm3sm22851111pbb.36.2015.10.16.14.00.53 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Oct 2015 14:00:53 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r289405 - head/sys/ufs/ffs Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_C25C7893-14A4-420C-B308-F1CCEDBC1EC2"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <20151016201850.GP6469@zxy.spb.ru> Date: Fri, 16 Oct 2015 15:00:50 -0600 Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <4FC55895-99AF-4E5B-9E1B-C5085F3FC178@bsdimp.com> References: <201510160306.t9G3622O049128@repo.freebsd.org> <20151016131940.GE42243@zxy.spb.ru> <3ADA7934-3EE1-449E-A8D1-723B73020C13@bsdimp.com> <20151016201850.GP6469@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 21:01:01 -0000 --Apple-Mail=_C25C7893-14A4-420C-B308-F1CCEDBC1EC2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 16, 2015, at 2:18 PM, Slawa Olhovchenkov = wrote: >=20 > On Fri, Oct 16, 2015 at 01:22:44PM -0600, Warner Losh wrote: >=20 >>=20 >>> On Oct 16, 2015, at 7:19 AM, Slawa Olhovchenkov = wrote: >>>=20 >>> On Fri, Oct 16, 2015 at 03:06:02AM +0000, Warner Losh wrote: >>>=20 >>>> Author: imp >>>> Date: Fri Oct 16 03:06:02 2015 >>>> New Revision: 289405 >>>> URL: https://svnweb.freebsd.org/changeset/base/289405 >>>>=20 >>>> Log: >>>> Do not relocate extents to make them contiguous if the underlying = drive can do >>>> deletions. Ability to do deletions is a strong indication that this >>>> optimization will not help performance. It will only generate extra = write >>>> traffic. These devices are typically flash based and have a limited = number of >>>> write cycles. In addition, making the file contiguous in LBA space = doesn't >>>> improve the access times from flash devices because they have no = seek time. >>>=20 >>> In reality, flash devices have seek time, about 0.1ms. >>> Many flash devices can do 8 simultaneously "seek" (I think NVMe can = do >>> more). >>=20 >> That's just not true. tREAD for most flash is a few tens of = microseconds. The >> streaming time is at most 10 microseconds. There's no "seek" time in = the classic >> sense. Once you get the data, you have it. There's no extra "read = time" in >> the NAND flash parts. >>=20 >> And the number of simultaneous reads depends a lot on how the flash = vendor >> organized the flash. Many of today's designs use 8 or 16 die parts = that have 2 >> to 4 planes on them, giving a parallelism in the 16-64 range. And = that's before >> we get into innovative strategies that use partial page reads to = decrease tREAD >> time and novel data striping methods. >>=20 >> Seek time, as a separate operation, simply doesn't exist. >>=20 >> Furthermore, NAND-based devices are log-structured with garbage = collection >> for both retention and to deal with retired blocks in the underlying = NAND. The >> relationship between LBA ranges and where the data is at any given = time on >> the NAND is almost uncorrelated. >>=20 >> So, rearranging data so that it is in LBA contiguous ranges doesn't = help once >> you're above the FFS block level. >=20 > Stream of random reads 512-4096 bytes from most flash SATA drives in = one > thread give about 10K IOPS. This is only 40Mbit/s from 6*0.8 Gbit/s > SATA bandwidth. You may decompose 0.1ms to different, real delay (bank > select, command process and etc.) or give 0.1ms seek time for all > practical purpose. I strongly disagree. That=E2=80=99s not seek time in the classic sense. = All of those 100us are the delay from reading the data from the flash. The reason I=E2=80=99m= so adamant is that adjacent pages read have exactly the same cost. In a spinning = disk, adjacent sectors read have a tiny cost compared to moving the head = (seeking). Then again, I spent almost three years building a PCIe NAND-based flash drive, so maybe I=E2=80=99m biased by that experience... Warner --Apple-Mail=_C25C7893-14A4-420C-B308-F1CCEDBC1EC2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJWIWWDAAoJEGwc0Sh9sBEAmroP+wWo8J4NU8z/c2CLNEE4usuk 1Qkb/8V8TgQ7+QZc+931yh4zOIqz2pL0XgHTjywHCIva28/lvoxSAPgLSSLBRm2l JPHrTssUWLRMiBhB/bdIidVPhQeGoSWXP4OcoPC8EXpn5HC/LEe7LV0q2LK94OQh vgHOo6AqF/0ttj/pZ/pnEC1DuXVFz6CdDOV3zKOpPB26QOMhElfGbBjVDrKx7jBq iB14C0BUFAixzjBiP22o6oDw63NGwDKAertByiR4XebxTT/1hlYAuOeZm+pzFGg0 iTm9uJS9N/FG1lkAyUVjUVwA5jTWg1KeW0ABZIXVrZnDU8RFiji+K8ZSikWukEiX CIZkq9GrZB87Wpi/us5tLLKvv3VQ6hLdcMzsLcbcpjSJz/l9X56Gn4gqKoC45usL W4PELjcLXhJhvlSD7xsnZtcHnD5KvupKXI+d0qApOSjdJ7PGQBPfeIgjFywtlhlS GZLloU0Om9oAuWcUc/CbV00eyfxjgYzjNjHWNqNBYFWb4AiHx8sTP+2HuDmh+v1R oO3LJNRSAbjeJpoULU0KFuio5T3Nh0tv3HF5vJWiSWlgZtjs1JWrMCdkahpnFtq8 F19GHKlcgYAa5zP+FOQq2q/ZwLzf+VIza2bA943PUswMoD+2C88ELCvTzD11OwKF 0W8NR/Ni2gjZ8vgNxMXO =niQ2 -----END PGP SIGNATURE----- --Apple-Mail=_C25C7893-14A4-420C-B308-F1CCEDBC1EC2--