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

need help with special server config for a big board

Discussion in 'Server Configuration and Hosting' started by Crazy-Achmet, Feb 5, 2013.

  1. Crazy-Achmet

    Crazy-Achmet Active Member

    Hey there,

    we migrated to XF a couple of month ago and notice more and more performance issues over the last time.

    We have 6 Mio. posts and 60k users. In the afternoon, around 1.500 people are online, that's when we have the most trouble. It takes minutes to load the site, sometimes the browser just shows a blank page.

    This is our configuration right now:

    Web Server:

    Intel Xeon X3460, 4x 2,80GHz
    12 GB DDR3 RAM, max. 32 RAM
    4x 500 GB SATA 7.200 rpm (RAID10)

    DB Server

    2x Intel Xeon E5620, 4x 2,40GHz
    24 GB DDR3 RAM, max. 144GB
    4x 147 GB SAS 15.000 rpm (RAID10)

    The dynamic files are handled by an Apache 2.0 with php Behind the Apache there is an NGINX proxy for all static files like JS, CSS, Images ...

    In the phpinfo i can see that xcache (1.3.0) and memcache (3.0.4) is installed and loaded but since i'm not a pro in server configuration i'm not sure how they are setted up.

    Maybe some of you can help me or give me some hints how to optimize my configuration. I think it has something to do how the Apache and NGINX are talking to each other.

    Let me know if you have any other questions. ;)

    Thanks a lot so far

  2. Dinh Thanh

    Dinh Thanh Well-Known Member

    surfsup, nvtienvn and Crazy-Achmet like this.
  3. Slavik

    Slavik XenForo Moderator Staff Member

    You have Nginx behind Apache? Don't you mean the other way around, you use Nginx as a reverse proxy to serve static and then it passes all other requests onto apache.

    I would dump xcache and use APC for opcode caching, memcache is arguable gains, id remove it personally, but if not use it for the back end caching.

    Thats a beast of a DB server, imho get it running Percona to speed things up there. I've been rolling it out on my own sites, and others have seen great speed improvements also: http://xenforo.com/community/thread...sting-but-sites-fast.42839/page-2#post-461201

    As Dinh said, look to either change entirely to Nginx, or, Litespeed. Having said that Apache is more than capable of handling large numbers of users, IIRC Digitalpoint.com was running Apache until recently.
    Crazy-Achmet likes this.
  4. CyclingTribe

    CyclingTribe Well-Known Member

    That should be a really fast rig - even with 1500 active users. Have you taken any steps to optimise MySQL on your DB server?

    What engine are you using for the majority of your tables; MyISAM or InnoDB?

    What does your my.cnf file look like?
    shawn likes this.
  5. MattW

    MattW Well-Known Member

    You are also quite a few versions behind on both Xcache and Memcache, so it's probably worth while upgrading those to the latest.

    As Slavik said, look at switching to Percona for your Database software. It would also be good to see a copy of your my.cnf file to make sure it's got all the settings for InnoDB in there.
  6. HWS

    HWS Well-Known Member

    This has to be a database config issue, since even the slowest Apache can handle such load at that server easily.
    Do you monitor your servers?

    The database configuration would be interesting. But even stock MySQL should handle that load easily.
  7. shawn

    shawn Well-Known Member

    This. Start here.
  8. Crazy-Achmet

    Crazy-Achmet Active Member

    Thanks a lot for all your help so far! :)

    I haven't touched the DB or the tables so far, so most of them are InnoDB.

    The NGINX is configured as a CDN. So all the static files are automatically loaded through cdn.mydomain.de

    This is the my.cnf from our DB Server (without comments)

    port = 3306
    socket = /var/run/mysqld/mysqld.sock
    socket = /var/run/mysqld/mysqld.sock
    nice = 0
    user = mysql
    socket = /var/run/mysqld/mysqld.sock
    port = 3306
    basedir = /usr
    datadir = /var/lib/mysql
    tmpdir = /tmp
    bind-address =
    key_buffer = 128M
    max_allowed_packet = 32M
    thread_stack = 384K
    thread_cache_size = 16
    myisam-recover = BACKUP
    max_connections = 2500
    query_cache_limit = 512M
    query_cache_size = 4096M
    log_error = /var/log/mysql/error.log
    expire_logs_days = 10
    max_binlog_size = 100M
    max_allowed_packet = 16M
    key_buffer = 128M
    !includedir /etc/mysql/conf.d/
    Content of conf.d:
    As said before, i have no clue about server configuration at all. The servers are full-managed by our ISP. I will ask them to switch to Percona, as you recommended.

    Again, thank you so much for taking your time to help me out.
  9. MattW

    MattW Well-Known Member

    So as it stands, you've got no InnoDB settings in your config file. What is the size of the Database?
  10. Crazy-Achmet

    Crazy-Achmet Active Member

    11,5 GiB (thats what phpMyAdmin says)
  11. HWS

    HWS Well-Known Member

  12. MattW

    MattW Well-Known Member

    You could probably start with adding something like the below to be starting with:


    I'd then look at downloading mysqltuner and running that against the DB to see what else is recommends tweaking.

    nrep, CyclingTribe and Crazy-Achmet like this.
  13. Slavik

    Slavik XenForo Moderator Staff Member

    Percona + percona my.cnf tool = victory :D
  14. HWS

    HWS Well-Known Member

    You can only use that if you have at least some knowledge about MySQL variables.
    But I can only recommend it.

    Given the DB and forum size and the posted MySQL config it is no wonder that it doesn't work. :)
  15. Slavik

    Slavik XenForo Moderator Staff Member

    Yea but I have a man-crush on Percona so it fixes everything :D
    Ron, MattW, hellreturn and 1 other person like this.
  16. CyclingTribe

    CyclingTribe Well-Known Member

    I must admit to a similar crush on Percona having used it on my new server - fantastic stuff. :love:

    Good suggestion Matt. (y) Then restart MySQL and look at changing the engine on most XF tables to InnoDB?

    @Crazy-Achmet - do you have phpmyadmin installed on your DB server? If not, I'd recommend installing it as it'll help you making changes to tables etc.

    I'm sure between us all we can get your site back up to speed. :)

    Shaun :D
  17. hellreturn

    hellreturn Active Member


    Doesn't it causes more I/O? Just curious.
  18. HWS

    HWS Well-Known Member

    Maybe. But you won't notice and that feature is the most important setting at all if you care about data consistency and quicker backups.
  19. CyclingTribe

    CyclingTribe Well-Known Member

    Just be aware that it isn't retro-active - it won't make files for tables that already exist in your tablespace - it'll only apply to newly created tables.

    You can, of course, do a mysqldump of your current databases/tables and reimport them after turning this setting on, but it's not something you'd want to do casually with large databases. ;)
  20. Deebs

    Deebs Well-Known Member

    No need for a dump. Set the variable (on a global basis) then do a no-op alter table:

    alter table tbl_name engine=innodb;

    Will move it out of the system tablespace.
    CyclingTribe and MattW like this.

Share This Page