diff options
author | DHE <[email protected]> | 2015-12-16 14:22:32 -0500 |
---|---|---|
committer | Ned Bass <[email protected]> | 2015-12-23 17:29:34 -0800 |
commit | f7dfb8b07ac9e6d41b2f6b568ad4ca7b84b8fa71 (patch) | |
tree | e9fdd79c0906c9874dad0d14e32e637436480b53 | |
parent | 15126e5d08d54643ee2e433849795c4b2c4e5f45 (diff) |
Make zio_taskq_batch_pct user configurable
Adds zio_taskq_batch_pct as an exported module parameter,
allowing users to modify it at module load time.
Signed-off-by: DHE <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #4110
-rw-r--r-- | man/man5/zfs-module-parameters.5 | 17 | ||||
-rw-r--r-- | module/zfs/spa.c | 7 |
2 files changed, 23 insertions, 1 deletions
diff --git a/man/man5/zfs-module-parameters.5 b/man/man5/zfs-module-parameters.5 index 015ab0186..bce26fa9d 100644 --- a/man/man5/zfs-module-parameters.5 +++ b/man/man5/zfs-module-parameters.5 @@ -1601,6 +1601,23 @@ Default value: \fB0\fR. .sp .ne 2 .na +\fBzio_taskq_batch_pct\fR (uint) +.ad +.RS 12n +Percentage of online CPUs (or CPU cores, etc) which will run a worker thread +for IO. These workers are responsible for IO work such as compression and +checksum calculations. Fractional number of CPUs will be rounded down. +.sp +The default value of 75 was chosen to avoid using all CPUs which can result in +latency issues and inconsistent application performance, especially when high +compression is enabled. +.sp +Default value: \fB75\fR. +.RE + +.sp +.ne 2 +.na \fBzvol_inhibit_dev\fR (uint) .ad .RS 12n diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 2e23a341f..b4831a724 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -867,7 +867,7 @@ spa_taskqs_init(spa_t *spa, zio_type_t t, zio_taskq_type_t q) case ZTI_MODE_BATCH: batch = B_TRUE; flags |= TASKQ_THREADS_CPU_PCT; - value = zio_taskq_batch_pct; + value = MIN(zio_taskq_batch_pct, 100); break; default: @@ -6804,4 +6804,9 @@ MODULE_PARM_DESC(spa_load_verify_metadata, module_param(spa_load_verify_data, int, 0644); MODULE_PARM_DESC(spa_load_verify_data, "Set to traverse data on pool import"); + +module_param(zio_taskq_batch_pct, uint, 0444); +MODULE_PARM_DESC(zio_taskq_batch_pct, + "Percentage of CPUs to run an IO worker thread"); + #endif |