Skip to content
Notifications
Clear all

Anyone else having performance issues with the on-premise PostgreSQL database?

6 Posts
6 Users
0 Reactions
5 Views
(@finnj)
Estimable Member
Joined: 6 days ago
Posts: 57
Topic starter   [#16188]

Oh, the irony. You pay a premium for the "control" of an on-prem deployment, only to find your expensive compliance scanner brought to its knees by a database that feels like it's running on a potato powered by a hamster wheel.

We migrated to the on-prem version about six months ago, lured by the siren song of data sovereignty. The setup itself wasn't terrible, but the performance degradation over time is laughable. Our scan analysis times have ballooned by 300% compared to the SaaS trial we ran. The culprit? The PostgreSQL instance, according to every dashboard and log file. It's not even a complex schema, but the query patterns Black Duck generates seem to be... let's say "suboptimal."

We've thrown hardware at it (of course), tuned `shared_buffers` and `work_mem` until we're blue in the face, and even tried a dedicated DBA consultant who took one look at the query logs and muttered something unkind about ORMs. The vendor's support just points to their generic "performance tuning guide" and suggests more cores, more memory. At this point, the TCO is making my eyes water.

So, before I embark on the fool's errand of trying to migrate this whole mess to a tuned PostgreSQL fork or even a different RDBMS entirely, I have to ask:

* Is this just our unique punishment, or are others watching their scans crawl while the Black Duck app server idles comfortably?
* Has anyone found a magic `postgresql.conf` incantation or a specific indexing strategy that actually made a dent?
* Most importantly, has anyone said "to hell with it" and switched to a different *open source* scanner that doesn't require a database cluster worthy of a small bank?

The licensing fees alone for this thing could fund a small engineering team to build a better mousetrap. There's got to a be a free (as in speech) alternative that's less of a resource hog.


FOSS advocate


   
Quote
(@charlie2)
Trusted Member
Joined: 6 days ago
Posts: 61
 

Oh man, the "throwing hardware at it" part hits home. We went down that road too. More cores just meant the wait times got more expensive.

What would you recommend for monitoring? We've been using pgBadger, but I'm wondering if we missed something obvious in the query plans.

The DBA consultant muttering about ORMs is so real. Ours said the exact same thing.



   
ReplyQuote
(@jennif)
Eminent Member
Joined: 6 days ago
Posts: 24
 

> The DBA consultant muttering about ORMs is so real.

Oh, I feel that one in my soul. We had a similar moment of clarity with our HubSpot setup last year. PgBadger is great for the "what," but you might need to catch the "when" to see the full picture.

Try logging your session waits with `pg_stat_activity` over time. That's how we spotted a specific report query from our marketing automation that was locking everything up every hour on the hour. It wasn't in the slow query log, but it was causing a cascade of waits.

Sometimes the issue isn't a single bad plan, but a traffic jam of okay-ish ones hitting at once. Do you see patterns in the slowdowns?


Marketing ops nerd


   
ReplyQuote
(@brianl)
Estimable Member
Joined: 1 week ago
Posts: 113
 

That's a great point about the "when" versus the "what." We have a similar pattern with our ERP's end-of-day inventory reconciliation job. It's not inherently slow, but when it runs concurrently with the nightly data sync from our e-commerce platform, everything just... stops.

We started logging `pg_stat_activity` snapshots to a separate table every 30 seconds during our peak processing windows. It was eye opening. The lock waits weren't from our biggest report, but from a handful of mundane `UPDATE` statements on a single, heavily referenced status code table. The cascade effect you mentioned is real.

Your comment about traffic jams of okay-ish queries is spot on. It makes me wonder if the default connection pool settings in the on-prem install are too high, leading to more concurrent queries than the hardware can gracefully handle. Did you end up tuning your `max_connections` or connection pooler settings in front of PostgreSQL when you sorted out your HubSpot issue?



   
ReplyQuote
(@james_k_revops)
Estimable Member
Joined: 2 months ago
Posts: 86
 

The vendor's generic tuning guide is sadly typical. It often misses the point that application generated SQL, especially from off the shelf products, dictates the performance envelope more than knob tuning.

Your experience mirrors what we've seen with Salesforce's on-prem analytics appliances. Throwing hardware at an ORM's inefficient query patterns just raises the ceiling on concurrency issues, it doesn't fix the fundamental throughput problem. You eventually hit a wall of lock contention and plan bloat that no amount of `shared_buffers` can solve.

Before considering a fork, I'd instrument the database to see if the slowdown correlates with specific application functions, like initiating a new scan or generating a compliance report. The "suboptimal" patterns might be a constant tax, or they might be event driven. If it's the latter, you might at least identify a workable scheduling band aid while you evaluate a more drastic move.


measure what matters


   
ReplyQuote
(@devops_rookie_2025)
Reputable Member
Joined: 2 months ago
Posts: 203
 

Oof, that "potato powered by a hamster wheel" line is too real 😅

You mentioning the vendor just pointing back to their generic guide hits a nerve. We had that exact experience with a different tool. It's like they assume your on-prem DB is a pristine, dedicated server, not one handling the app's specific chaos.

Your DBA muttering about ORMs made me laugh. Ours did too, and then we found one report query joining the same massive table three different ways in a single query. It wasn't "slow" in a vacuum, but it created so much lock contention.

This might be a naive question, but have you looked at the connection pooler settings? We found ours was set way too high by default, which just made the traffic jam of "okay-ish queries" way worse.



   
ReplyQuote