XenForo RAM Requirements

mistypants

Well-known member
Hi all, had a bit of a question about server plans. Things like bandwidth and disk space are pretty simple to look at, but I'm curious about a few things:
  • How do you decide how much RAM a site requires? Is it dependent on the site's traffic, the size of the database, users online, etc.?
  • How much RAM does your server have?
  • Are there different levels of RAM for servers, like with PCs? (DDR, DDR2, DDR3)
Been looking at hosting plans and I don't want to get too little RAM but I also don't want to pay for more than I need (even reasonably considering spikes). Most low-end VPS plans have plenty of disk space (I only need like 20GB max) and bandwidth for me, but I've never been sure how much RAM is "enough."

For reference, the site has ~3.9mil posts, ~55k members, with about ~200 members active per day.
 
Hi all, had a bit of a question about server plans. Things like bandwidth and disk space are pretty simple to look at, but I'm curious about a few things:
  • How do you decide how much RAM a site requires? Is it dependent on the site's traffic, the size of the database, users online, etc.?
  • How much RAM does your server have?
  • Are there different levels of RAM for servers, like with PCs? (DDR, DDR2, DDR3)
Been looking at hosting plans and I don't want to get too little RAM but I also don't want to overpay if I don't have to. Most low-end VPS plans have plenty of disk space (I only need like 20GB max) and bandwidth for me, but I've never been sure how much RAM is "enough."

For reference, the site has ~3.9mil posts, ~55k members, with about ~200 members active per day.
How many concurrent users?

A PHP session will use between 32-128 Mb of memory, depending on the page and what it is doing. If you say, had 100 concurrent users, they would probably not be browsing the site "fast", but rather requesting a page every 30 seconds or so. So in reality, you might end up with only ~10 PHP processes open

which goes as big as 320Mb of RAM (or as bad as a gigabyte). All in all, your web server and application server might not need that much juice. You said 200 members active per day, but what really counts is how many peak online users browsing at the same time.

If you are going to be hosting the mysql in the same box (most people do), things get interesting, When you say 3.9 mil posts, do you mean million? That will mess up the temporary tables on mysql by a big deal, I would probably go for something with 4-8Gb of RAM just for MySQL alone.
 
How many concurrent users?

A PHP session will use between 32-128 Mb of memory, depending on the page and what it is doing. If you say, had 100 concurrent users, they would probably not be browsing the site "fast", but rather requesting a page every 30 seconds or so. So in reality, you might end up with only ~10 PHP processes open

which goes as big as 320Mb of RAM (or as bad as a gigabyte). All in all, your web server and application server might not need that much juice. You said 200 members active per day, but what really counts is how many peak online users browsing at the same time.

If you are going to be hosting the mysql in the same box (most people do), things get interesting, When you say 3.9 mil posts, do you mean million? That will mess up the temporary tables on mysql by a big deal, I would probably go for something with 4-8Gb of RAM just for MySQL alone.
I would say peak, including bots & spiders, would be around 125 - 150 users online at once. And yes, 3.9 million posts. Thanks for the replies so far. :)
 
A good host will tweak your server with 2-4gb and you'll be challenged to even use all the ram.

You just need a really good server admin.
 
For 4 million posts you definitely need the Search add-on.. so you need lots of memory... period. :)
You can get a box with 32GB of RAM for $50 at OVH...
 
A good host will tweak your server with 2-4gb and you'll be challenged to even use all the ram.

You just need a really good server admin.
I was running my site (cemzoo.com, 4M posts) with 4Gb of RAM, and getting tons of locked transactions. I had to tune it a little, but ended up increasing the query caching and other variables in the process. It ran fine, it wasn't slow, but I couldn't really get away from all the issues until I decided to just upgrade the thing to 8Gb.
 
Hi all, had a bit of a question about server plans. Things like bandwidth and disk space are pretty simple to look at, but I'm curious about a few things:
  • How do you decide how much RAM a site requires? Is it dependent on the site's traffic, the size of the database, users online, etc.?
  • How much RAM does your server have?
  • Are there different levels of RAM for servers, like with PCs? (DDR, DDR2, DDR3)
Been looking at hosting plans and I don't want to get too little RAM but I also don't want to pay for more than I need (even reasonably considering spikes). Most low-end VPS plans have plenty of disk space (I only need like 20GB max) and bandwidth for me, but I've never been sure how much RAM is "enough."

For reference, the site has ~3.9mil posts, ~55k members, with about ~200 members active per day.

For a forum as large as yours, you should not even be looking at a low-end VPS. It's large enough for a dedicated server, or at the very least, a very high-end VPS. As a general rule of thumb, get as much RAM as your budget can afford. You can never have too much RAM.

@Floren Unfortunately with the $50 box, you're going to get $50 worth of i/o as well. I can't say I would ever recommend a 4 million post forum running on software RAID1.
 
I have a slightly smaller forum with 3.2 million posts and 44k members and around 100 a 150 visitors online at a time, and I run it on a vps with 4GB mem and 2 cores and fast storage (and that really helps, fast storage). You say you need only 20GB, how do you do your backups then? Your mysqldb would already be at least 4GB or so? Don't you make backups?
 
I have a slightly smaller forum with 3.2 million posts and 44k members and around 100 a 150 visitors online at a time, and I run it on a vps with 4GB mem and 2 cores and fast storage (and that really helps, fast storage). You say you need only 20GB, how do you do your backups then? Your mysqldb would already be at least 4GB or so? Don't you make backups?
We never leave our backups on the server, there is enough free space on the server for us to take them and then mirror them to an external location (or locations). 20GB is the lowest I saw for a VPS (and a dedicated plan offers far more than that), I just mentioned that as a kind of "this is all I need." Obviously our RAM and CPU requirements would push us well above a low-end VPS. :)

But thank you everyone for the posts thus far, it has been quite helpful. I've been looking around at plans/doing research to see what would be best for us. A managed server is best for us, I do try to learn as I go along but I'm definitely not at a level where I could be doing everything myself. :) The biggest difficulty is deciding whether a higher end VPS plan or a dedicated plan would be best for us. Obviously the latter is more expensive which is a consideration.
 
Ok good to hear about the backups :)

Well I made the switch this year from my own dedicated server with a RAID 10 SAS setup (15K drives) to a VPS and haven't regretted it. At first I was afraid if the VPS IO would be fast enough but it performs very well. It also gives me more flexibility than a dedicated server because adding more cpu/disk/memory is really easy. In your case I would look for a host with a SSD cached or SSD only storage solution, you would really experience the difference. Don't go with a dedicated server with sata disks. You wil regret this.

And as a last tip: See my sig for the deal that ramnode has for their VPS plans, currently they offer 25% off with the code RN25OFF and my DNS server runs great & stable there.
 
It's the posts in this case, not the users, which could end up using RAM. Sure, mysql can go to disk more, but that's going to slow it up a bit.

You have a low number of daily users considering the posts and member total. Does that include guests? or is it members-only?

RAM is fairly cheap. Given your needs, I'd go with at least 8G and probably more if I wanted most everything to run from caches.

I can't imagine putting such a site on a VPS - sounds to me like a dedicated server situation. But you wouldn't need a crazy fast CPU. A quad-core older Xeon should be fine.
 
@Floren Unfortunately with the $50 box, you're going to get $50 worth of i/o as well. I can't say I would ever recommend a 4 million post forum running on software RAID1.
I was looking at his online users, 200. He has a lot of posts but little activity. :)
 
Problem I have with them is they are all 2x on the drives. I've gotten where I personally want hardware raid on mine and a minimum of 4 drives (prefer 6x240GB SSD).
If was was going to go back to just software RAID I'd have stuck with ServerComplete's systems. Yes, they are older hardware - but I'm not having to pay for the electricity directly outta my pocket for them (ultimately yes, but a $69 Dual Xeon L5639 with 24GB memory and 10TB bandwidth is cheap).
 
I have a slightly smaller forum with 3.2 million posts and 44k members and around 100 a 150 visitors online at a time, and I run it on a vps with 4GB mem and 2 cores and fast storage (and that really helps, fast storage). You say you need only 20GB, how do you do your backups then? Your mysqldb would already be at least 4GB or so? Don't you make backups?
If you're using only 4GB of RAM, then you don't use SQL cache, possibly don't have PHP cache, and maybe don׳t even use ES. All of these can drastically increase your users experience (but at the same time make you pay more for RAM).
 
Problem I have with them is they are all 2x on the drives. I've gotten where I personally want hardware raid on mine and a minimum of 4 drives (prefer 6x240GB SSD).
If was was going to go back to just software RAID I'd have stuck with ServerComplete's systems. Yes, they are older hardware - but I'm not having to pay for the electricity directly outta my pocket for them (ultimately yes, but a $69 Dual Xeon L5639 with 24GB memory and 10TB bandwidth is cheap).

This is exactly what I said when OVH was suggested earlier (soyoustart is OVH). Software RAID1 is going to be slow...very likely slower than a VPS, even though it's a dedicated server. You certainly aren't going to get 32GB of RAM or 2TB of drive space on a VPS, but what good do either do when your i/o is crappy?

You can't customize the drive config at all, plus you have that pesky $69 setup fee, even though NOBODY has setup fees on servers anymore.
 
If you're using only 4GB of RAM, then you don't use SQL cache, possibly don't have PHP cache, and maybe don׳t even use ES. All of these can drastically increase your users experience (but at the same time make you pay more for RAM).

I have PHP 5.5.10 with OPcache enabled (256mb) and Mysql is running fine with 50 queries a second, and it seems that SQL cache is beeing used. I don't use ES. But I have looked at the stats and I found out it I should increase the key_buffer_size and inno_buffer_size. Thanks for the heads up :)
 

Attachments

  • Screenshot 2014-04-25 15.27.54.webp
    Screenshot 2014-04-25 15.27.54.webp
    14.1 KB · Views: 29
Last edited:
I have PHP 5.5.10 with OPcache enabled (256mb) and Mysql is running fine with 50 queries a second, and it seems that SQL cache is beeing used. I don't use ES. But I have looked at the stats and I found out it I should increase the key_buffer_size and inno_buffer_size. Thanks for the heads up :)
You're using swap as well, not much but still. I would run mysqltuner to see what's up with the innob_buffer and possible enable query cache as well. I would guess you would need to double your RAM if you do it correctly. You should give around X2 RAM from your database size. I would also suggest replacing PHP 5.5 opcache with xCache. xCache has also variable cache in addition to opcache.
Moreover, for a board like yours, I would also say ES is a must.
 
Back
Top Bottom