You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature would like to see added to OpenZFS
Several functions in libzfs and the zfs commands construct thread pools sized according to the number of CPUs in the system. They determine that via the sysconf(_SC_NPROCESSORS_ONLN) function. But that reports that total number of CPUs in the system. It would be more appropriate to use the number of CPUs available to the currrent process instead. That can be determined via cpuset_getaffinity on FreeBSD or sched_getaffinity on Linux.
How will this feature improve OpenZFS?
It will prevent thread pools from being oversized wherever the system administrator has configured cpusets.
Describe the feature would like to see added to OpenZFS
Several functions in libzfs and the zfs commands construct thread pools sized according to the number of CPUs in the system. They determine that via the
sysconf(_SC_NPROCESSORS_ONLN)
function. But that reports that total number of CPUs in the system. It would be more appropriate to use the number of CPUs available to the currrent process instead. That can be determined viacpuset_getaffinity
on FreeBSD orsched_getaffinity
on Linux.How will this feature improve OpenZFS?
It will prevent thread pools from being oversized wherever the system administrator has configured cpusets.
Additional context
https://man.freebsd.org/cgi/man.cgi?query=cpuset_getaffinity&sektion=2&n=1
https://linux.die.net/man/2/sched_getaffinity
https://github.com/freebsd/freebsd-src/blob/0612538e3ac93c1884f595a72609c078aefbcc28/bin/nproc/nproc.c#L118
The text was updated successfully, but these errors were encountered: