Last active
February 24, 2023 05:07
-
-
Save varun-dhawan/e86a6c18066c25fc9ca069503ee680d3 to your computer and use it in GitHub Desktop.
Revisions
-
varun-dhawan revised this gist
Feb 24, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a [built-i We are exposing 6 new metrics that customers can use to monitor PgBouncer performance and identify any potential issues. Each metric is emitted at a 1 minute frequency, and has up to 93 days of retenion. Customers can configure alerts on the metrics and can also access the new metrics dimensions, to split and filter the metrics data on database name. ## Enabling PgBouncer metrics * PgBouncer metrics are **disabled** by default * For Pgbouncer metrics to work, server parameters `pgbouncer.enabled` and `metrics.pgbouncer_diagnostics` have to be enabled * These parameters are dynamic, and will not require instance restart. -
varun-dhawan revised this gist
Feb 1, 2023 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -22,9 +22,8 @@ We are exposing 6 new metrics that customers can use to monitor PgBouncer perfor ## Enabling PgBouncer metrics * Most of these new metrics are **disabled** by default * For Pgbouncer metrics to work, server parameters `pgbouncer.enabled` and `metrics.pgbouncer_diagnostics` have to be enabled * These parameters are dynamic, and will not require instance restart. ## List of PgBouncer metrics -
varun-dhawan revised this gist
Feb 1, 2023 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,13 @@ PgBouncer probably the most popular connection pooler in postgrtes. It is a ligh Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a [built-in option](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-pgbouncer#enabling-and-configuring-pgbouncer), wherein customers can easily enable PgBouncer from Azure Postgres server parameters and update the app connection string to talk to PgBouncer on port 6432, rather than directly to the database server. We are exposing 6 new metrics that customers can use to monitor PgBouncer performance and identify any potential issues. Each metric is emitted at a 1 minute frequency, and has up to 93 days of retenion. Customers can configure alerts on the metrics and can also access the new metrics dimensions, to split and filter the metrics data on database name. ## Enabling PgBouncer metrics * Most of these new metrics are **disabled** by default * To enable these metrics, please turn ON the server parameter `metrics.pgbouncer_diagnostics` * This parameter is dynamic, and will not require instance restart. * For Pgbouncer metrics to work, the `pgbouncer.enabled` and `metrics.pgbouncer_diagnostics` have to be enabled ## List of PgBouncer metrics @@ -30,12 +36,6 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to |**Idle server connections** (Preview) |server_connections_idle |Count|Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No | |**Total pooled connections** (Preview) |total_pooled_connections |Count|Current number of pooled connections |DatabaseName|No | |**Number of connection pools** (Preview)|num_pools |Count|Total number of connection pools |DatabaseName|No | ## References * PgBouncer Admin Console - https://www.pgbouncer.org/usage.html -
varun-dhawan revised this gist
Feb 1, 2023 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -22,14 +22,14 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to ## List of PgBouncer metrics |Display Name |Metrics ID |Unit |Description |Dimension |Default enabled| |----------------------------------------|--------------------------|-----|-------------------------------------------------------------------------------------|------------|---------------| |**Active client connections** (Preview) |client_connections_active |Count|Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No | |**Waiting client connections** (Preview)|client_connections_waiting|Count|Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No | |**Active server connections** (Preview) |server_connections_active |Count|Connections to PostgreSQL that are in use by a client connection |DatabaseName|No | |**Idle server connections** (Preview) |server_connections_idle |Count|Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No | |**Total pooled connections** (Preview) |total_pooled_connections |Count|Current number of pooled connections |DatabaseName|No | |**Number of connection pools** (Preview)|num_pools |Count|Total number of connection pools |DatabaseName|No | ## Enabling PgBouncer metrics * Most of these new metrics are **disabled** by default -
varun-dhawan revised this gist
Feb 1, 2023 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -22,14 +22,14 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to ## List of PgBouncer metrics |Display Name |Metrics ID |Description |Dimension |Default enabled| |----------------------------------------|--------------------------|-------------------------------------------------------------------------------------|------------|---------------| |**Active client connections** (Preview) |client_connections_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No | |**Waiting client connections** (Preview)|client_connections_waiting|Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No | |**Active server connections** (Preview) |server_connections_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|No | |**Idle server connections** (Preview) |server_connections_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No | |**Total pooled connections** (Preview) |total_pooled_connections |Current number of pooled connections |DatabaseName|No | |**Number of connection pools** (Preview)|num_pools |Total number of connection pools |DatabaseName|No | ## Enabling PgBouncer metrics * Most of these new metrics are **disabled** by default -
varun-dhawan revised this gist
Feb 1, 2023 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -22,14 +22,14 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to ## List of PgBouncer metrics |Display Name |Metrics ID |Description |Dimension |Default enabled| |------------------------------------|--------------------------|-------------------------------------------------------------------------------------|------------|---------------| |Active client connections (Preview) |client_connections_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No | |Waiting client connections (Preview)|client_connections_waiting|Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No | |Active server connections (Preview) |server_connections_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|No | |Idle server connections (Preview) |server_connections_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No | |Total pooled connections (Preview) |total_pooled_connections |Current number of pooled connections |DatabaseName|No | |Number of connection pools (Preview)|num_pools |Total number of connection pools |DatabaseName|No | ## Enabling PgBouncer metrics * Most of these new metrics are **disabled** by default -
varun-dhawan revised this gist
Feb 1, 2023 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -35,6 +35,7 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to * Most of these new metrics are **disabled** by default * To enable these metrics, please turn ON the server parameter `metrics.pgbouncer_diagnostics` * This parameter is dynamic, and will not require instance restart. * For Pgbouncer metrics to work, the `pgbouncer.enabled` and `metrics.pgbouncer_diagnostics` have to be enabled ## References * PgBouncer Admin Console - https://www.pgbouncer.org/usage.html -
varun-dhawan revised this gist
Feb 1, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,7 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to ## Enabling PgBouncer metrics * Most of these new metrics are **disabled** by default * To enable these metrics, please turn ON the server parameter `metrics.pgbouncer_diagnostics` * This parameter is dynamic, and will not require instance restart. ## References -
varun-dhawan revised this gist
Jan 31, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ ms.author: varun.dhawan ms.date: 11/01/2022 --- # Azure Postgres Flexible Server - PgBouncer metrics (Preview) ## PgBouncer monitoring -
varun-dhawan revised this gist
Jan 31, 2023 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -22,14 +22,14 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to ## List of PgBouncer metrics |Display Name |Metrics ID |Description |Dimension |Default enabled|Show command (optional)| |----------------|-------------------------------------|-------------------------------------------------------------------------------------|------------|---------------|-----------------------| |**cl_active** |pgbouncer.pools.cl_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No |SHOW POOLS | |**cl_waiting** |pgbouncer.pools.cl_waiting |Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No |SHOW POOLS | |**sv_active** |pgbouncer.pools.sv_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|No |SHOW POOLS | |**sv_idle** |pgbouncer.pools.sv_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No |SHOW POOLS | |**db_active** |pgbouncer.database.active_connections|Current number of connections for this database |DatabaseName|No |SHOW DATABASES | |**pools_by_db** |pgbouncer.pools.pools_per_database |Total number of pools per database |DatabaseName|No |CUSTOM METRICS | ## Enabling PgBouncer metrics * Most of these new metrics are **disabled** by default -
varun-dhawan revised this gist
Jan 31, 2023 . 1 changed file with 9 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -21,14 +21,15 @@ Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a [built-i When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server: ## List of PgBouncer metrics |Display Name|Metrics ID |Description |Dimension |Default enabled|Show command (optional)| |------------|-------------------------------------|-------------------------------------------------------------------------------------|------------|---------------|-----------------------| |cl_active |pgbouncer.pools.cl_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|No |SHOW POOLS | |cl_waiting |pgbouncer.pools.cl_waiting |Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|No |SHOW POOLS | |sv_active |pgbouncer.pools.sv_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|No |SHOW POOLS | |sv_idle |pgbouncer.pools.sv_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|No |SHOW POOLS | |db_active |pgbouncer.database.active_connections|Current number of connections for this database |DatabaseName|No |SHOW DATABASES | |pools_by_db |pgbouncer.pools.pools_per_database |Total number of pools per database |DatabaseName|No |CUSTOM METRICS | ## Enabling PgBouncer metrics * Most of these new metrics are **disabled** by default -
varun-dhawan revised this gist
Jan 31, 2023 . 1 changed file with 8 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -21,15 +21,14 @@ Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a [built-i When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server: ## List of PgBouncer metrics |Metrics ID |Display Name|Description |Dimension |Show command (optional)| |-------------------------------------|------------|-------------------------------------------------------------------------------------|------------|-----------------------| |pgbouncer.pools.cl_active |cl_active |Connections from clients which are associated with a PostgreSQL connection |DatabaseName|SHOW POOLS | |pgbouncer.pools.cl_waiting |cl_waiting |Connections from clients that are waiting for a PostgreSQL connection to service them|DatabaseName|SHOW POOLS | |pgbouncer.pools.sv_active |sv_active |Connections to PostgreSQL that are in use by a client connection |DatabaseName|SHOW POOLS | |pgbouncer.pools.sv_idle |sv_idle |Connections to PostgreSQL that are idle, ready to service a new client connection |DatabaseName|SHOW POOLS | |pgbouncer.database.active_connections|db_active |Current number of connections for this database |DatabaseName|SHOW DATABASES | |pgbouncer.pools.pools_per_database |pools_by_db |Total number of pools per database |DatabaseName|CUSTOM METRICS | ## Enabling PgBouncer metrics * Most of these new metrics are **disabled** by default -
varun-dhawan revised this gist
Jan 23, 2023 . No changes.There are no files selected for viewing
-
varun-dhawan revised this gist
Jan 23, 2023 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,8 @@ Postgres is a powerful and popular open-source relational database management sy PgBouncer probably the most popular connection pooler in postgrtes. It is a lightweight connection pooler that helps to improve the performance and scalability of your Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a [built-in option](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-pgbouncer#enabling-and-configuring-pgbouncer), wherein customers can easily enable PgBouncer from Azure Postgres server parameters and update the app connection string to talk to PgBouncer on port 6432, rather than directly to the database server. When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server: ## List of PgBouncer metrics -
varun-dhawan revised this gist
Jan 23, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -14,9 +14,9 @@ ms.date: 11/01/2022 Postgres is a powerful and popular open-source relational database management system (RDBMS). However, as the number of connections to a Postgres database grows, managing and monitoring those connections can become a challenge. That's where connection pooling comes in. PgBouncer probably the most popular connection pooler in postgrtes. It is a lightweight connection pooler that helps to improve the performance and scalability of your Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a [built-in option](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-pgbouncer#enabling-and-configuring-pgbouncer), where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server. When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server: ## List of PgBouncer metrics -
varun-dhawan revised this gist
Jan 23, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ ms.date: 11/01/2022 Postgres is a powerful and popular open-source relational database management system (RDBMS). However, as the number of connections to a Postgres database grows, managing and monitoring those connections can become a challenge. That's where connection pooling comes in. PgBouncer probably the most popular connection pooler in postgrtes. It is a lightweight connection pooler that helps to improve the performance and scalability of your Azure Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in option, where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server. When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server: -
varun-dhawan revised this gist
Jan 23, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ ms.date: 11/01/2022 Postgres is a powerful and popular open-source relational database management system (RDBMS). However, as the number of connections to a Postgres database grows, managing and monitoring those connections can become a challenge. That's where connection pooling comes in. PgBouncer probably the most popular connection pooler in postgrtes. It is a lightweight connection pooler for Postgres that helps to improve the performance and scalability of your Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in option, where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server. When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server: -
varun-dhawan revised this gist
Jan 23, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ ms.date: 11/01/2022 ## PgBouncer monitoring Postgres is a powerful and popular open-source relational database management system (RDBMS). However, as the number of connections to a Postgres database grows, managing and monitoring those connections can become a challenge. That's where connection pooling comes in. PgBouncer is a lightweight connection pooler for Postgres that helps to improve the performance and scalability of your Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance. -
varun-dhawan revised this gist
Jan 23, 2023 . 1 changed file with 6 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -19,13 +19,6 @@ PgBouncer is a lightweight connection pooler for Postgres that helps to improve Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in option, where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server. When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server: ## List of PgBouncer metrics |Metrics ID |Description |SHOW commands |Dimension |Status | @@ -37,8 +30,12 @@ When using PgBouncer, it's important to monitor the performance of PgBouncer to |pgbouncer.database.active_connections|Current number of connections (client-2-pgBouncer) |SHOW DATABASES|DatabaseName|Committed (M26)| |pgbouncer.pools.pools_per_database |Total no. of pools per DB |CUSTOM METRICS|DatabaseName|Committed (M26)| ## Enabling PgBouncer metrics * Most of these new metrics are **disabled** by default * To enable these metrics, please turn ON the server parameter `pgbouncer.diagnostics`. * This parameter is dynamic, and will not require instance restart. ## References * PgBouncer Admin Console - https://www.pgbouncer.org/usage.html ## Team -
varun-dhawan revised this gist
Jan 23, 2023 . No changes.There are no files selected for viewing
-
varun-dhawan revised this gist
Jan 23, 2023 . 1 changed file with 0 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -19,12 +19,7 @@ PgBouncer is a lightweight connection pooler for Postgres that helps to improve Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in option, where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server. When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server: ## Enabling PgBouncer metrics * Most of these new metrics are **disabled** by default -
varun-dhawan revised this gist
Jan 23, 2023 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,12 @@ ms.date: 11/01/2022 ## PgBouncer monitoring Postgres is a powerful and popular open-source relational database management system (RDBMS). However, as the number of connections to a Postgres database grows, managing and monitoring those connections can become a challenge. That's where PgBouncer comes in. PgBouncer is a lightweight connection pooler for Postgres that helps to improve the performance and scalability of your Postgres databases by managing and reusing database connections. By pooling connections, PgBouncer reduces the number of connections that need to be opened and closed, reducing the load on your Postgres server and improving overall performance. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in option, where customers can easily enable PgBouncer from server parameters and update your app connection string to talk to PgBouncer on port 6432, rather than directly to the database server. When using PgBouncer, it's important to monitor the performance of PgBouncer to ensure that it's functioning as expected and to identify any potential issues. Here are some key metrics to monitor when using PgBouncer with Azure Postgres Flexible Server: PgBouncer also provides an internal database that you can connect to called pgbouncer. Once connected to the database you can execute SHOW commands that provide information on the current state of pgbouncer. -
varun-dhawan revised this gist
Jan 18, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -43,4 +43,4 @@ PgBouncer also provides an internal database that you can connect to called pgbo ## Team * Engineering - [email protected], [email protected] * Product - Varun.Dhawan@microsoft.com, [email protected] -
varun-dhawan revised this gist
Jan 18, 2023 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,8 @@ ms.date: 11/01/2022 # Azure Postgres Flexible Server - PgBouncer metrics (Preview) [Zn Sem] ## PgBouncer monitoring PgBouncer is an open-source, lightweight, single-binary connection pooler for PostgreSQL. It can pool connections to one or more databases (on possibly different servers) and serve clients over TCP and Unix domain sockets. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in connection pooling solution. PgBouncer also provides an internal database that you can connect to called pgbouncer. Once connected to the database you can execute SHOW commands that provide information on the current state of pgbouncer. -
varun-dhawan revised this gist
Jan 18, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ description: Metrics to monitor PgBouncer ms.service: postgresql ms.subservice: flexible-server ms.topic: conceptual ms.author: varun.dhawan ms.date: 11/01/2022 --- -
varun-dhawan revised this gist
Jan 18, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ --- title: Azure Database for PostgreSQL Flexible Server - PgBouncer metrics (Preview) description: Metrics to monitor PgBouncer ms.service: postgresql ms.subservice: flexible-server @@ -8,7 +8,7 @@ ms.author: varundhawan ms.date: 11/01/2022 --- # Azure Postgres Flexible Server - PgBouncer metrics (Preview) [Zn Sem] PgBouncer is an open-source, lightweight, single-binary connection pooler for PostgreSQL. It can pool connections to one or more databases (on possibly different servers) and serve clients over TCP and Unix domain sockets. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in connection pooling solution. -
varun-dhawan revised this gist
Jan 18, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ ms.author: varundhawan ms.date: 11/01/2022 --- # Azure Postgres Flexible Server - PgBouncer Metrics (Preview) [Zn Sem] PgBouncer is an open-source, lightweight, single-binary connection pooler for PostgreSQL. It can pool connections to one or more databases (on possibly different servers) and serve clients over TCP and Unix domain sockets. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in connection pooling solution. -
varun-dhawan revised this gist
Jan 18, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ ms.author: varundhawan ms.date: 11/01/2022 --- # Azure Database for PostgreSQL Flexible Server - PgBouncer Metrics (Preview) [Zn Sem] PgBouncer is an open-source, lightweight, single-binary connection pooler for PostgreSQL. It can pool connections to one or more databases (on possibly different servers) and serve clients over TCP and Unix domain sockets. Azure Database for PostgreSQL – Flexible Server offers PgBouncer as a built-in connection pooling solution. -
varun-dhawan revised this gist
Jan 18, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,7 @@ PgBouncer also provides an internal database that you can connect to called pgbo * To enable these metrics, please turn ON the server parameter `pgbouncer.diagnostics`. * This parameter is dynamic, and will not require instance restart. ## List of PgBouncer metrics |Metrics ID |Description |SHOW commands |Dimension |Status | |-------------------------------------|--------------------------------------------------------------------------|--------------|------------|---------------| -
varun-dhawan revised this gist
Jan 18, 2023 . 1 changed file with 9 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -26,14 +26,15 @@ PgBouncer also provides an internal database that you can connect to called pgbo ## PgBouncer Metrics |Metrics ID |Description |SHOW commands |Dimension |Status | |-------------------------------------|--------------------------------------------------------------------------|--------------|------------|---------------| |pgbouncer.pools.cl_active |Client connections linked to server connection and able to process queries|SHOW POOLS |DatabaseName|Committed (M26)| |pgbouncer.pools.cl_waiting |Client connections waiting on a server connection |SHOW POOLS |DatabaseName|Committed (M26)| |pgbouncer.pools.sv_active |Server connections linked to a client connection |SHOW POOLS |DatabaseName|Committed (M26)| |pgbouncer.pools.sv_idle |Server connections idle and ready for a client query |SHOW POOLS |DatabaseName|Committed (M26)| |pgbouncer.database.active_connections|Current number of connections (client-2-pgBouncer) |SHOW DATABASES|DatabaseName|Committed (M26)| |pgbouncer.pools.pools_per_database |Total no. of pools per DB |CUSTOM METRICS|DatabaseName|Committed (M26)| ## Reference * PgBouncer Admin Console - https://www.pgbouncer.org/usage.html
NewerOlder