Thread pool configuration settings for optimizing application performance.
{
"ThreadPool": {
"MinWorkerThreads": null,
"MinCompletionPortThreads": null,
"MaxWorkerThreads": null,
"MaxCompletionPortThreads": null
}
}- Worker threads execute CPU-bound work and synchronous operations
- Completion port threads handle asynchronous I/O operations (database queries, HTTP requests)
The default thread pool settings work well for most scenarios. Consider adjusting when:
- High-concurrency workloads cause thread pool starvation
- Application experiences delays during burst traffic
- Profiling indicates thread pool bottlenecks
High-concurrency configuration:
{
"ThreadPool": {
"MinWorkerThreads": 100,
"MinCompletionPortThreads": 100,
"MaxWorkerThreads": 500,
"MaxCompletionPortThreads": 500
}
}::: warning Setting thread pool values too high can increase memory usage and context switching overhead. Test thoroughly before deploying to production. :::
- Comment Annotations Guide - How annotations work
- Configuration Guide - How configuration works
- Connection Settings - Configure database connections
- Server & SSL - Configure HTTPS and Kestrel web server
