xenforo server optimization

zastavra

Active member
I run xenforo on a VPS, 2GB ram, 50GB disk. My forum has ~15K users, 200K posts, ~200-300 posts per day and ~20 members online. Can you help me please to get the most of my server for this size of forum?

Thanks.
 
I'm afraid I can't help you. But maybe the others can help you if you tell us the webserver you use, PHP version, your OS, and mysql version. :)
 
Yes, I use Ubuntu 10.4 Apache (cgi-fcgi), PHP 5.3.2, MySQL 5.1.72.
Uhh...upgrade Ubuntu (considering it was released in 2009 - even though it is an LTS version probably, it's still coming up on the 5 year EOL), upgrade PHP to at least the 5.4 series (your version released 12/12) and upgrade mySQL (to Percona or MariaDB) as first steps? ;)
 
Last edited:
Uhh...upgrade Ubuntu (considering it was released in 2009 - even though it is an LTS version probably
Yes, it's an TLS version. The problem is that the hosting provider does not allow OS changes. They say:
you should not upgrade your system manually. If you try to the upgrade will fail and your system will be unavailable. If you want to use a newer Ubuntu you are able the get use of parallel setup. This means a new server will be installed with your desired operating system.
So, if I go through this change I can choose between Ubuntu 12.04 and Centos 6. Which one is better?
 
Yes, it's an TLS version. The problem is that the hosting provider does not allow OS changes. They say:

So, if I go through this change I can choose between Ubuntu 12.04 and Centos 6. Which one is better?
Debian. :D

I know that the VPS I have with RamNode (and the ones I run myself on my dedicated server) do not care about being upgraded. Guess it's a limitation they have on their system.
If you are already familiar with Ubuntu, then I'd go 12.04 LTS - if you just want a change then centOS will work fine also.
 
you should not upgrade your system manually. If you try to the upgrade will fail and your system will be unavailable. If you want to use a newer Ubuntu you are able the get use of parallel setup. This means a new server will be installed with your desired operating system.

Never heard of this to be honest... Is this a dedicated server or VPS? You should be able to change the OS without difficulty any time you like.
 
It's a VPS.

I'm moving tomorrow on a new one, Ubuntu 12.04, 8GB ram.

I'll come back with a details to help me guys optimize it for better performance.
 
Never heard of this to be honest... Is this a dedicated server or VPS? You should be able to change the OS without difficulty any time you like.
They probably are used to centOS in which you might as well do that since you can't easily upgrade it (between major versions). <said as I start my high speed run for cover from all the inbound friendly fire! :ROFLMAO:>

Honestly, that's the first I have heard of it also... Upgrades shouldn't (generally) matter. Every VPS I've ever been on allowed you to perform your own upgrades (especially if using Debian/Ubuntu) between major versions within the guidelines of the OS requirements.
 
With 20 members online at once you shouldn't even have to think of optimizing other than having the proper mysql settings, etc.

Worrying about the OS or Apache is overkill, IMHO....at this level......

My drone forum usually has 20 or so online - more when the WP on the same site is considered. It runs on a 1G VPS and the server load is close to zero.

Have you checked your server load? Is anything crashing? Don't fix things that are not broken...it's asking for trouble
 
Worrying about the OS or Apache is overkill, IMHO....at this level......
This is where I disagree. If you OS is getting where it is no longer supported officially then it is time to think about upgrading to an officially supported version. Same basic thing with PHP. They have newer versions for a reason - security fixes and bug fixes. Keeping up to date is a good security practice. If you are running your own VPS/dedicated server then you should be keeping it's software up to date. Lucid Lynx (Ubuntu 10.04 LTS) support is scheduled to end on 04/15. So, he does have a little time left but if he's thinking about a change then it's foolish not to go to the newest LTS version now. The nice thing about the Debian based (all that I know of) is that they have an easy upgrade path between distributions. I'd be more concerned about the fact that his host is telling him that he has to re-provision the VPS just to perform a distribution upgrade.
 
To each his own. I generally stay way behind the curve in every possible way I can. I've done this since 1995 on the internet and was never sorry about it. On the other hand, upgrades have occasionally made me unhappy.

The OP was asking a question about optimizing. My point is not to make some incredible amount of work for oneself if it's not needed. If his host supports the distro and XF and all his other sw does too, it probably has nothing to do with his speed (again, overkill because of the small community size). In other words, with a server load of <.2 average, which is where he may be sitting, optimizing may not be worthwhile.

Important thing, IMHO, is to check and know the server load at the busiest times and make sure that apache and mysql are both configured correctly.

Of course, I'm the guy running an old Mac OS on my early-2009 Mac Pro because if I upgrade, I'll have to spend many hundred dollars on app upgrades.
 
To each his own. I generally stay way behind the curve in every possible way I can. I've done this since 1995 on the internet and was never sorry about it. On the other hand, upgrades have occasionally made me unhappy.
I guess I've been lucky with Debian. Never had an upgrade cause a problem as long as I was using the shipping software. When I first started and did compile programs for specific reasons I did have problems - but that's why I just started using the shipping versions.

The OP was asking a question about optimizing. My point is not to make some incredible amount of work for oneself if it's not needed. If his host supports the distro and XF and all his other sw does too, it probably has nothing to do with his speed (again, overkill because of the small community size). In other words, with a server load of <.2 average, which is where he may be sitting, optimizing may not be worthwhile.
Upgrading to the latest PHP is ALWAYS a good idea (not just for security but for performance improvements also). Guess that's why HostGator is (or was last time I checked) still in the 5.2.x path - with 5.3.x available with some special configuration - it works so why fix it (but soon will not work as more and more scripts depend on the newer versions of PHP to work).

Optimizing is always worthwhile for performance benefits. The time/cost analysis may make it not worth it. I'm blessed in that I'm retired now and when I can break myself away from either the game consoles or working on a few client computers I have plenty of "tweaking" time. It's just a difference in philosophy. I want my stuff working at peak performance and am willing to put in the time to get it to do it.

Important thing, IMHO, is to check and know the server load at the busiest times and make sure that apache and mysql are both configured correctly.
Agreed - and each individual server is specific. What works great on mine won't work well on his. Performance reasons is why I dumped Apache and moved over to nginx - and am now playing with OpenLiteSpeed on a test install.

Of course, I'm the guy running an old Mac OS on my early-2009 Mac Pro because if I upgrade, I'll have to spend many hundred dollars on app upgrades.
For desktops (especially a Mac) it's not that big of a deal. For a server i beg to disagree (especially on a Linux based distro that the upgrade path is as simple as apt-get update && apt-get dist-upgrade), especially since there is no "cost of app upgrades" involved. centOS is an entirely different beast for distribution (major) upgrades.
 
With 20 members online at once you shouldn't even have to think of optimizing other than having the proper mysql settings, etc.
Worrying about the OS or Apache is overkill, IMHO....at this level......
I respectfully disagree. What happens if his forum posts something that will attract 1 million visitors and that thread goes spiral? My site is not busy at all yet I run a fully optimized server, just to be prepared. I remember when I released OpenSSL 1.0.1e for CentOS 5 and 6... nobody had it. I had over 10,000 views in a week.
 
Well, here we are...

Ubuntu 12.04.3 LTS, 4GB ram, PHP 5.4.23, xcache, mysql 5.5.35

Anything else to do before I move the forum on?
 
1. I would recommend Zend OpCache for opcode caching instead of XCache. In benchmarks I did, under stress, Zend OpCache caused 200 - 250% less load than xCache.

Note: I used CentOS 6.4/PHP 5.3.3-27 for tests, so you may have different results with Ubuntu/PHP 5.4.23. Test it yourself with some benchmark tool.
Note 2: Zend Opcache doesn't have data storage, so if you need it you can use Memcache for it.

2. Move from Apache to Nginx.
 
Last edited:
1. I would recommend Zend OpCache for opcode caching instead of XCache. In benchmarks I did, under stress, Zend OpCache caused 200 - 250% less load than xCache.

Note: I used CentOS 6.4/PHP 5.3.3-27 for tests, so you may have different results with Ubuntu/PHP 5.4.23. Test it yourself with some benchmark tool.
Note 2: Zend Opcache doesn't have data storage, so if you need it you can use Memcache for it.

2. Move from Apache to Nginx.
I never successfully use memcache for data storage. The result was the opposite. It makes the whole site slow. But maybe I was doing something wrong. :D

So my advice, if you are in hurry or not interesting in learning and you need data storage, use xcache. It's plug 'n play. If not, use zend opcache with memcache.
 
OK, server now run: Ubuntu 12.04.3 LTS, nginx/1.1.19, PHP 5.4.23-1, Mysql Percona 5.5.35-33.0, Zend OpCache, Memcache.

It's loaded with a couple of Wordpress sites which indeed, they run A LOT faster now (cc @nemke).

Anything else before I move my forum on?
 
OK, server now run: Ubuntu 12.04.3 LTS, nginx/1.1.19, PHP 5.4.23-1, Mysql Percona 5.5.35-33.0, Zend OpCache, Memcache.

It's loaded with a couple of Wordpress sites which indeed, they run A LOT faster now (cc @nemke).

Anything else before I move my forum on?
Upgrade to nginx 1.5.8
Enable/upgrade nginx_pagespeed mod, Spdy 2, php 5.5.7
 
Back
Top Bottom