From owner-freebsd-hackers@freebsd.org Fri Feb 22 15:01:41 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55E3F14EEC80 for ; Fri, 22 Feb 2019 15:01:41 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62872702CB for ; Fri, 22 Feb 2019 15:01:40 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-f47.google.com with SMTP id q11so1952150lfd.3 for ; Fri, 22 Feb 2019 07:01:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7++tnCrmDTB0i3eFkgK+CLZVB8QgnRjWQzQxkBPfH6k=; b=FAXwUc5M0QooJTqICo71qxgg1uIdv/mZvTpFd52UYiM7jtMwuXhWYaovjsNUt1kfxl 54TpjWjilgevteqIGcEyNRwukc8e26ZCdUm8BV5JbthV9/AvTra+/NNniUSarpFgScx2 SSjcZ7zgu7/seol8VxQRSXopOgL3g70opaDWaPOg5Ey0tquHDaPJcMhP6Rb1FpudAtMi dMXpCvw93CIvSA3xG9rsiiQCtHhFM/r4Vm57ny1kWn/ZZg0VYvOJJcKI7+aOhfVKLWrL ffTzC57i3EWOK7xKzOtxsbyqQIV0BrCFyZr7/TnqyrAAxN6E61+2PD3NQR9DiDOeLcif Vldg== X-Gm-Message-State: AHQUAubr5R8zWqIbYziKPonv5aZVUCuxbK5xuPf0h9JQ8RwPZDtQA470 QB9GHcun/o5UHQE9n8yAzGJLyZkJCmh/xFMX8ME= X-Google-Smtp-Source: AHgI3IZBdtpHuu0lhZnE7AqXcUh0YPwhGsPLu8048RJC9YiPTJZhfWb7sWS8RgKJ445Y7s3l1U7DqlYS6FEraFYdAIo= X-Received: by 2002:ac2:4343:: with SMTP id o3mr2406691lfl.129.1550847327774; Fri, 22 Feb 2019 06:55:27 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Fri, 22 Feb 2019 07:55:16 -0700 Message-ID: Subject: Re: Any ideal way to run FIO benchmarking for NVMEe devices in FreeBSD To: Rebecca Cran Cc: Rajesh Kumar , FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 62872702CB X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.47 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-4.22 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; MIME_TRACE(0.00)[0:+]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[47.167.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.92)[-0.923,0]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; IP_SCORE(-1.29)[ip: (-0.57), ipnet: 209.85.128.0/17(-3.80), asn: 15169(-1.99), country: US(-0.07)]; FREEMAIL_CC(0.00)[gmail.com] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2019 15:01:41 -0000 On Fri, Feb 22, 2019 at 5:29 AM Rebecca Cran via freebsd-hackers wrote: > > On 2/22/19 1:51 AM, Rajesh Kumar wrote: > > 1. Should we use "posixaio" as the ioengine (or) something else? > > 2. Should we use single thread (or) multiple threads for test? If > > multiple threads, how can we decide on the optimal thread count? > > 3. Should we use "raw device files" (Eg: nvme namespace file - > > /dev/nvme0ns1) without filesystem (or) use a mounted filesystem with a > > regular file (Eg: /mnt/nvme/test1). Looks like raw device files give better > > numbers. > > 4. Should we use a shared file (or) one file per thread? > > 5. I believe 1Job should be fine for benchmarking. (or) should we try > > multiple jobs? > > > I just ran a quick test on a filesystem on my machine which has an M.2 > NVMe drive, and it seems posixaio performs pretty poorly compared to the > sync ioengine: around 700 MB/s vs. 1100 MB/s! When AIO is run on a filesystem, it uses an internal thread pool to process requests. But if you run it on a bare drive, then the I/O is direct and should be faster than the sync ioengine. -Alan > > I _was_ going to suggest using posixaio and setting iodepth to something > like 32, but since it performs badly I'd suggest playing around with the > numjobs parameter and seeing where the best performance is achieved - > whether that's latency or throughput. > > > On my system, single-threaded achieves ~530 MB/s, 8 jobs/threads 1150 > MB/s and 32 1840 MB/s with a 4 KB block size. > > Bumping the block size from 4 KB to 16 KB makes the throughput more > jumpy, but appears to average 2300 MB/s when used with 32 jobs. > > > -- > Rebecca Cran > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"