[illumos-Developer] Question about zio_taskqs in spa.c

George Wilson gwilson at zfsmail.com
Mon Jul 18 18:39:22 PDT 2011


The value of 8 and 100 are the number of threads for the specific taskq 
and they are meant to provide sufficient concurrency. The interesting 
one is why we need so many threads for free. This is to deal with dedup 
frees since they are done in syncing context and we need to make sure 
that we process them in parallel. We decided 100 was probably a good number.

Hope that helps,
George

On 7/15/11 12:53 PM, WenChun Cheng wrote:
> Hi all,
>
> Can someone please explain the reasons behind the following
> configuration? Especially on the ZTI_FIX(8) for read and ZTI_FIX(100)
> for free.
>
> /*
>    * Define the taskq threads for the following I/O types:
>    * 	NULL, READ, WRITE, FREE, CLAIM, and IOCTL
>    */
> const zio_taskq_info_t zio_taskqs[ZIO_TYPES][ZIO_TASKQ_TYPES] = {
>    /* ISSUE ISSUE_HIGH INTR INTR_HIGH */
>    { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL },
>    { ZTI_FIX(8), ZTI_NULL, ZTI_BATCH, ZTI_NULL },
>    { ZTI_BATCH, ZTI_FIX(5), ZTI_FIX(8), ZTI_FIX(5) },
>    { ZTI_FIX(100), ZTI_NULL, ZTI_ONE, ZTI_NULL },
>    { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL },
>    { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL },
> };
>
> Thanks,
> --Wenchun Cheng
>
> _______________________________________________
> Developer mailing list
> Developer at lists.illumos.org
> http://lists.illumos.org/m/listinfo/developer




More information about the Developer mailing list