-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reformatting the JVM metrics, adding database metrics
Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
- Loading branch information
Showing
4 changed files
with
70 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
doc/kubernetes/modules/ROOT/pages/running/metrics/database_metrics.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
= {project_name} Database Metrics | ||
:description: This documentation covers the information about Keycloak's connection to the database {project_name}. | ||
|
||
{description} | ||
|
||
include::partial$/running/metrics/kc_enable_metrics.adoc[leveloffset=+1] | ||
|
||
== Database connection pool | ||
|
||
Configure {project_name} to use a fixed size database connection pool. | ||
See https://www.keycloak.org/high-availability/concepts-database-connections[Concepts for database connection pools] for more information. | ||
|
||
[TIP] | ||
==== | ||
If there is a high count of threads waiting for a database connection, increasing the database connection pool size is not always the best option. It might overload the database which would then become the bottleneck. Consider the following options instead: | ||
* Reduce the number of HTTP worker threads using the option `http-pool-max-threads` to make it match the available database connections, and thereby reduce contention and resource usage in {project_name} and increase throughput. | ||
* Check which database statements are executed on the database. If you see, for example, a lot of information about clients and groups being fetched, and the `users` and `realms` cache are full, this might indicate that it is time to increase the sizes of those caches and see if this reduces your database load. | ||
==== | ||
|
||
|=== | ||
|Metric |Description | ||
|
||
m| agroal_available_count | ||
| Idle database connections. | ||
|
||
m| agroal_active_count | ||
| Database connections used in ongoing transactions. | ||
|
||
m| agroal_awaiting_count | ||
| Threads waiting for a database connection to become available. | ||
|
||
|=== | ||
|
||
Additional information on the {project_name} `metrics` endpoint can be found https://www.keycloak.org/server/configuration-metrics[here]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters