Earlier quoted context omitted.
From personal experience, it scales very well vertically. Have a system in production with tens of billions of rows and north of 12 TB of storage total. That system is read-heavy with large batched inserts, not many deletes or updates. Biggest limiter is memory, where the need for it grows linearly with table index size. Postgres really really wants to keep the index pages hot in the OS cache. Gets very sad and weird…
I recently did some db maintenance on a write heavy workload and I found that eventually it will bloat over time with a table with 500 million records. Switching it to use a proper partitioning scheme helped a lot. So people should not read this and assume you can just dump massive workloads into pg and they will be screamingly performant without some tuning and thoughtful design (I don’t think this is what you are i…
SPQR 1.3.0: a production-ready system for horizontal scaling of PostgreSQL
51–60 of 78 posts
Re: SPQR 1.3.0: a production-ready system for horizontal scaling of PostgreSQL
#52How far can one get these days with vertical scaling of Postgres? I dont know how well the engine could make use of the extra resources. If it scales well vertically, I expect it to cover 80% - 95% of use cases for people using Postgres. Probably with less complexity, and less overhead than scaling horziontally
Far. As in, really, really far. We started out with Postgres because it was just the simple and sensible option for a production prototype, and when somebody came around telling me we need something more scalable recently, I calculated that there's not even enough addressable market in the world for our business for more than 4x our size. That's exactly the two remaining vertical doublings of our DB instance (to ridi…
Re: SPQR 1.3.0: a production-ready system for horizontal scaling of PostgreSQL
#53Earlier quoted context omitted.
Far. As in, really, really far. We started out with Postgres because it was just the simple and sensible option for a production prototype, and when somebody came around telling me we need something more scalable recently, I calculated that there's not even enough addressable market in the world for our business for more than 4x our size. That's exactly the two remaining vertical doublings of our DB instance (to ridi…
At this point you can get 24TB of RAM in an EC2 instance (along with 448 vCPUs, 100Gbps of network bandwidth and 38Gbps of EBS bandwidth). That won't scale forever, but Stack Overflow has been running on a single primary/standby setup with 1.5TB of RAM so that would be 16x Stack Overflow's RAM. I think a lot of work goes into horizontal scaling which is necessary at a certain scale, but very few people actually get a…
I agree it adds alot of complexity to the problem, which is another cost.
I guess this would be another argument for pay-as-you go cloud-managed DBs, despite being more expensive than rolling your own.
Re: SPQR 1.3.0: a production-ready system for horizontal scaling of PostgreSQL
#54Why use SPQR over Citus? Vitess?
The fact that it's a router and not a PG extension is helpful if you are using cloud hosted postgres and don't want to get into the business of managing backups etc yourselves. Only azure supports Citus as far as I know.
Re: SPQR 1.3.0: a production-ready system for horizontal scaling of PostgreSQL
#55Earlier quoted context omitted.
My cluster is clocked in at 230TB in Aurora. It is hitting a hard limit of 250TB AWS can support.
Being curious I was wondering what type of applications could generate this quantity of data. Is it IoT / remote sensing related?
I worked for a company that had only a few thousand active customers yet had dozens of terabytes of data, for this reason.
Re: SPQR 1.3.0: a production-ready system for horizontal scaling of PostgreSQL
#56Earlier quoted context omitted.
My cluster is clocked in at 230TB in Aurora. It is hitting a hard limit of 250TB AWS can support.
Being curious I was wondering what type of applications could generate this quantity of data. Is it IoT / remote sensing related?
Maybe not the best idea, I guess a file system would be better for that, and just use the DB for metadata.
But OTOH all the data is one place, so you just migrate the DB. Less to worry about.
I just looked up, all of English Wikipedia (including images) is barely even 100 GB ... crazy world we live in.
Re: SPQR 1.3.0: a production-ready system for horizontal scaling of PostgreSQL
#57A comparison to https://www.citusdata.com/ would be nice
for one thing: https://github.com/pg-sharding/spqr/blob/1.3.0/LICENSE (BSD2) https://github.com/citusdata/citus/blob/v12.1.2/LICENSE (AGPLv3)
Re: SPQR 1.3.0: a production-ready system for horizontal scaling of PostgreSQL
#58Earlier quoted context omitted.
PgBouncer just pools the connection, but each connection still needs its own process in PostgreSQL itself. Each query blocks the whole process. That limits the amount of queries that can run in parallel/concurrently to the amount of connections. Long-running queries can easily clog up everything. No tool can fix this, you need to be aware of it and consider it in your design.
It's not really about the processes. Even if each query ran on a thread within a process, or some form of greenthreading were in use, there are I/O constraints and locking to consider.
I/O or compute constraints are another issue, if your CPU or disc is already saturated you get probably no additional benefit.
But if you wait for something (locks, I/O) the connection/process can't do other things. High latency between app/database and long running transactions can also use up your available processes, even if they don't consume a lot of CPU or I/O or fight for the same locks.
Lock contention is its own problem, but makes the blocking of processes/connections worse.
Re: SPQR 1.3.0: a production-ready system for horizontal scaling of PostgreSQL
#59I see nothing about partition tolerance, so I assume it isn't at all.
Give me Aphyr tests or there is no reason to pay attention.
Re: SPQR 1.3.0: a production-ready system for horizontal scaling of PostgreSQL
#60Earlier quoted context omitted.
Far. As in, really, really far. We started out with Postgres because it was just the simple and sensible option for a production prototype, and when somebody came around telling me we need something more scalable recently, I calculated that there's not even enough addressable market in the world for our business for more than 4x our size. That's exactly the two remaining vertical doublings of our DB instance (to ridi…
At this point you can get 24TB of RAM in an EC2 instance (along with 448 vCPUs, 100Gbps of network bandwidth and 38Gbps of EBS bandwidth). That won't scale forever, but Stack Overflow has been running on a single primary/standby setup with 1.5TB of RAM so that would be 16x Stack Overflow's RAM. I think a lot of work goes into horizontal scaling which is necessary at a certain scale, but very few people actually get a…
* DB backups are now (much) faster.
* Smaller backups means faster restores which reduces your RTO (Recovery Time Objective)
* If you have a well architectured application a catastrophic DB failure will now only impact a portion of your userbase instead of all of them.
There are probably more good reasons but these are the ones I could think of now.