Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
SPL(4)			     Kernel Interfaces Manual			  SPL(4)

NAME
     spl -- parameters of the SPL kernel module

DESCRIPTION
     spl_kmem_cache_kmem_threads=4 (uint)
	     The  number  of  threads created for the spl_kmem_cache task queue.
	     This task queue is responsible for allocating new slabs for use  by
	     the  kmem caches.	For the majority of systems and workloads only a
	     small number of threads are required.

     spl_kmem_cache_obj_per_slab=8 (uint)
	     The preferred number of objects per slab in the cache.  In general,
	     a larger value will increase the caches memory footprint while  de-
	     creasing the time required to perform an allocation.  Conversely, a
	     smaller value will minimize the footprint and improve cache reclaim
	     time but individual allocations may take longer.

     spl_kmem_cache_max_size=32 (64-bit) or 4 (32-bit) (uint)
	     The  maximum  size  of  a kmem cache slab in MiB.	This effectively
	     limits	the	maximum      cache	object	    size      to
	     spl_kmem_cache_max_size/spl_kmem_cache_obj_per_slab.

	     Caches may not be created with object sized larger than this limit.

     spl_kmem_cache_slab_limit=16384 (uint)
	     For  small  objects the Linux slab allocator should be used to make
	     the most efficient use of the memory.  However, large  objects  are
	     not  supported  by the Linux slab and therefore the SPL implementa-
	     tion is preferred.  This value is used to determine the cutoff  be-
	     tween a small and large object.

	     Objects  of size spl_kmem_cache_slab_limit or smaller will be allo-
	     cated using the Linux slab allocator, large objects use the SPL al-
	     locator.  A cutoff of 16K was determined to be optimal  for  archi-
	     tectures using 4K pages.

     spl_kmem_alloc_warn=32768 (uint)
	     As a general rule kmem_alloc() allocations should be small, prefer-
	     ably  just  a  few pages, since they must by physically contiguous.
	     Therefore, a rate limited warning will be printed	to  the  console
	     for any kmem_alloc() which exceeds a reasonable threshold.

	     The  default  warning threshold is set to eight pages but capped at
	     32K to accommodate systems using large pages.  This value	was  se-
	     lected  to  be  small  enough to ensure the largest allocations are
	     quickly noticed and fixed.  But large enough to avoid  logging  any
	     warnings  when  a	allocation size is larger than optimal but not a
	     serious concern.  Since this value is tunable, developers	are  en-
	     couraged  to  set	it lower when testing so any new largish alloca-
	     tions are quickly caught.	These warnings may be disabled	by  set-
	     ting the threshold to zero.

     spl_kmem_alloc_max=KMALLOC_MAX_SIZE/4 (uint)
	     Large   kmem_alloc()   allocations   will	 fail	if  they  exceed
	     KMALLOC_MAX_SIZE.	Allocations which are  marginally  smaller  than
	     this  limit  may succeed but should still be avoided due to the ex-
	     pense of locating a contiguous range of free pages.   Therefore,  a
	     maximum  kmem  size  with	reasonable  safely  margin of 4x is set.
	     kmem_alloc() allocations larger  than  this  maximum  will  quickly
	     fail.   vmem_alloc()  allocations	less than or equal to this value
	     will use kmalloc(), but shift  to	vmalloc()  when  exceeding  this
	     value.

     spl_kmem_cache_magazine_size=0 (uint)
	     Cache  magazines  are an optimization designed to minimize the cost
	     of allocating memory.  They do this by keeping a per-CPU  cache  of
	     recently  freed objects, which can then be reallocated without tak-
	     ing a lock.  This	can  improve  performance  on  highly  contended
	     caches.   However, because objects in magazines will prevent other-
	     wise empty slabs from being immediately released this  may  not  be
	     ideal for low memory machines.

	     For  this reason, spl_kmem_cache_magazine_size can be used to set a
	     maximum magazine size.  When this value is set to	0  the	magazine
	     size  will  be  automatically  determined based on the object size.
	     Otherwise magazines will be limited to 2-256 objects  per	magazine
	     (i.e.  per  CPU).	Magazines may never be entirely disabled in this
	     implementation.

     spl_hostid=0 (ulong)
	     The system hostid, when set this can be used to uniquely identify a
	     system.  By default this value is set to zero which  indicates  the
	     hostid  is  disabled.   It  can  be explicitly enabled by placing a
	     unique non-zero value in /etc/hostid.

     spl_hostid_path=/etc/hostid (charp)
	     The expected path to locate the system hostid when specified.  This
	     value may be overridden for non-standard configurations.

     spl_panic_halt=0 (uint)
	     Cause a kernel panic on assertion failures.  When not enabled,  the
	     thread is halted to facilitate further debugging.

	     Set to a non-zero value to enable.

     spl_taskq_kick=0 (uint)
	     Kick  stuck  taskq to spawn threads.  When writing a non-zero value
	     to it, it will scan all the taskqs.  If any of them have a  pending
	     task  more  than  5  seconds  old,  it  will  kick it to spawn more
	     threads.  This can be used if you find a rare deadlock  occurs  be-
	     cause one or more taskqs didn't spawn a thread when it should.

     spl_taskq_thread_bind=0 (int)
	     Bind  taskq  threads  to  specific  CPUs.	 When  enabled all taskq
	     threads will be distributed evenly across the available  CPUs.   By
	     default, this behavior is disabled to allow the Linux scheduler the
	     maximum flexibility to determine where a thread should run.

     spl_taskq_thread_dynamic=1 (int)
	     Allow   dynamic   taskqs.	  When	enabled  taskqs  which	set  the
	     TASKQ_DYNAMIC flag will by default create	only  a  single  thread.
	     New  threads will be created on demand up to a maximum allowed num-
	     ber to facilitate the completion  of  outstanding	tasks.	 Threads
	     which  are no longer needed will be promptly destroyed.  By default
	     this behavior is enabled but it can be disabled to aid  performance
	     analysis or troubleshooting.

     spl_taskq_thread_priority=1 (int)
	     Allow  newly  created  taskq threads to set a non-default scheduler
	     priority.	When enabled, the priority specified  when  a  taskq  is
	     created will be applied to all threads created by that taskq.  When
	     disabled  all threads will use the default Linux kernel thread pri-
	     ority.  By default, this behavior is enabled.

     spl_taskq_thread_sequential=4 (int)
	     The number of items a taskq worker thread must handle  without  in-
	     terruption  before requesting a new worker thread be spawned.  This
	     is used to control how quickly taskqs ramp up the number of threads
	     processing the queue.  Because Linux thread creation  and	destruc-
	     tion  are relatively inexpensive a small default value has been se-
	     lected.  This means that normally threads will be	created  aggres-
	     sively  which is desirable.  Increasing this value will result in a
	     slower thread creation rate which may be preferable for  some  con-
	     figurations.

     spl_taskq_thread_timeout_ms=5000 (uint)
	     Minimum  idle  threads  exit  interval for dynamic taskqs.  Smaller
	     values allow idle	threads  exit  more  often  and  potentially  be
	     respawned again on demand, causing more churn.

FreeBSD ports 15.quarterly	   May 7, 2025				  SPL(4)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=spl&sektion=4&manpath=FreeBSD+Ports+15.1.quarterly>

home | help