Live data from Hacker News

Databases at 14.4Mhz

blog.foundationdb.com

41–50 of 86 posts

Re: Databases at 14.4Mhz

#41

Earlier quoted context omitted.

Per the article, it's about 1/20th the cost that Google would charge you for the same number of writes.

I had seen that as well, actually. Is this the kind of data or transaction level that might only be expected for a Google level throughput?

Well, do you do 14.4 million serializable writes per second or anything close to that?

Re: Databases at 14.4Mhz

#42

Earlier quoted context omitted.

I'm not an expert in this, but: because there are no reads, any serialization order is possible and therefore there is no chance of conflict I don't understand how this is the case. If clients A and B try to write to the same key, it can be serialized as {A,B} or {B,A}, but in either case, there is some kind of conflict... no?

Nope. Not unless someone actually read that same key in their transaction. Then, with optimistic concurrency at least, you might get a conflict at commit time that basically says "Hey, someone changed that key you read in the meantime so your write might not be correct anymore".

Ah – I see what you mean now! If they are blind writes, not some kind of CAS operation (reading from and modifying the same key), then there is no conflict.

I thought you meant that clients A and B do their writes, and only if someone at a later time were to observe the value at that key, a conflict would be caused (Heisenberg-style).

Thanks for clarifying!

Re: Databases at 14.4Mhz

#43

I'm only familiar with other key-value storage engines, not FoundationDB, but it seems like the goals are: "distributed key-value database, read latencies below 500 microseconds, ACID, scalability". I remember evaluating a few low latency key-value storage solutions, and one of these was Stanford's RAMCloud, which is supposed to give 4-5 microseconds reads, 15 microseconds writes, scale up to 10,000 boxes and provide…

But it doesn't store the data on disk.

It should be compared to Memcached, not to a real storage engine.

Re: Databases at 14.4Mhz

#44
post #40

This looks very interesting and congratulations to the FoundationDB crew on some pretty amazing performance numbers. One of the links leads to an interesting C++ actor preprocessor called 'Flow'. In that table, it lists the performance result of sending a message around a ring for a certain number of processes and a certain number of messages, in which Flow appears to be fastest with 0.075 sec in the case of N=1000 a…

There's got to be some mistake there somewhere - on your part, or on theirs - because there's no way erlag improved from 1.09 seconds to 34 micro seconds on pretty much any benchmark between 2010 and 2014. Even the factor 1000 (the message count) isn't enough to account for that difference - something's fishy.

1M messages passes in 34 microseconds would be ~0.1 CPU clocks per message pass. Maybe an optimizer is stepping in and short-circuiting?

Re: Databases at 14.4Mhz

#46

Earlier quoted context omitted.

I would agree. While 14.4 million writes per second is impressive, it definitely doesn't fit the definition of the Hz unit (cycles per second).

Right, because a database write is not generally a periodic event. The unit they want is the becquerel - 14.4MBq might even sound more impressive because not so many people are familiar with that unit!

I agree that Hz seems to imply a periodic event.

But I disagree that the Bq is appropriate for this example; the becquerel quantifies radioactivity:

> The becquerel (symbol Bq) (pronounced: 'be-kə-rel) is the SI derived unit of radioactivity. One Bq is defined as the activity of a quantity of radioactive material in which one nucleus decays per second. (https://en.wikipedia.org/wiki/Becquerel)

Re: Databases at 14.4Mhz

#47
post #41

Earlier quoted context omitted.

I had seen that as well, actually. Is this the kind of data or transaction level that might only be expected for a Google level throughput?

Well, do you do 14.4 million serializable writes per second or anything close to that?

Note my original comment -- nope. I haven't worked on anything that would have a need anywhere near that amount of throughput.

Re: Databases at 14.4Mhz

#48
post #40

Earlier quoted context omitted.

There's got to be some mistake there somewhere - on your part, or on theirs - because there's no way erlag improved from 1.09 seconds to 34 micro seconds on pretty much any benchmark between 2010 and 2014. Even the factor 1000 (the message count) isn't enough to account for that difference - something's fishy.

1M messages passes in 34 microseconds would be ~0.1 CPU clocks per message pass. Maybe an optimizer is stepping in and short-circuiting?

heh, not only that, but my fingers accidentally made my test massively concurrent! Such are the perils of erlang. When I defeat the optimizer and also force message passing to be serialized both inside and outside a trial, I get an average of 525000 microseconds, which is more in line with the other results.

Re: Databases at 14.4Mhz

#49

Earlier quoted context omitted.

Nope. Not unless someone actually read that same key in their transaction. Then, with optimistic concurrency at least, you might get a conflict at commit time that basically says "Hey, someone changed that key you read in the meantime so your write might not be correct anymore".

Ah – I see what you mean now! If they are blind writes, not some kind of CAS operation (reading from and modifying the same key), then there is no conflict. I thought you meant that clients A and B do their writes, and only if someone at a later time were to observe the value at that key, a conflict would be caused (Heisenberg-style). Thanks for clarifying!

DBs that are consistent until you observe them, a funny thought. In some parallel universe, the DB is still consistent; one could argue.

Re: Databases at 14.4Mhz

#50

Earlier quoted context omitted.

Nope. Not unless someone actually read that same key in their transaction. Then, with optimistic concurrency at least, you might get a conflict at commit time that basically says "Hey, someone changed that key you read in the meantime so your write might not be correct anymore".

Ah – I see what you mean now! If they are blind writes, not some kind of CAS operation (reading from and modifying the same key), then there is no conflict. I thought you meant that clients A and B do their writes, and only if someone at a later time were to observe the value at that key, a conflict would be caused (Heisenberg-style). Thanks for clarifying!

Just to further clarify, the transactions (and therefore transaction conflict detection) are more flexible than simple CAS operations. If transaction A reads key K1, and then writes to key K2, it will be rejected as conflicting if transaction B writes to key K1 and is serialized as happening before transaction K1 is committed (even though no other transaction wrote to key K2).

Every transaction in FoundationDB is submitted as a collection of writes/mutations, but also contains records of all keys read (and the consistent version at which they were read). In this test, the transactions all have empty conflict ranges, and thus cannot conflict with other transactions (but we still have to check!).

Post reply on HN