3 ms·
Comparing PostgreSQL with MemSQL is like comparing a steam locomotive with a steam ship. PostgreSQL ensures on-disk data consistency for each transaction. MemS
by lngnmn 10y ago
Comparing PostgreSQL with MemSQL is like comparing a steam locomotive with a steam ship.
PostgreSQL ensures on-disk data consistency for each transaction. MemSQL does not implement this kind of complex logic.
VoltDB and MemSQL are of totally different kind of products. There is the CMU database course which explains the details.
- manigandham 10y agoMemSQL has full persistence and supports transactions. There is async lag to fsync in-memory data to disk, which is configurable, but obviously this is a trade-off with RAM based operations like any other database. It runs as a distributed cluster so it's faster and safer than typical single-node (with replica) installations. For primary operational datastores, it's probably not a fit, but it's great for real time data warehouse needs. VoltDB is on the other end of the spectrum and more exotic, designed for purely real-time in-memory SQL transactions, almost similar to in-memory datagrids like Apache Ignite/GridGain or Hazelcast.
- jhugg 10y ago> There is async lag to fsync in-memory data to disk, which is configurable, but obviously this is a trade-off with RAM based operations like any other database. As a VoltDB dev, I don't accept this. Performance and sync disk persistence for every transaction don't have to be mutually exclusive, they just require the right architecture and engineering work. We get our speed from memory-centric data structures, and by never waiting on disks/users in a transaction. Doing batch commits (fsyncs) to the WAL every few MS means you can keep your throughput very close to an async thoughput without trading any persistence. I'm not sure how exotic VoltDB is, but I agree it's a different animal than MemSQL. VoltDB is focused on transactional and operational workloads, while MemSQL is more of a pure analytics play. It has "transactions", but with weaker guarantees all-around. We take our guarantees very seriously (see Jepsen https://aphyr.com/posts/331-jepsen-voltdb-6-3 https://aphyr.com/posts/331-jepsen-voltdb-6-3). VoltDB does do "real-time analytics", which we typically define as analytics you can do in milliseconds. This leverages materialized views, special sorted indexes with ranking support, and lots of other tricks that MemSQL doesn't focus on. This enables our users to transactionally respond to an event as it happens in a few milliseconds, all while leveraging gigabytes or terabytes of state.
- manigandham 10y ago> Doing batch commits (fsyncs) to the WAL every few MS means you can keep your throughput very close to an async thoughput without trading any persistence. This is what I said. There's still a lag, regardless of disk speed, batching, append-only parallel writes, etc. It's physics. MemSQL and VoltDB and other in-memory db with persistence do it the same. Not much of an issue these days with distributed systems anyway since the network is faster and the data is already on another node.
- jhugg 10y ago1) There's no lag between VoltDB confirming to clients that a write has been committed and that write being on disk. Zero. 2) The way VoltDB does persistence is actually quite different than MemSQL. VoltDB is able to write deterministic logical ops before the work even starts, while Mem has to write binary logs after the work is finished. The difference in practical terms is dramatic and will show up in almost any benchmark.