Live data from Hacker News

Open-sourcing a 10x reduction in Apache Cassandra tail latency

engineering.instagram.com

141–150 of 171 posts

Re: Open-sourcing a 10x reduction in Apache Cassandra tail latency

#141
post #140

Earlier quoted context omitted.

Many of these open-source databases started as internal projects inside big companies, where Java/JVM allowed for more productivity and cross-platform deployment with more skill reuse of the team. Then they grew from there and now it's too late to rewrite the whole thing. If you were starting a database-focused company from the beginning than choosing C++ is a better decision, which is exactly what ScyllaDB has done…

Go is a much better choice for systems work. Largely because the GC has a low pause (sub ms) target. I'd still be hesitant to use it for very latency sensitive things, or memory intensive applications. Prometheus, for example, has struggled with golang's memory management (bad memory fragmentation, wasteful memory usage). But I think it's a great compromise if you don't want to deal with memory management.

Sure, I would also .NET/C# to the list now.

.NET Core on Linux is very fast and there are some great developments around fast low-level (yet managed) managed memory manipulation that can lead to some very fast software.

Re: Open-sourcing a 10x reduction in Apache Cassandra tail latency

#142

Earlier quoted context omitted.

> If you need to mentally track every implicit allocation and deallocation in Java then you are essentially writing code in a kneecapped version of C++. Well, Java has the advantage of being platform (and to a certain degree, runtime) independent, plus a robust set of best practices and ecosystem when it comes to modules and library handling, which is pretty hard to get done right for C/C++ projects.

> Well, Java has the advantage of being platform (and to a certain degree, runtime) independent What is the benefit of that? Who on earth runs a DB written in Java on windows? Any useful server software will end up using platform native features, be it SQL server, MySQL, HBase, ...

> Who on earth runs a DB written in Java on windows?

There still are lots of Windows-only shops.

Re: Open-sourcing a 10x reduction in Apache Cassandra tail latency

#143
post #95

Earlier quoted context omitted.

you clearly didn't read the post very closely. They said 2.5% of CPU cycles were spent on stop-the-world young generation collections, not on the sum total of all memory mangement. That means that 2.5% of the time the app is entirely stalled on just these collections. Given that stop-the-world pauses are never evenly distributed throughout time, it should be very much expected that this much GC stalling would affect…

> Given that stop-the-world pauses are never evenly distributed throughout time That is not a given. And, even distribution is only part of the equation. If they are sufficiently short, then even being somewhat unevenly distributed should not have much of an impact on latency. For example, if the max length of a pause were 1ms, and 99p latency were 15ms, you'd have to be fairly unlucky to see a 33% increase in latenc…

I'd love to see how Go's GC performs when running an application similar to Cassandra, on multiple cores, with gigabytes of memory allocated.

Re: Open-sourcing a 10x reduction in Apache Cassandra tail latency

#144

Earlier quoted context omitted.

> Given that stop-the-world pauses are never evenly distributed throughout time That is not a given. And, even distribution is only part of the equation. If they are sufficiently short, then even being somewhat unevenly distributed should not have much of an impact on latency. For example, if the max length of a pause were 1ms, and 99p latency were 15ms, you'd have to be fairly unlucky to see a 33% increase in latenc…

I'd love to see how Go's GC performs when running an application similar to Cassandra, on multiple cores, with gigabytes of memory allocated.

This is a thing others have already done, although I don't have citations to hand.

Re: Open-sourcing a 10x reduction in Apache Cassandra tail latency

#145
post #121

Earlier quoted context omitted.

7 hosts in that poc, that is not "at scale"

Scylla can handle 10-100x the load of Cassandra on the same servers. Scale is more than just the number of hosts.

Data density is a thing. If u putting 10tb on a c* host, switching to Scylla doesn’t fix the issues that putting 1pb of data on a host would involve (ie backing that up). Throughput of 100mb of data done in marketing benchmarks are rarely relevant.

Re: Open-sourcing a 10x reduction in Apache Cassandra tail latency

#147

Earlier quoted context omitted.

This is correct; the standard approach here is to use regular c-style memory management for the data the system is managing, and the JVM heap only for the database "infrastructure". This hybrid approach gives the benefit of a managed runtime and safety of GC for most of your code, but allows the performance of raw pointers/malloc for key code paths. Some examples of this pattern on the JVM: - The Neo4j Page Cache, Mu…

> but allows the performance of ... malloc for key code paths. Everything is relative, I guess.

Hah :) I don't mean that malloc itself is fast, I mean that having non-jvm heap memory is fast.

A permanent memory block on the JVM heap can't use pointers to refer to it, since GC moves objects around. And even though those blocks will never be collected, they make up additional work for the GC to track.

Re: Open-sourcing a 10x reduction in Apache Cassandra tail latency

#149
post #145

Earlier quoted context omitted.

Scylla can handle 10-100x the load of Cassandra on the same servers. Scale is more than just the number of hosts.

Data density is a thing. If u putting 10tb on a c* host, switching to Scylla doesn’t fix the issues that putting 1pb of data on a host would involve (ie backing that up). Throughput of 100mb of data done in marketing benchmarks are rarely relevant.

Ok, but that's a different issue and nobody is suggesting 1PB of data on a single node as a good idea. The comment was that "scale" is more than just a simple count of nodes. Even if you keep the data the same size, Scylla can handle it with much better performance which is a good enough reason for many to use it.

Re: Open-sourcing a 10x reduction in Apache Cassandra tail latency

#150
post #121
post #114

Earlier quoted context omitted.

> some new thing NOBODY has run at scale Outbrain uses ScyllaDB in production at scale across multiple data centers. Not sure if it's Instagram scale, but still enough to prove it's reliability and performance. https://www.outbrain.com/techblog/2016/08/scylladb-poc-not-s...

7 hosts in that poc, that is not "at scale"

Since that poc they're using Scylla on hundreds of machines... that's just an old post.
Post reply on HN