All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH blktests] tests: use nproc to get number of CPUs for fio jobs
@ 2017-06-29 11:40 Johannes Thumshirn
  2017-06-29 14:08 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Thumshirn @ 2017-06-29 11:40 UTC (permalink / raw)
  To: Omar Sandoval
  Cc: Jens Axboe, Linux Block Layer Mailinglist, Johannes Thumshirn

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 tests/block/004 | 2 +-
 tests/block/005 | 2 +-
 tests/block/006 | 2 +-
 tests/block/008 | 2 +-
 tests/block/011 | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/block/004 b/tests/block/004
index 754d30260d63..2dc0f25b27cc 100755
--- a/tests/block/004
+++ b/tests/block/004
@@ -29,7 +29,7 @@ test_device() {
 
 	FIO_PERF_FIELDS=("write iops")
 	_fio_perf --bs=4k --rw=randwrite --norandommap --fsync=1 \
-		--number_ios=256 --numjobs=64 --name=flushes \
+		--number_ios=256 --numjobs=$(nproc) --name=flushes \
 		--filename="$TEST_DEV"
 
 	echo "Test complete"
diff --git a/tests/block/005 b/tests/block/005
index 8f8b7065404e..4d4d536324ab 100755
--- a/tests/block/005
+++ b/tests/block/005
@@ -38,7 +38,7 @@ test_device() {
 	# start fio job
 	_run_fio --bs=4k --rw=randread --norandommap \
 		--name=reads --filename="$TEST_DEV" --size="$size" \
-		--numjobs=8 --direct=1 &
+		--numjobs=$(nproc) --direct=1 &
 
 	# while job is running, switch between schedulers
 	while kill -0 $! 2>/dev/null; do
diff --git a/tests/block/006 b/tests/block/006
index 18e31cbf3809..2b8450104e46 100755
--- a/tests/block/006
+++ b/tests/block/006
@@ -43,7 +43,7 @@ test() {
 		--filename=/dev/nullb0 --size=5g --direct=1
 
 	# run async test
-	_fio_perf --bs=4k --ioengine=libaio --iodepth=8 --numjobs=4 \
+	_fio_perf --bs=4k --ioengine=libaio --iodepth=8 --numjobs=$(nproc) \
 		--rw=randread --norandommap --name=async \
 		--filename=/dev/nullb0 --size=5g --direct=1
 
diff --git a/tests/block/008 b/tests/block/008
index 033fa0d5e7a5..db8fecc54676 100755
--- a/tests/block/008
+++ b/tests/block/008
@@ -38,7 +38,7 @@ test_device() {
 	# start fio job
 	_run_fio --bs=4k --rw=randread --norandommap \
 		--name=reads --filename="$TEST_DEV" --size="$size" \
-		--numjobs=8 --direct=1 &
+		--numjobs=$(nproc) --direct=1 &
 
 	# while job is running, hotplug CPUs randomly
 	while kill -0 $! 2>/dev/null; do
diff --git a/tests/block/011 b/tests/block/011
index 65ed3dfa7092..53ed7e037d21 100755
--- a/tests/block/011
+++ b/tests/block/011
@@ -42,7 +42,7 @@ test_device() {
 	# start fio job
 	_run_fio --bs=4k --rw=randread --norandommap \
 		--name=reads --filename="$TEST_DEV" --size="$size" \
-		--numjobs=8 --direct=1 --ignore_error=EIO,ENXIO,ENODEV &
+		--numjobs=$(nproc) --direct=1 --ignore_error=EIO,ENXIO,ENODEV &
 
 	while kill -0 $! 2>/dev/null; do
 		echo 0 > "/sys/bus/pci/devices/${pdev}/enable"
-- 
2.12.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH blktests] tests: use nproc to get number of CPUs for fio jobs
  2017-06-29 11:40 [PATCH blktests] tests: use nproc to get number of CPUs for fio jobs Johannes Thumshirn
@ 2017-06-29 14:08 ` Jens Axboe
  2017-06-29 14:13   ` Johannes Thumshirn
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2017-06-29 14:08 UTC (permalink / raw)
  To: Johannes Thumshirn, Omar Sandoval; +Cc: Linux Block Layer Mailinglist

On 06/29/2017 05:40 AM, Johannes Thumshirn wrote:
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> ---
>  tests/block/004 | 2 +-
>  tests/block/005 | 2 +-
>  tests/block/006 | 2 +-
>  tests/block/008 | 2 +-
>  tests/block/011 | 2 +-
>  5 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/block/004 b/tests/block/004
> index 754d30260d63..2dc0f25b27cc 100755
> --- a/tests/block/004
> +++ b/tests/block/004
> @@ -29,7 +29,7 @@ test_device() {
>  
>  	FIO_PERF_FIELDS=("write iops")
>  	_fio_perf --bs=4k --rw=randwrite --norandommap --fsync=1 \
> -		--number_ios=256 --numjobs=64 --name=flushes \
> +		--number_ios=256 --numjobs=$(nproc) --name=flushes \
>  		--filename="$TEST_DEV"

NAK on this bit. Let's use the nproc for cases that just want a random
suitable workload for their machine. For flush, the idea here is to
use a ton of flushes. This has shown bugs in the past, like this
for instance:

commit 7520872c0cf4d3df6d74242c6edfb9e70a47df4d
Author: Jens Axboe <axboe@fb.com>
Date:   Fri Feb 17 11:40:44 2017 -0700

    block: don't defer flushes on blk-mq + scheduling

For the other tests in your patch, the change looks fine. But I would
greatly prefer if we just turned that into a

__run_fio_mix

or similar command, since the jobs should basically be identical.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH blktests] tests: use nproc to get number of CPUs for fio jobs
  2017-06-29 14:08 ` Jens Axboe
@ 2017-06-29 14:13   ` Johannes Thumshirn
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2017-06-29 14:13 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Omar Sandoval, Linux Block Layer Mailinglist

On Thu, Jun 29, 2017 at 08:08:32AM -0600, Jens Axboe wrote:
> For the other tests in your patch, the change looks fine. But I would
> greatly prefer if we just turned that into a
> 
> __run_fio_mix

Sounds reasonable. I'll prepare a v2

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N�rnberg
GF: Felix Imend�rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N�rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-29 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 11:40 [PATCH blktests] tests: use nproc to get number of CPUs for fio jobs Johannes Thumshirn
2017-06-29 14:08 ` Jens Axboe
2017-06-29 14:13   ` Johannes Thumshirn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.