News for hackers. Stuff that matters.
Re:Ask HN: Do you find working on large distributed systems ... by fxtentacle on Monday February 21, 2022 @06:40AM (#30414648)
Just FYI, MongoDB storage also uses mmap internally.

So we are comparing here "just mmap" with "mmap + all that connection handling, query parsing, JSON formatting, buffering, indexing, whatever stuff that MongoDb does".

And no, MongoDB is effectively never a cheap solution. They are used because they are super convenient to work with, with all things being JSON documents. But all that conversion to and from JSON comes at a price. It'll eat up 1000s of CPU cycles just to read a single document. With raw mmap, you could read 1000s of documents instead.

Re:Ask HN: Do you find working on large distributed systems ... by jd_mongodb on Monday February 21, 2022 @08:14AM (#30415531)
MongoDB uses the Wired Tiger storage engine internally. The MMAP storage engine was removed from MongoDB in V4.2 which was released in March 2020. The MMAP engine was deprecated two years previously.

In MongoDB conversion to and from raw JSON into BSON (Binary JSON) is done on the client (aka driver) so the server cycles are not consumed.

Re:Ask HN: Do you find working on large distributed systems ... by winrid on Monday February 21, 2022 @01:43PM (#30419178)
And 2 you're looking past the point. Any DB work work fine for this use case. If you wanted sharding, there's vitess for mysql, for example.
Re:Ask HN: Do you find working on large distributed systems ... by winrid on Monday February 21, 2022 @12:38PM (#30418408)
As another already said, Mongo doesn't use mmap anymore.

Mongo doesn't convert to and from JSON. The driver uses a binary protocol.