1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Do we need more RAM?

Discussion in 'Server Configuration and Hosting' started by Wobble, Jun 21, 2014.

  1. Wobble

    Wobble Member

    We run a site on 4GB of RAM and we may have up to 200 active members at a time and everyday around the same time we crash. Locked transactions and too many connections errors.

    We have 3,000 members and about 950,000 posts.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    The too many connections errors sounds like a server limitation related to MySQL.

    You may want to look at increasing the value.
     
  3. Wobble

    Wobble Member

    In the past that only created errors elsewhere.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You may need more RAM, but your server may just need tuning and optimising.

    I would look at getting someone in to tune it first.
     
  5. WSWD

    WSWD Well-Known Member

    Are you actually running out of RAM? You need to be monitoring your server when the crash occurs (or going through the logs) and see what's causing it. Just guessing as whether RAM is the issue is not going to help anything.
     
  6. Slavik

    Slavik XenForo Moderator Staff Member

    We have 1.7M posts, and ~400 active users on quite regularly and don't even hit 2gb ram usage.

    Locked transactions and too many connections could be being caused by a variety of things such as poorly coded addons, or your tables not being the correct format, or just poor my.cnf settings.
     
    Luke F and Floren like this.
  7. RoldanLT

    RoldanLT Well-Known Member

    Ow, 400~ simultaneous online and not hitting 2GB of ram?
    All your web server (apache/nginx/litespeed), mysql server, elastic search, php, other other caching software are all in the same single Box?
     
  8. Slavik

    Slavik XenForo Moderator Staff Member

    Yes.
     
  9. RoldanLT

    RoldanLT Well-Known Member

    Nah that's impossible.
    ES alone takes 512MB to 2GB of ram with your post.
    And for 1.7M post you should allocate more than 2GB of ram for Innodb Engine.
    So I don't think what you said is true, sorry.
     
  10. Slavik

    Slavik XenForo Moderator Staff Member

    No your right, I completely miss read. Ignore me, our MySQL and ES are indeed offloaded.
     
    RoldanLT likes this.
  11. ForestForTrees

    ForestForTrees Well-Known Member

    Does the 2 GB statistic still hold true for the web server? If so, do you mind saying which http daemon you use and how PHP is invoked? I'm beginning to wonder if we have enough RAM as well, and it'd help to have a comparison.
     
  12. Slavik

    Slavik XenForo Moderator Staff Member

    Litespeed using LSAPI
     
    ForestForTrees likes this.
  13. RoldanLT

    RoldanLT Well-Known Member

    With Nginx+SPDY/PHP-FPM I got excellent performance minus all that cost for Litespeed :)
     
  14. Slavik

    Slavik XenForo Moderator Staff Member

    You can have as much fun with Nginx as you want, i'll still pick LiteSpeed any day, regardless of cost.:)
     
    RoldanLT likes this.
  15. TheBigK

    TheBigK Well-Known Member

    @Slavik - What configuration would you recommend-

    1. A single box with X GB of RAM
    2. Two Boxes with x/2 RAM each dedicated to DB and Litespeed?
     
  16. Slavik

    Slavik XenForo Moderator Staff Member

    It really is a matter of "it depends".

    For 99% of people, keeping things on 1 server is going to be the easiest and best solution.
     
  17. TheBigK

    TheBigK Well-Known Member

    Hmm, could you share more information about 'it depends' part? What factors are we talking about? My setup is typical xenforo with a few custom addons.
     
  18. Tracy Perry

    Tracy Perry Well-Known Member

    It depends... are both servers hosted in the same data center and on a private network?
    If I was going to do 2 servers, the DB server would be the "hoss" and the other one would be lighter on the memory. For most people that are talking real iron, a single server will suffice for them. Once you reach the point of needing multiple servers you will probably be looking at clustering.
     
    TheBigK and WSWD like this.
  19. WSWD

    WSWD Well-Known Member

    It's actually quite simple. Look at your server's current resource usage during the peak periods and start crunching numbers. Are you running out of resources, etc.? Will a server upgrade suffice, or do you need another to "load balance" your site?

    Chances are, if you have to ask, you probably don't need multiple servers. When you need it, you'll know. :) Your forum will be big enough and busy enough to where you are constantly maxing out the resources on your single server.
     
    TheBigK likes this.
  20. WSWD

    WSWD Well-Known Member

    And just to note...not sure if you have a dedicated or VPS or what you're using with Liquidweb (@TheBigK ) but you have about 1000 people online right now (mostly guests) and your site is blazing fast for me. I'm not exactly sure that 3AM my time (Pacific) is exactly a peak period for your site, but it certainly feels really quick, for having that many people on the site.
     
    TheBigK likes this.

Share This Page