Redis memory usage

Unsolved Technical Support
  • Hi,

    I am part of a team that considers switching from old, legacy forum engine to NodeBB.
    One of the unknowns we need to address is the amount of RAM our Redis instance would require.
    Currently our Forums hold around 111k posts and little under 200k users (although I suspect lot of them are closed/banned/never used so the amount to move would be maybe half of that).

    Can anyone that has experience running a forum of a similar scale on NodeBB chime in and provide stats about Redis memory usage?

    Thanks in advance,

  • I honestly don't know how much RAM it would require, but if you're worried about it you can always use MongoDB + Redis, it's fast enough and it doesn't require to put everything in RAM.

    I think big forums use mongo + redis if not only mongo.

    My forum has 4k users and 3.5k posts (more or less) and I use 84Mb of RAM with Redis only, if we suppose that an user "weight" as much as a post (even if a post is actually less), it would require 3.5Gb of RAM (311k/7.5k*84).
    Even if I think it should be less.

  • Thanks for the numbers @Giggiux!

    I am leaning towards Redis because I don't like how NodeBB structures data inside MongoDB - with Redis it is also not-so-pretty (well, that's how NoSQL operates), but at least I get a feeling that I can search and modify the database by hand, if necessary.

  • Adding in some more memory usage. I've got 1 GB of memory on my box, and my redis is using ~255 MB of virtual memory and ~223 MB of resident memory.

    I've got only 88 users, but 23,105 posts.

    Some day I may need to swap to mongo...

  • This'd been discussed many times before on this forum, so you may look at other topics for a reference.

    I've personally only used MongoDB, but my forum is quite low on traffic, and I'd like to spare RAM for other things on my server πŸ˜›

    I remember @julian said that they use redis on this forum, but that they would certainly use mongodb + redis caching if they would do it over.

  • Actually, we use Mongo now. We made the switch awhile back because of the memory consumption reasons πŸ˜„

    We do use redis for sessions, yes.

  • @julian said in Redis memory usage:

    Actually, we use Mongo now. We made the switch awhile back because of the memory consumption reasons πŸ˜„

    We do use redis for sessions, yes.

    How hard is the switch? Every thread says to reach out to you guys, but I like doing things on my own sometimes.

  • We built a custom migrator just for the Redis to Mongo migration. We're keeping that one in house πŸ˜‰

  • @julian how much memory did your forum consume when you decided to switch?

    We think about using Amazon Elasticache as the DB backend so for us there is no argument of "sparing RAM for other things" since the instance is dedicated just for Redis - it's just a question of how big it should be πŸ™‚

    Also - is configuring NodeBB for mongo as a primary storage + redis for sessions documented somewhere?

  • From my understanding, Redis keeps the entire forum database in memory? if the forum gets large, it sounds like that scales very poorly.

    Second the latter part of attis's question. I've set up a trial nodeBB using what I think is "just mongo" and I've seen "just redis" tutorials as well. How do you do this Redis+Mongo mixed setup, and when does that become worth it over just Mongo for a larger board?

Suggested Topics