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

Is xenforo a memory hog?

Discussion in 'Server Configuration and Hosting' started by mrb1972, Apr 6, 2012.

  1. mrb1972

    mrb1972 Active Member


    I have recently switched from vb4+vbseo too xenforo, I am running a Vps with 1.5gb ram, I had some server problems a couple of days ago, it was mid afternoon , activity was low about (10 members, 100 guests) server load was low so I contacted my host.

    They basically said memory was low and I should buy some more

    Can anyone a bit more knowledgable then me give me some advice, is 1.5gb enough?
  2. Edrondol

    Edrondol Well-Known Member

    When they said memory was low did they say what memory? For example, I had issues with a /temp directory that was cycling and it caused the site to bog down. I ended up going into my WHM and doing a graceful restart of the server.

    With that much ram you should be having NO issues with XF unless you have a metric ton of addons.
  3. craigiri

    craigiri Well-Known Member

    You didn't mention your db size. It is my understanding that innodb tables often (based on mysql cnf) load into ram to a large degree. You can change the setting to make less of them do so.

    Size of db may have more to do with RAM use than the number of people.

    1.5 is a reasonable amount - but you may have to adjust your mysql and apache settings to match. No harm upping the RAM to 2 gig if it is cheap!
  4. mrb1972

    mrb1972 Active Member

    These are the readings im being given and also what I see when I log into plesk
    Total - 1.50 GB
    Used - 1.48 GB
    Free - 20.67 MB
    Shared 0
    Buffer - 44.21 MB
    Cached - 638.28MB
    Usage - 57.1%

    Database size is about 1.5Gb
  5. craigiri

    craigiri Well-Known Member

    Ok, I make no claim to be an expert...but, your db is bigger than your RAM - not a big deal, but you have to set your mysql conf file so it doesn't hog all the memory.

    I think the most relevant setting is the innodb buffer size:

    If your VPS is supported, ask your admin (hosts) to set the mysql conf so the total of the mysql stuff (that is, the innodb buffer and other such buffers) run about 1 Gig total. That will leave .5 gig for apache and all the other processes. Also, they should set the apache httpd.conf to not create more children and servers than would easily fit into that .5 gig.

    That's a slightly educated guess, but it may be a starting point. You can then adjust the settings once you get an idea of how much free RAM there is. In my experience, there needs to be some RAM room, maybe at least 10% or more when the server is really at it's busiest (loaded up all processes and buffers). Maybe more.
    mrb1972 likes this.
  6. Ghan_04

    Ghan_04 Active Member

    Yes, MySQL config is a good place to start here. I'd say give the InnoDB buffer around 768 MB of RAM to work with, which should be enough to take care of your indices and few tables. Also check your webserver config to see if there is some tuning you can do there. ~100 - 150 users online should not cause the webserver much grief at all even with fairly restricted settings.
    mrb1972 likes this.
  7. Adam Howard

    Adam Howard Well-Known Member

    Plesk is a hudge memory huge (more than cPanel or any other control panel)
  8. p4guru

    p4guru Well-Known Member

    yup plesk can be pesky hehe

    If you're on centos/rhel based server, might want to run mysqlmymonlite.sh to grab some server usage stats - takes less than <12 seconds to gather stats. Not idea if it works on plesk though. Combine with http://www.linuxatemyram.com/ info on how linux uses memory, you can look at the stats and see if you need more memory and where it's being used.

    from stats you provided, maybe on low side but depends on how mysql memory usage is distributed amongst myisam/innodb index/data.
  9. mrb1972

    mrb1972 Active Member

    Ok I have contacted my host - all they have done is given the root login to access via SSH - not really helpful -

    This is what I get running free-m

    So can I view the mysql config file from SSH to see what the buffer size is?
  10. Andy.N

    Andy.N Well-Known Member

    You are using swap which will slow down your site. Need to bump up your server resource for more ram.
  11. mrb1972

    mrb1972 Active Member

    You mean buy more ram? What about the other guys suggestions?
  12. MattW

    MattW Well-Known Member

    Not really, his image shows there is actually 719MB of RAM free, and using 816MB, so only just over 50% of the available RAM.

    Example on mine:
    z22se@z22se.co.uk [~]# free -m
                total      used      free    shared    buffers    cached
    Mem:          3072      3046        25          0        143      1311
    -/+ buffers/cache:      1591      1480
    Swap:        2047          0      2047
    Yes, have a look at /etc/my.cnf to see the mysql settings.

    Also install HTOP to keep track of the CPU/Memory etc while logged into the server.
    Darkimmortal likes this.
  13. mrb1972

    mrb1972 Active Member

    ok my checked my config file , only one innodb setting isnt prefixed with # and that is

  14. MattW

    MattW Well-Known Member

    I've got this in mine

  15. mrb1972

    mrb1972 Active Member

    I have this in mine

    I wont pretend to understand what these should be, this is all new to be -
  16. MattW

    MattW Well-Known Member

    All the other settings are being ignored, as the # makes them a comment, and not an active setting.

    Try setting the innodb_buffer_pool_size to 768M as previously stated, and see if that makes a difference.
  17. MattW

    MattW Well-Known Member

  18. mrb1972

    mrb1972 Active Member

    Here is my mysqltuner report

  19. MattW

    MattW Well-Known Member

    Hmm, there is something setting the maximum ram available to a ridiculously high amount.

    It's not looking bad, apart from the innodb_buffer_pool_size, which you could do with increasing.

    What else is in your my.cnf file (for MyISAM etc)?
  20. mrb1972

    mrb1972 Active Member

    Sorry I uploaded the wrong screen shot - this is the correct one

Share This Page