svc_set_pool_threads(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… svc_set_pool_threads(9) β€” the kernel API manual, but make it make sense

okay so bestie, we're in the Kernel API Manual today and this one is called svc_set_pool_threads(9) β€” yes it's a mouthful, yes it's iconic, stay with me 🫢


✨ NAME ✨

svc_set_pool_threads β€” adjust number of threads per pool

πŸŽ€ SYNOPSIS πŸŽ€

int svc_set_pool_threads (struct svc_serv *serv , struct svc_pool *pool
, unsigned int min_threads , unsigned int max_threads );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • serv β€” the RPC service you're adjusting, bestie. that's the main character here πŸ‘‘
  • pool β€” the specific pool you're choosing threads from, like picking your faves out of the group chat
  • min_threads β€” min number of threads to run in pool (the floor, the bare minimum, the "i'm not getting out of bed for less than this")
  • max_threads β€” max number of threads in pool, and heads up: 0 means kill all threads πŸ’€ yeah. zero. all of them. gone.

🌸 DESCRIPTION 🌸

So what this does is create or destroy threads in the pool to bring it into an acceptable range between min_threads and max_threads. Like a vibe check for your thread count β€” too few, we make more; too many, we start deleting. Balance ✨

Here's the plot twist though: if min_threads is 0 or larger than max_threads, then it is ignored and the pool will be set to run a static max_threads number of threads. fr fr, it just gets dropped and the pool runs a flat max_threads. no cap.

⚠️ Okay this part matters: the caller must ensure mutual exclusion between this and server startup or shutdown. Like, don't be doing this at the same time as startup/shutdown, that's not the vibe. Lock it down, bestie πŸ”’

Returns zero on success or a negative errno if an error occurred while starting a thread. So 0 = slay, negative = something went sideways while spinning up a thread 😭

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie, you ate that πŸ“πŸ’– this one lives in ./net/sunrpc, dated October 2026, and it's filed under svc_set_pool_threads(9) β€” go forth and manage your pools responsibly πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from