public inbox for [email protected]help / color / mirror / Atom feed
DB load balancer 4+ messages / 2 participants [nested] [flat]
* DB load balancer @ 2025-08-05 04:48 Siraj G <[email protected]> 2025-08-05 05:21 ` Re: DB load balancer Deepak Goel <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Siraj G @ 2025-08-05 04:48 UTC (permalink / raw) To: Pgsql-admin <[email protected]> Hello Experts! We have a multi tenant model DB with a Primary and a Secondary. There are 3x or 4x connections flowing to Secondary as the application is read intensive. Accordingly we have allocated more number of resources to the VM hosting the secondary/replica DB. Spec:- Primary: 48 CPUs, 48GB memory Secondary: 80 CPUs, 128GB memory PG version: 12.22 (we have already started the upgrade process) OS: Ubuntu The problem very frequently we are experiencing is that the CPU load on the SECONDARY is going very very high causing the app slowness. Also, frequently the postgres is crashing due to OOM. I was thinking of these (please give feedback): 1. Have a DB level balancer for the load balancing in the DB level, meaning primary will also receive the READ traffic 2. Add a second REPLICA and configure load balancer for the connection load balancing What do we do for load balancing at the DB level, in postgres? If there are any suggestions, please let me know. Regards Siraj ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: DB load balancer 2025-08-05 04:48 DB load balancer Siraj G <[email protected]> @ 2025-08-05 05:21 ` Deepak Goel <[email protected]> 2025-08-05 06:11 ` Re: DB load balancer Siraj G <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Deepak Goel @ 2025-08-05 05:21 UTC (permalink / raw) To: Siraj G <[email protected]>; +Cc: Pgsql-admin <[email protected]> Please share what you mean by slow (CPU usage of secondary over time, response times of the transactions over time). Deepak "The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi" +91 73500 12833 [email protected] LinkedIn: www.linkedin.com/in/deicool "Plant a Tree, Go Green" Make In India : http://www.makeinindia.com/home On Tue, Aug 5, 2025 at 10:18 AM Siraj G <[email protected]> wrote: > Hello Experts! > > We have a multi tenant model DB with a Primary and a Secondary. There are > 3x or 4x connections flowing to Secondary as the application is read > intensive. Accordingly we have allocated more number of resources to the VM > hosting the secondary/replica DB. > > Spec:- > Primary: 48 CPUs, 48GB memory > Secondary: 80 CPUs, 128GB memory > PG version: 12.22 (we have already started the upgrade process) > OS: Ubuntu > > The problem very frequently we are experiencing is that the CPU load on > the SECONDARY is going very very high causing the app slowness. Also, > frequently the postgres is crashing due to OOM. > > I was thinking of these (please give feedback): > 1. Have a DB level balancer for the load balancing in the DB level, > meaning primary will also receive the READ traffic > 2. Add a second REPLICA and configure load balancer for the connection > load balancing > > What do we do for load balancing at the DB level, in postgres? > > If there are any suggestions, please let me know. > > Regards > Siraj > ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: DB load balancer 2025-08-05 04:48 DB load balancer Siraj G <[email protected]> 2025-08-05 05:21 ` Re: DB load balancer Deepak Goel <[email protected]> @ 2025-08-05 06:11 ` Siraj G <[email protected]> 2025-08-05 06:16 ` Re: DB load balancer Deepak Goel <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Siraj G @ 2025-08-05 06:11 UTC (permalink / raw) To: Deepak Goel <[email protected]>; +Cc: Pgsql-admin <[email protected]> Hello Deepak CPU utilization is high, below is just a 1 day utilization graph. We have been having these more often between 3:30 and 5:30 in the afternoon. This is a daily pattern and during this the application response goes very slow. [image: image.png] Regards Siraj On Tue, Aug 5, 2025 at 10:51 AM Deepak Goel <[email protected]> wrote: > Please share what you mean by slow (CPU usage of secondary over time, > response times of the transactions over time). > > > Deepak > "The greatness of a nation can be judged by the way its animals are > treated - Mahatma Gandhi" > > +91 73500 12833 > [email protected] > > LinkedIn: www.linkedin.com/in/deicool > > "Plant a Tree, Go Green" > > Make In India : http://www.makeinindia.com/home > > > On Tue, Aug 5, 2025 at 10:18 AM Siraj G <[email protected]> wrote: > >> Hello Experts! >> >> We have a multi tenant model DB with a Primary and a Secondary. There are >> 3x or 4x connections flowing to Secondary as the application is read >> intensive. Accordingly we have allocated more number of resources to the VM >> hosting the secondary/replica DB. >> >> Spec:- >> Primary: 48 CPUs, 48GB memory >> Secondary: 80 CPUs, 128GB memory >> PG version: 12.22 (we have already started the upgrade process) >> OS: Ubuntu >> >> The problem very frequently we are experiencing is that the CPU load on >> the SECONDARY is going very very high causing the app slowness. Also, >> frequently the postgres is crashing due to OOM. >> >> I was thinking of these (please give feedback): >> 1. Have a DB level balancer for the load balancing in the DB level, >> meaning primary will also receive the READ traffic >> 2. Add a second REPLICA and configure load balancer for the connection >> load balancing >> >> What do we do for load balancing at the DB level, in postgres? >> >> If there are any suggestions, please let me know. >> >> Regards >> Siraj >> > Attachments: [image/png] image.png (68.4K, 3-image.png) download | view image ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: DB load balancer 2025-08-05 04:48 DB load balancer Siraj G <[email protected]> 2025-08-05 05:21 ` Re: DB load balancer Deepak Goel <[email protected]> 2025-08-05 06:11 ` Re: DB load balancer Siraj G <[email protected]> @ 2025-08-05 06:16 ` Deepak Goel <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Deepak Goel @ 2025-08-05 06:16 UTC (permalink / raw) To: Siraj G <[email protected]>; +Cc: Pgsql-admin <[email protected]> So the reads happen only at: 4 p.m. and 6 p.m. Looks more like batch jobs then reads! Can you post the "Number of Reads" during these times too... Deepak "The greatness of a nation can be judged by the way its animals are treated - Mahatma Gandhi" +91 73500 12833 [email protected] LinkedIn: www.linkedin.com/in/deicool "Plant a Tree, Go Green" Make In India : http://www.makeinindia.com/home On Tue, Aug 5, 2025 at 11:42 AM Siraj G <[email protected]> wrote: > Hello Deepak > > CPU utilization is high, below is just a 1 day utilization graph. We have > been having these more often between 3:30 and 5:30 in the afternoon. This > is a daily pattern and during this the application response goes very slow. > > [image: image.png] > > Regards > Siraj > > On Tue, Aug 5, 2025 at 10:51 AM Deepak Goel <[email protected]> wrote: > >> Please share what you mean by slow (CPU usage of secondary over time, >> response times of the transactions over time). >> >> >> Deepak >> "The greatness of a nation can be judged by the way its animals are >> treated - Mahatma Gandhi" >> >> +91 73500 12833 >> [email protected] >> >> LinkedIn: www.linkedin.com/in/deicool >> >> "Plant a Tree, Go Green" >> >> Make In India : http://www.makeinindia.com/home >> >> >> On Tue, Aug 5, 2025 at 10:18 AM Siraj G <[email protected]> wrote: >> >>> Hello Experts! >>> >>> We have a multi tenant model DB with a Primary and a Secondary. There >>> are 3x or 4x connections flowing to Secondary as the application is read >>> intensive. Accordingly we have allocated more number of resources to the VM >>> hosting the secondary/replica DB. >>> >>> Spec:- >>> Primary: 48 CPUs, 48GB memory >>> Secondary: 80 CPUs, 128GB memory >>> PG version: 12.22 (we have already started the upgrade process) >>> OS: Ubuntu >>> >>> The problem very frequently we are experiencing is that the CPU load on >>> the SECONDARY is going very very high causing the app slowness. Also, >>> frequently the postgres is crashing due to OOM. >>> >>> I was thinking of these (please give feedback): >>> 1. Have a DB level balancer for the load balancing in the DB level, >>> meaning primary will also receive the READ traffic >>> 2. Add a second REPLICA and configure load balancer for the connection >>> load balancing >>> >>> What do we do for load balancing at the DB level, in postgres? >>> >>> If there are any suggestions, please let me know. >>> >>> Regards >>> Siraj >>> >> Attachments: [image/png] image.png (68.4K, 3-image.png) download | view image ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2025-08-05 06:16 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-08-05 04:48 DB load balancer Siraj G <[email protected]> 2025-08-05 05:21 ` Deepak Goel <[email protected]> 2025-08-05 06:11 ` Siraj G <[email protected]> 2025-08-05 06:16 ` Deepak Goel <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox