From patchwork Thu Nov 16 18:29:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10061937 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DE38D6023A for ; Thu, 16 Nov 2017 18:30:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D10AA2AA94 for ; Thu, 16 Nov 2017 18:30:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C35A82ABA2; Thu, 16 Nov 2017 18:30:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BC972AA94 for ; Thu, 16 Nov 2017 18:30:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760621AbdKPSaD (ORCPT ); Thu, 16 Nov 2017 13:30:03 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:50373 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966026AbdKPSaD (ORCPT ); Thu, 16 Nov 2017 13:30:03 -0500 Received: by mail-qt0-f196.google.com with SMTP id u42so22243737qte.7 for ; Thu, 16 Nov 2017 10:30:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mn/t0HE9eUj9nUpcgvmO2flBQOQM3YJfh/etH0zi65g=; b=eaxDDLaZ1/U2vayHUFXXSI/FJKaJeLH8Qt9yxL2aP5X3lCG1pTtMHhepUHAGBRUEZ7 1D9Rx+XErpna16rBP5vud3rcjri4WbZ9lzB/3GGCSRIJZraGSNp8mSVFysGYlZ+LIUNz PbaO2UN0IAZa9npHQxxjzumexpR2W680c7PKtPHPmftQjZuvJ5h//NI4GllYQkJ1vb7A TNUjOxlA92jmL95vsrvd1vmvoCFfcwt0+ao+Mv6NvqsRqkW9QAHyY2psosgszBeAGELy VrKGtVdscHztzeZLingLL48WsYAsGsSOLWQglj1toMwWZRw/a7d/y+5Gb3F5/0FKaaki UKLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mn/t0HE9eUj9nUpcgvmO2flBQOQM3YJfh/etH0zi65g=; b=W1dmdCNraJ1sF6hwpxLWL4GjPKEUY7lG+8y4nPCdGN8JzXMsaVcQqT1/V1HxKRlwU6 WdTEEaRo7VhDV33WW0noMajs+3qSP7Oaqoc7hk9teTvl8iYabamm1h+k4FdJGz6GCYbh NbcDMxBvfGUQ0kGZet+dnSqFcYLuIARBJyhktlYiTKbI05boe2BudcAtuFgl6ieR0d6M 4DzRo6nOCxLkezCI/KcCzL5DAJZrJgCOvmnPR9lsC2sXj36N0cDIhD0o/iHzm/IGgHZC S5TbLZBpwqvpw5RMdmoU+6qO9vJYWTSdnC3dEaFjJGYZB0Ufv7tuJl3jpQy/z1bAuyuI k/iw== X-Gm-Message-State: AJaThX6ZcCEiEP4XlX54QuOjJ3Bzh6QtR8KS7AOSqmiU0Be8bG0h57FT S9gIsq3Tqtlaw9FlxQLi3u8K1w== X-Google-Smtp-Source: AGs4zMa89r6RmpRGXt68w2ffcXuwSLgpysgrOkSHkdbDeeeNdbnDHUzzWwpcAzr+Gdmp2JGAUYvJ9w== X-Received: by 10.55.201.75 with SMTP id q72mr3970330qki.108.1510857002349; Thu, 16 Nov 2017 10:30:02 -0800 (PST) Received: from localhost (cpe-2606-A000-4381-1201-225-22FF-FEB3-E51A.dyn6.twc.com. [2606:a000:4381:1201:225:22ff:feb3:e51a]) by smtp.gmail.com with ESMTPSA id f189sm1256453qkj.12.2017.11.16.10.30.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Nov 2017 10:30:01 -0800 (PST) From: Josef Bacik To: kernel-team@fb.com, david@fromorbit.com, fstests@vger.kernel.org, tytso@mit.edu, eguan@redhat.com, darrick.wong@oracle.com Cc: Josef Bacik Subject: [PATCH 2/2][v5] perf/001: a random write buffered fio perf test Date: Thu, 16 Nov 2017 13:29:59 -0500 Message-Id: <1510856999-18693-2-git-send-email-josef@toxicpanda.com> X-Mailer: git-send-email 2.7.5 In-Reply-To: <1510856999-18693-1-git-send-email-josef@toxicpanda.com> References: <1510856999-18693-1-git-send-email-josef@toxicpanda.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Josef Bacik This uses the new fio results perf helpers to run a rand write buffered workload on the scratch device. Signed-off-by: Josef Bacik --- v4->v5: - no change v3->v4: - use _require_fs_space instead of _scratch_mkfs_sized. - remove run_check from running fio. v2->v3: - use _scratch_mkfs_sized so we skip if our scratch device is too small. - dump the fio results into teh seqres.full file for debugging. - fixed the _size math, it was all wrong. v1->v2: - no change tests/perf/001 | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/perf/001.out | 2 ++ tests/perf/group | 1 + 3 files changed, 83 insertions(+) create mode 100644 tests/perf/001 create mode 100644 tests/perf/001.out create mode 100644 tests/perf/group diff --git a/tests/perf/001 b/tests/perf/001 new file mode 100644 index 000000000000..a9e933df7791 --- /dev/null +++ b/tests/perf/001 @@ -0,0 +1,80 @@ +#! /bin/bash +# perf/001 Test +# +# Buffered random write performance test. +# +#----------------------------------------------------------------------- +# (c) 2017 Josef Bacik +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +#----------------------------------------------------------------------- +# + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +fio_config=$tmp.fio +fio_results=$tmp.json +status=1 # failure is the default! +trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter +. ./common/perf + +# real QA test starts here +_supported_fs generic +_supported_os Linux +_require_scratch +_require_block_device $SCRATCH_DEV +_require_fio_results + +rm -f $seqres.full + +_size=$((16 * $LOAD_FACTOR)) +cat >$fio_config <> $seqres.full 2>&1 +_scratch_mount +_require_fs_space $SCRATCH_MNT $_size + +cat $fio_config >> $seqres.full +$FIO_PROG --output-format=json --output=$fio_results $fio_config + +_scratch_unmount +cat $fio_results >> $seqres.full +_fio_results_compare $seq $fio_results +echo "Silence is golden" +status=0; exit diff --git a/tests/perf/001.out b/tests/perf/001.out new file mode 100644 index 000000000000..88678b8ed5ad --- /dev/null +++ b/tests/perf/001.out @@ -0,0 +1,2 @@ +QA output created by 001 +Silence is golden diff --git a/tests/perf/group b/tests/perf/group new file mode 100644 index 000000000000..d3ed434926e7 --- /dev/null +++ b/tests/perf/group @@ -0,0 +1 @@ +001 auto