MongoDB 3.0 WiredTiger compression results
-
I use Redis on a quite big installation.
Maybe it is due to DDR4 RAM, but for me it just performs better than MongoDB, even though I would have to compare them again as I got NVMe SSD's now.What would also interest me is how your benchmark results are for Redis.
Otherwise I also agree. Redis is a bit "boring", maybe the focus should be put on SSDB, which is used in very, very, very big installations.
-
It's probably because you have enough RAM to hold your database. Redis is faster... when you have the RAM for it. It's failover mechanisms are not that robust (I ran Redis management for one of the world's largest websites and it is FAST but such a huge pain to deal with Sentinel monitoring and your ring health.)
We would need 4X our current RAM to move from MongoDB back to Redis. We use SSDs in RAID 10 to get our disk speed up rather than going to all RAM like we would do with Redis. And we are growing rapidly so where we are today is just the tip of the iceberg as far as memory requirements. With Redis you really want enough RAM for the entire dataset on each node. That ads up quickly. So for a 4+ GB database you'd be realistically looking at three nodes each with 8GB to handle it.
-
@AOKP said:
Otherwise I also agree. Redis is a bit "boring", maybe the focus should be put on SSDB, which is used in very, very, very big installations.
What are the biggest installations? What size are we talking about?
-
@scottalanmiller I do not know how well you know chinese websites, but if you do here you go:
http://ssdb.io/docs/users.html -
@AOKP said:
@scottalanmiller I do not know how well you know chinese websites, but if you do here you go:
http://ssdb.io/docs/users.htmlAh, not NodeBB sites, you mean. That makes sense.
When I was at one of the world's top sites it was Redis, MongoDB and Cassandra running the show with MongoDB being phased out.
-
@scottalanmiller to be honest. Most sites still use MySQL/MariaDB. Simply because they are more flexible than MongoDB. If you want to run MongoDB properly you need a strong and so expensive system. For me MongoDB caused around 15% CPU load, which is basically unacceptable, especially in productive areas.
However MongoDB is indeed quite good, if you do not know how big you will go and you don't want to think much about how data will be stored.
-
Was that an older version of MongeDB? Since 2.6 (we were on 2.6.5 for a long time, on 2.6.11 now) we don't see CPU loads anything like that, even with a pretty busy site. MongoDB is still less than our NodeBB processing.
-
@scottalanmiller nope. It was MongoDB 3.0.4 or something like that.
-
I'm surprised, MongoDB 3 was supposed to be even faster than 2.
-
@scottalanmiller but not faster than Redis as a matter of fact.
-
@AOKP database afford really isn't that significant in the case of NodeBB anyways. Templates.js is really slow at parsing templates.
-
@pitaj said:
Templates.js is really slow at parsing templates.
#shotsfired
In @psychobunny's defence, he and @baris have been working quite hard to get parsing speed up, especially leading up to v0.9.0... there may be a couple jsfiddles comparing ops/s somewhere...
-
Grabbing popcorn.
-
@AOKP said:
@scottalanmiller but not faster than Redis as a matter of fact.
I wouldn't expect it to be. Redis is all about speed at any cost. MongoDB is more about scaling and stability.
-
"Speed at any cost" doesn't sufficiently describe antirez' approach to development. I believe he honestly has data persistence as a primary concern when designing Redis.
Objectively:
- Both Redis and Mongo store data in memory
- Redis stores the entire data set in memory, and persists to disk regularly
- MongoDB stores recently accessed data in memory, as well as any new data, before eventually writing it to disk
Even saying "eventually writing it to disk" sounds like Mongo is careless with data, but again, I want to stress here that although neither MongoDB or Redis writes are atomic in nature, Mongo writes will make it to the disk pretty damn quickly, unless your machine is under heavy load, in which case it may be behind a little bit, but eventually will flush to disk.
-
@scottalanmiller wrong.
As I explained before Redis and MongoDB have 2 different goals.You should always go with Redis, if you are able to store your data (key-value) properly sorted, while MongoDB is good if you do not know how far your project will go and how its data will be stored:
http://stackoverflow.com/questions/5400163/when-to-redis-when-to-mongodbAnd how can Redis be "performance at any cost"? Thanks to RDB and AOF, your database is pretty secure. However, please note that RDB might lose a few minutes data, which you can prevent by setting fsync for AOF to every second. Performance differences will be slightly slower, but thats all.
-
@julian well, those perf improvements had better include compiling templates into JS functions, or I'm gonna be disappointed.
-
@pitaj said:
@julian well, those perf improvements had better include compiling templates into JS functions, or I'm gonna be disappointed.
@psychobunny mentioned he wants to do this, no clue how the implementation will look like though.
-
@baris something like this:
Templates.compile = function (template){ var fnsrc = ""; // magic to convert the template into the source of a JS function return fnsrc; }; // you can write that to a JS file and use r.js to load it or what have you // then just call the function with the data to parse it var header = require(headertpl); var html = header({ user: {} etc });
You could even add a custom require method to automatically compile templates when they are required.
-
This is on my to do list
// magic to convert the template into the source of a JS function
I just have to write
// TODO magic