mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-10 15:32:05 -03:30
fix: updating docs related to the number of executor threads
closes: #39342 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
parent
fd7f5351ad
commit
e9bf3bc2f8
@ -1,23 +1,11 @@
|
||||
[#${parent}-quarkus-executor-pool]
|
||||
=== Quarkus executor pool
|
||||
|
||||
{project_name} requests, as well as blocking probes, are handled by an executor pool. Depending on the available CPU cores, it has a maximum size of 50 or more threads.
|
||||
{project_name} requests, as well as blocking probes, are handled by an executor pool.
|
||||
It has a default maximum size of 50 or more threads depending on the available CPU cores.
|
||||
Threads are created as needed, and will end when no longer needed, so the system will scale up and down automatically.
|
||||
{project_name} allows configuring the maximum thread pool size by the link:{links_server_all-config_url}?q=http-pool-max-threads[`http-pool-max-threads`] configuration option.
|
||||
|
||||
When running on {kubernetes}, adjust the number of worker threads to avoid creating more load than what the CPU limit allows for the Pod to avoid throttling, which would lead to congestion.
|
||||
When running on physical machines, adjust the number of worker threads to avoid creating more load than the node can handle to avoid congestion.
|
||||
Congestion would result in longer response times and an increased memory usage, and eventually an unstable system.
|
||||
|
||||
Ideally, you should start with a low limit of threads and adjust it accordingly to the target throughput and response time.
|
||||
When the load and the number of threads increases, the database connections can also become a bottleneck.
|
||||
Once a request cannot acquire a database connection within 5 seconds, it will fail with a message in the log like `Unable to acquire JDBC Connection`.
|
||||
The caller will receive a response with a 5xx HTTP status code indicating a server side error.
|
||||
|
||||
If you increase the number of database connections and the number of threads too much, the system will be congested under a high load with requests queueing up, which leads to a bad performance.
|
||||
The number of database connections is configured via the link:{links_server_all-config_url}?q=db-pool[`Database` settings `db-pool-initial-size`, `db-pool-min-size` and `db-pool-max-size`] respectively.
|
||||
Low numbers ensure fast response times for all clients, even if there is an occasionally failing request when there is a load spike.
|
||||
|
||||
[#${parent}-load-shedding]
|
||||
=== Load Shedding
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user