need help with special server config for a big board

FloV

Well-known 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 5.3.2.1. 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

Florian
 
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.
 
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?
 
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.
 
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.
 
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?

This. Start here.
 
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)

Code:
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock

[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0

[mysqld]

user = mysql
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
skip-external-locking
bind-address = 192.168.0.105
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

[mysqldump]
quick
quote-names
max_allowed_packet = 16M

[mysql]

[isamchk]
key_buffer = 128M

!includedir /etc/mysql/conf.d/

Content of conf.d:
[mysqld_safe]
syslog

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.
 
So as it stands, you've got no InnoDB settings in your config file. What is the size of the Database?
 
You could probably start with adding something like the below to be starting with:

innodb_additional_mem_pool_size=16M
innodb_buffer_pool_size=16G
innodb_file_per_table=1
innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=2
innodb_thread_concurrency=0
innodb_flush_method=O_DIRECT

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

 
Percona + percona my.cnf tool = victory :D

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. :)
 
Yea but I have a man-crush on Percona so it fixes everything :D

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

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

innodb_additional_mem_pool_size=16M
innodb_buffer_pool_size=16G
innodb_file_per_table=1
innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=2
innodb_thread_concurrency=0
innodb_flush_method=O_DIRECT

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

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. :)

Cheers,
Shaun :D
 
innodb_file_per_table=1

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

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. ;)
 
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. ;)
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.
 
Top Bottom