#community-help

Modifying ThreadPool Size in TypeSense Server

TLDR Sidharth asked about modifying the thread-pool size constant in TypeSense server. Kishore Nallan explained it can be set to any desired value based on server specs. Optimal configuration depends on data and querying specifics.

Powered by Struct AI
Jun 22, 2023 (5 months ago)
Sidharth
Photo of md5-051f535431ff484f44f165e9a0b696a5
Sidharth
04:54 AM
Hello Team,
To improve the threading within TypeSense server, how can we modify the following parameter,
--thread-pool-size    false    Number of threads used for handling concurrent requests. Default: NUM_CORES * 8

• Is it possible to modify the constant which is 8 in the default case ?
• If yes, what is the limit to which we can increase it? Which metric is used to tune this value?
05:23
Sidharth
05:23 AM
Kishore Nallan
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
06:22 AM
The constant is used only in default. If you know your server specs you can set the thread pool size value to any number you want explicitly.
Sidharth
Photo of md5-051f535431ff484f44f165e9a0b696a5
Sidharth
07:10 AM
Kishore Nallan Got it,

For example some one is aiming for 2000 - 3000 RPS then
what would be the optimal configuration of the infra in terms of CPU & RAM and what should be a thread-pooling value
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
07:24 AM
It wholly depends on the size + shape of your data, the kind of querying, what kind of clustering is required etc. Difficult to provide a comprehensive answer without those details.