RAM occupied by the server


(BaljeetSingh Chhabra) #1

Hey there,

I am new with Discourse. I want to know that how many user load can a server with config mentioned below can take.

2GB RAM
2 Core Processor
40GB SSD

Thanks and Regards
Baljeetsingh Chhabra.


(Joshua Rosenfeld) #2

What config mentioned below?


(Jay Pfaffman) #3

It depends mostly on simultaneous users. The only real rule of thumb I have seen in the past two years is that the database must fit in ram.


(Jeff Atwood) #4

I would not say “must” but if it does not, you need to understand your usage patterns deeply. It is dramatically safer if the DB fits in RAM.


(BaljeetSingh Chhabra) #5

@jomaxro sorry i edited the post :slight_smile: do chk it now :smiley:


(BaljeetSingh Chhabra) #6

At the current stage on this config even in the idle mode 80%-90% of RAM is occupied.

@pfaffman Brother any idea how many simultaneous user a 2GB RAM server can handle ?


(Joshua Rosenfeld) #7

Jay hit the issue right on the nose in his post:

I don’t think I’ve ever seen a hard and fast rule that x users = x specs. In general, you should be fine starting a Discourse site with the above specs (note that CPUs vary wildly, “2 core” isn’t particularly specific, and Discourse performance relies heavily on single core performance). What you should do, as you would with any system, is monitor it’s performance in real world usage. If you notice the site becoming slow, look at your site performance logs:
Did you run out of RAM and start swapping? Was the CPU maxed out? How about your network connection? etc.

Edit: just saw your post. Using “most” of your RAM is not necessarily a bad thing. Any unused RAM is “wasted”. Have you already installed Discourse? What’s using the RAM?


(BaljeetSingh Chhabra) #8

@jomaxro i am using Digital oceans service

i am doing that along.

i can understand that but before going live with this platform i just want to get all my doubt cleared. Discourse is absolutely nice and modern platform. It have everything of which i can think to be in forum

Yes, it is up and running fine the forum is currently in private mode.

at current time the RAM occupied is 85% at idle condition with zero active users which used to be 90% before latest update!

my site is in test mode and i am looking a way for stress test of it.


(Matt Palmer) #9

Occupied by what, though? DB processes are very different to disk cache.


(James Mc Mahon) #10

That’s not unusual for Linux as it is designed to make use of RAM by way of system cache.

Worry about stress testing after (if!) it breaks. Honestly, fixing that problem is easy. The hard part is building your community to a point that the traffic is a concern, unless your community is a real outlier, it’s not going to be an issue.


(Jay Pfaffman) #11

No. Like I say, the closest thing to an answer to that question I have ever seen or heard is to make the database fit in ram. @codinghorror says that’s not a rule, but merely dramatically safer.

But really, unless you have a huge database, you can start with 1gb, it is you don’t care about an extra $120 a year, go with 2 GB. If you don’t mind $1200 a year, you can just get discourse.org to host it .:smiley:


(Jeff Atwood) #12

This brings up a good point. What’s the default size of the Discourse database for a brand new site? What’s the size of the Discourse database for a modest site with say 1000 topics? 10000 topics? etc.


(Matt Palmer) #13

I think we’ve probably got enough data points in our hosted sites to be able to figure that out, to a fair degree.


(Jay Pfaffman) #14

I was going to suggest that. :wink:


(Matt Palmer) #15

The tricky thing is that it’s not just as simple as dividing the size of the users table by the number of users and saying “this is how much space is taken up by a user”. There’s a bunch of tables that store user-related data, even before you start looking at relationships between users and posts, and users and topics.


(BaljeetSingh Chhabra) #16

Thank you everyone got to learn a lot of new things :smiley:
now i can have a piece of mind about RAM of my server and whenever later i feel like the current configuration is not enough for my forum i will upgrade it do and please suggest me some dedicated server provider who are reliable.


(James Mc Mahon) #17

Look in the #hosting category.


(ljpp) #18

Could this number be shown on the admin dashboard?


(Jeff Atwood) #19

Uploads and backup size are already shown at the bottom of the admin dashboard, and a manual backup (run it without uploads, which is a popup dialog option when you click the backup button) defines the DB size exactly.


(ljpp) #20

I have been discussing this topic a lot, and here is some very recent real-life data.

But it would be much easier to give a rough estimate, if we knew some numbers about your community. Even a 1GB RAM VPS plan can serve pretty decent number of guests that are only reading something. But if you have a large bunch of people logged in and involved in a hectic chat, your system requirements go through the roof.