Live data from Hacker News

PostgreSQL, Memory and the Cloud

sosna.de

51–60 of 60 posts

Re: PostgreSQL, Memory and the Cloud

#51
post #18
post #9

Earlier quoted context omitted.

Most of these were likely managed-language programs. Programs witten for managed language runtimes will have a language-runtime-level abort on malloc(2) fail, which usually is well written, in the sense that it will clean up language-runtime-level resources, and emit a language-runtime-level error message. But this language-runtime-level abort usually isn’t exposed to the application in any hookable way, so from the…

« Most of these were likely managed-language programs. » Please don't guess. They weren't. It is true that a program that aborts as soon as malloc returns failure isn't doing any special cleanup or attempting to keep going. But that's not at all the same as « Those programs will just assume the return value from malloc(2) is valid memory. In the best case, they’ll immediately write to it and protection-fault. », whic…

> Please don't guess.

I'm not guessing. I'm just answering you by ignoring/disregarding your personal experience, and instead treating you as a random variable sampling the population of people who use all possible software, and then talking about what that random variable would look like.

Why? Because we don't need anecdotes to know this particular thing — we have the data. We know what the random variable actually looks like. (How? Because people have downloaded "all of Github" or "the entire Debian package archive", and run Valgrind over it, and uploaded the resulting dataset to BigQuery!) By the Law of Large Numbers, we can actually do stats about, effectively, what "all software" looks like.

By volume, the majority of POSIX software that calls malloc(2), is incompetently-written, with no checks on the return result of malloc(2). This is an objective, verifiable fact.

By volume, the majority of POSIX software that has a call to malloc(2) that does check the return value, exists as the result of a managed-language compiler emitting a language-runtime-level check into the compiled binary, rather than as an explicit source-level check. Another objective, verifiable fact.

-----

It so happens that the software making up the "backbone" of an OS / average LAMP server is more competently-written, because it's had a lot more attention and engineering time put into it.

But the same "power law of features" from e.g. Microsoft Office applies here — there's a core set of stuff everyone uses, but every user also has some weird stuff they are in the small minority of users for. And that stuff is what breaks.

As it happens, that lesser-used stuff is also usually mission-critical to the operation of a business; otherwise people wouldn't be driven to use such not-a-lot-of-engineering-effort-put-in software in the first place. People are using this stuff "in anger", if they're using it at all.

Which means that, sadly — insofar as most developers creating business-process IPC pipelines, don't already have the hard-won experience to build in fault-tolerance for individual processes within that pipeline — we see production systems where these malloc(2) failures are Single Points of Failure for the entire system. The flakiness of these long-tail programs, drags down the reliability of most systems-as-a-whole.

Re: PostgreSQL, Memory and the Cloud

#52
post #51
post #18

Earlier quoted context omitted.

« Most of these were likely managed-language programs. » Please don't guess. They weren't. It is true that a program that aborts as soon as malloc returns failure isn't doing any special cleanup or attempting to keep going. But that's not at all the same as « Those programs will just assume the return value from malloc(2) is valid memory. In the best case, they’ll immediately write to it and protection-fault. », whic…

> Please don't guess. I'm not guessing. I'm just answering you by ignoring/disregarding your personal experience, and instead treating you as a random variable sampling the population of people who use all possible software, and then talking about what that random variable would look like. Why? Because we don't need anecdotes to know this particular thing — we have the data. We know what the random variable actually…

« This is an objective, verifiable fact. [...] Another objective, verifiable fact. »

Please provide your references, then.

Re: PostgreSQL, Memory and the Cloud

#53
post #36

Earlier quoted context omitted.

An example of the kinds of quality issues you run into with so many GCP products: https://github.com/googleapis/cloud-trace-nodejs/issues/1272 Basically, their Cloud Tracing product is broken for modern Node/Postgres (in terms of showing PG queries and whatnot in traces), users have found the issue (and a seemingly super simple fix), but it’s been over a year and Google still haven’t fixed it. Google’s response is “y…

> Cloud SQL isn’t terrible, but at least the Postgres version is one of the weaker managed Postgres offerings out there. And their whole observability stack (Logging/Monitoring/Tracing/Error Reporting) is legit terrible compared to competing products. Compared to other products I’ve used in the space, Cloud Logging is unbelievably worse than Sumo Logic, Cloud Metrics soooo much worse than Grafana+Prometheus, Cloud Tr…

Fair enough, we never used CloudWatch at my previous company, where we did use AWS for most infra, but didn’t use CloudWatch, so don’t have much experience. But we do use Cloud ops suite (a.k.a. Stackdriver) at my current co, and man, I miss the more standalone observability tools we used at my previous co - Sumo, Prometheus/Grafana, Sentry and New Relic. They’re sooooooo far ahead it’s not even funny.

Re: PostgreSQL, Memory and the Cloud

#54

A metacomment about the page (rather than the content): the text in the white boxes is almost unreadable for me, the contrast is crazy low.

I had this problem, too; there's a button to toggle the night mode theme, which fixed it for me.

Oh. I didn't even see that. That does indeed make the text legible, thank you. Sadly it makes the entire page too bright, but at least its readable!

Re: PostgreSQL, Memory and the Cloud

#55
post #31
post #8

Wow, the title of this post is very calm compared to what is actually happening. CloudSQL Postgres is running with a misconfigured OS OOM killer, crashes Postmaster randomly even if memory use is below instance spec. GCP closes this bug report as "Won't fix". This is a priority 1 issue. Seeing a wontfix for this has completely destroyed my trust of their judgement. The bug report states that they have been in contact…

So many GCP products are surprisingly terrible. Certainly not all of them, some are really good, like GKE, Cloud Storage and Cloud Load Balancer. But Cloud SQL is pretty weak, and products like Cloud Logging, Cloud Metrics and Cloud Tracing are legitimately terrible. Cloud NAT is pretty sketchy too, and can lead to a lot of egress issues if not configured perfectly. My current workplace uses GCP, my last workplace us…

It's interesting that you are satisfied with GKE. Do you rely on the k8s-API to be (high) available? We were using the API as our source of truth for Patroni, but we had to configure some really high timeouts in order to compensate regular multi minute API downtimes.

Re: PostgreSQL, Memory and the Cloud

#56

Earlier quoted context omitted.

I had this problem, too; there's a button to toggle the night mode theme, which fixed it for me.

Oh. I didn't even see that. That does indeed make the text legible, thank you. Sadly it makes the entire page too bright, but at least its readable!

I usually assume it's just my eyes getting worse, so I'm low-key glad someone else complained.

Re: PostgreSQL, Memory and the Cloud

#57
post #55
post #31

Earlier quoted context omitted.

So many GCP products are surprisingly terrible. Certainly not all of them, some are really good, like GKE, Cloud Storage and Cloud Load Balancer. But Cloud SQL is pretty weak, and products like Cloud Logging, Cloud Metrics and Cloud Tracing are legitimately terrible. Cloud NAT is pretty sketchy too, and can lead to a lot of egress issues if not configured perfectly. My current workplace uses GCP, my last workplace us…

It's interesting that you are satisfied with GKE. Do you rely on the k8s-API to be (high) available? We were using the API as our source of truth for Patroni, but we had to configure some really high timeouts in order to compensate regular multi minute API downtimes.

We need the services we run inside K8s to be highly available (as well as K8s ingress), but the K8s API we care less about. We haven't noticed any K8s API downtime issues, but I guess we mostly hit the K8s API during deploys, which for us are likely not frequent enough to notice the downtime you're talking about.

Re: PostgreSQL, Memory and the Cloud

#58
post #41
post #31

Earlier quoted context omitted.

So many GCP products are surprisingly terrible. Certainly not all of them, some are really good, like GKE, Cloud Storage and Cloud Load Balancer. But Cloud SQL is pretty weak, and products like Cloud Logging, Cloud Metrics and Cloud Tracing are legitimately terrible. Cloud NAT is pretty sketchy too, and can lead to a lot of egress issues if not configured perfectly. My current workplace uses GCP, my last workplace us…

Not really surprising if you consider their likely motivations. Google isn't in the business of selling things to end users, they're in the business of selling ads. The only thing GCP gives them (outside of getting wall streeters off their backs a few years ago when everyone and their brother was starting a cloud service) is a credit to their own infrastructure cost by selling excess to random joes. Therefore I'm not…

I mean, GCP is a decent source of revenue for them. i.e. last quarter:

* Alphabet did ~$55 billion in revenue overall last quarter, ~$4 billion was from "Cloud", which is GCP + Workspace (I don't think they disclose how much is GCP alone?). Although, for now it's a money loser for them, they had operating losses of ~$1 billion for Cloud, but the operating losses are shrinking over time, it'll become profitable eventually

* In contrast, Amazon did ~$108 billion in revenue overall last quarter, and ~$13.5 billion was from AWS. Although unlike GCP, AWS is highly profitable, ~$4 billion in operating income for the quarter, which is almost half of Amazon's total operating income

But AWS isn't THAT much higher a percentage of Amazon's revenue than GCP is of Alphabet's revenue. And in terms of COSTS, AWS is actually spending less, relative to their overall revenue (Amazon spending ~$9.5 billion of $108 billion total revenue on AWS, Google spending ~$5 billion of $55 billion total revenue on "Cloud").

AWS has been around longer than GCP, and they've certainly spent more absolute dollars, so it makes sense it's further ahead and more polished. Yeah, AWS is more used to selling things to end users than Google, they may have a better culture for quality there, but Google invests heavily in GCP, and it's a pretty significant revenue stream for them. I'm guessing their motivations are similar, both see Cloud offerings as a big revenue stream first and foremost.

Re: PostgreSQL, Memory and the Cloud

#59
post #53

Earlier quoted context omitted.

> Cloud SQL isn’t terrible, but at least the Postgres version is one of the weaker managed Postgres offerings out there. And their whole observability stack (Logging/Monitoring/Tracing/Error Reporting) is legit terrible compared to competing products. Compared to other products I’ve used in the space, Cloud Logging is unbelievably worse than Sumo Logic, Cloud Metrics soooo much worse than Grafana+Prometheus, Cloud Tr…

Fair enough, we never used CloudWatch at my previous company, where we did use AWS for most infra, but didn’t use CloudWatch, so don’t have much experience. But we do use Cloud ops suite (a.k.a. Stackdriver) at my current co, and man, I miss the more standalone observability tools we used at my previous co - Sumo, Prometheus/Grafana, Sentry and New Relic. They’re sooooooo far ahead it’s not even funny.

I'm gonna use your disasfaction of your log management tool for a little self-promotion. I'm working as part of the Wrble.com team its a fast logging platform that is priced way lower than hosting your open source stack. We are based on Lucene technology. I believe we provide the same service that existing players do for an 80% reduction in spending. Give it a shot let me know what you think.

Re: PostgreSQL, Memory and the Cloud

#60
post #59
post #53

Earlier quoted context omitted.

Fair enough, we never used CloudWatch at my previous company, where we did use AWS for most infra, but didn’t use CloudWatch, so don’t have much experience. But we do use Cloud ops suite (a.k.a. Stackdriver) at my current co, and man, I miss the more standalone observability tools we used at my previous co - Sumo, Prometheus/Grafana, Sentry and New Relic. They’re sooooooo far ahead it’s not even funny.

I'm gonna use your disasfaction of your log management tool for a little self-promotion. I'm working as part of the Wrble.com team its a fast logging platform that is priced way lower than hosting your open source stack. We are based on Lucene technology. I believe we provide the same service that existing players do for an 80% reduction in spending. Give it a shot let me know what you think.

Looks interesting, but can you only do very structured queries of JSON logs? We like to be able to do full text search on the whole log, i.e. find every log with a specific UUID in it, regardless of where in the log the UUID is.

Also, looks like no log aggregation? i.e. no SQL style queries on logs, that you can do in products like Sumo Logic.

GREAT pricing, but my first impression is that it’s lacking some key features we’re looking for. Seems like you guys are going for the low priced, bare bones solution, and it’s literally orders of magnitudes cheaper than a really feature rich solution like Sumo, but I think it’s too stripped down for us.

Post reply on HN