Hi Robert,

That makes sense.  One other oddity I've noticed is that the database CPU
actually goes down when I spin up more nodes, for the same number of
users/queries per second.

--Josh

On Wed, Dec 13, 2023 at 4:12 PM robert engels <reng...@ix.netcom.com> wrote:

> It is contending with sql.rows.awaitDone().
>
> My guess is that when you close rows it has to wait for db acknowledgement
> - that this is a false positive based on wall time and not cpu time - that
> the mutex is waiting for the cleanup operation to complete.
>
> On Dec 13, 2023, at 1:25 PM, Joshua Garnett <josh.garn...@gmail.com>
> wrote:
>
> Hi All,
>
> Has anyone else observed significant mutex contention in sql.Close() at
> scale?  I haven't had much success working around it beyond spinning up
> additional nodes.
>
> App details
>
>    - Go 1.21.4
>    - debian:bookworm container
>    - App is running on an instance with 18 physical cores (36 vCPU) and
>    72GB of memory (only main process running)
>    - Connecting to PostgreSQL 15.3 AWS Aurora
>    - MaxOpenConns set to 125
>
> Here is a screenshot of the pprof:
>
> <Screenshot 2023-12-13 at 2.08.47 PM.png>
>
> Thanks in advance!
>
> --Josh
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/CAJAXYdi2A-rJ9YhbJJB0a1TE_MbrHL2rMOSKP1Rb%3DxHc9dOveQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/golang-nuts/CAJAXYdi2A-rJ9YhbJJB0a1TE_MbrHL2rMOSKP1Rb%3DxHc9dOveQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAJAXYdjTX6AVZtYLiCQ%2B-NZKMQN0Zehvydtog-VuKENESS%2BJvQ%40mail.gmail.com.

Reply via email to