Post

pgxpool defaults to max(4, NumCPU) connections. With 64 goroutines running 5 ms queries, 4 connections gave 608 req/s and 64 gave 8,879. With a CPU-bound query, nothing past 8 helped. https://importstatic.com/databases/pgxpool-size-maxconns-go

importstatic.comHow big should a pgxpool be? Sizing MaxConns from pool.Stat()pgxpool defaults to max(4, NumCPU) connections. How to tell from pool.Stat() whether that is too small, with measured throughput from 4 to 64 connections.

0 reposts0 likes

No replies yet.