mirror_zfs/module/os/linux/spl
ednadolski-ix 3bd4df3841
Improve ZFS objset sync parallelism
As part of transaction group commit, dsl_pool_sync() sequentially calls
dsl_dataset_sync() for each dirty dataset, which subsequently calls
dmu_objset_sync().  dmu_objset_sync() in turn uses up to 75% of CPU
cores to run sync_dnodes_task() in taskq threads to sync the dirty
dnodes (files).

There are two problems:

1. Each ZVOL in a pool is a separate dataset/objset having a single
   dnode.  This means the objsets are synchronized serially, which
   leads to a bottleneck of ~330K blocks written per second per pool.

2. In the case of multiple dirty dnodes/files on a dataset/objset on a
   big system they will be sync'd in parallel taskq threads. However,
   it is inefficient to to use 75% of CPU cores of a big system to do
   that, because of (a) bottlenecks on a single write issue taskq, and
   (b) allocation throttling.  In addition, if not for the allocation
   throttling sorting write requests by bookmarks (logical address),
   writes for different files may reach space allocators interleaved,
   leading to unwanted fragmentation.

The solution to both problems is to always sync no more and (if
possible) no fewer dnodes at the same time than there are allocators
the pool.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Edmund Nadolski <edmund.nadolski@ixsystems.com>
Closes #15197
2023-11-06 10:38:42 -08:00
..
README.md Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-atomic.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-condvar.c Fix declarations of non-global variables 2022-10-18 11:05:32 -07:00
spl-cred.c Linux 6.3 compat: idmapped mount API changes 2023-04-10 14:15:36 -07:00
spl-err.c Fix declarations of non-global variables 2022-10-18 11:05:32 -07:00
spl-generic.c Linux: Fix octal detection in define_ddi_strtox() 2023-03-08 13:52:09 -08:00
spl-kmem-cache.c Linux: Never sleep in kmem_cache_alloc(..., KM_NOSLEEP) (#14926) 2023-06-07 10:43:43 -07:00
spl-kmem.c Clean up CSTYLEDs 2022-01-26 11:38:52 -08:00
spl-kstat.c Cleanup: Switch to strlcpy from strncpy 2022-09-27 16:35:29 -07:00
spl-proc.c Linux 6.5 compat: spl: properly unregister sysctl entries 2023-09-07 14:36:32 -07:00
spl-procfs-list.c Linux 6.1 compat: change order of sys/mutex.h includes 2022-10-18 12:29:44 -07:00
spl-taskq.c Improve ZFS objset sync parallelism 2023-11-06 10:38:42 -08:00
spl-thread.c Cleanup of dead code suggested by Clang Static Analyzer (#14380) 2023-01-17 09:57:12 -08:00
spl-trace.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
spl-tsd.c Linux SPL module init: Handle memory allocation failures correctly 2022-09-08 10:28:20 -07:00
spl-vmem.c Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
spl-xdr.c module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
spl-zlib.c Linux SPL module init: Handle memory allocation failures correctly 2022-09-08 10:28:20 -07:00
spl-zone.c Cleanup: Use C99 flexible array members instead of zero length arrays 2023-01-12 15:59:41 -08:00
THIRDPARTYLICENSE.gplv2 OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00
THIRDPARTYLICENSE.gplv2.descrip OpenZFS restructuring - move platform specific sources 2019-09-06 11:26:26 -07:00

The Solaris Porting Layer, SPL, is a Linux kernel module which provides a compatibility layer used by the OpenZFS project.

Installation

The latest version of the SPL is maintained as part of this repository. Only when building ZFS version 0.7.x or earlier must an external SPL release be used. These releases can be found at:

Release

The SPL is released under a GPLv2 license.
For more details see the NOTICE and THIRDPARTYLICENSE files; UCRL-CODE-235197