Moved My Community To A (Managed) VPS - Need Optimization Advise

Divvens

Well-known member
Only yesterday we moved our community onto a VPS server as it had outgrown shared and premium (semi-shared?) hosting. This is my first time and its a managed server, so I don't need to worry about security and basic setup/configuration. But I would require some insight into how to better the performance and optimize it for my board. I know optimization is a lengthy process after reviewing data over time, thus I am not currently jumping straight into it and will let the forum be as-is until after our first wave of high traffic has passed to see where we need to optimize.

Please do note, that while giving suggestions or providing instructions be as specific as you can. I am new to this and would probably need the extra explanation until I get a hang of it.

To begin, my Forum Statistics:
Discussions: 7,157
Messages: 418,347
Members: 3,075

We have 300~400 users online at any given time (users i.e including members, bots etc). During peak/high traffic time (three days every week, Thursday - Friday - Saturday) we have a minimum of 800~900 users online, with the highest being 1300. We average 9,000~10,000 visits a day with (currently) an average of 15/16gb bandwidth per day.

VPS Specifications:
Intel(R) Xeon(R) CPU E5-2650 v2 1 Core @ 2.60GHz
20 GB SSD Disk Space
600 GB Bandwidth
1 GB Dedicated Ram
1 GB Burstable Ram (VSwap)
LiteSpeed enabled
OS: CentOS 6 x86_64

Currently only using the basic cache system mentioned in the XenForo Manual.

So I'd like to hear your suggestions for what I should watch out for/be ready during high traffic, what to monitor etc. in order to get reports for optimizing the server better :)
 
Currently with 225 users online:
Memory Usage 29% | 296.35 MB of 1 GB Used / 727.65 MB Free
VSwap Usage 28% | 289.66 MB of 1 GB Used / 734.34 MB Free
 
Basically Implement all the caching available for XenForo.
  • Memcached / LibMemcached
  • Use PHP 5.6 with Zend Opcache

Plus use Nginx.
 
Non-cpanel?

First thing to do is check firewall setup with iptables -L

Next, you can try ro run mysqltuner.

If you use stock mysql, percona or mariadb is good replacement.

And what is your php version?

Sorry for not being spesific. Im on mobile.
 
Non-cpanel?

First thing to do is check firewall setup with iptables -L

Next, you can try ro run mysqltuner.

If you use stock mysql, percona or mariadb is good replacement.

And what is your php version?

Sorry for not being spesific. Im on mobile.
It is with c-panel and WHM :) Also uses SolusVM for VPS Management.

Php version is: 5.4.39

I'll check up on what is mysqltuner :D

And:
First thing to do is check firewall setup with iptables -L
How would I do this (or check if its already done?) You can take your time to answer once you are on your system :)
 
It is with c-panel and WHM :) Also uses SolusVM for VPS Management.

Php version is: 5.4.39

I'll check up on what is mysqltuner :D

And:

How would I do this (or check if its already done?) You can take your time to answer once you are on your system :)
Ah a cpanel. Then for a someone who still learn to manage a server is great.

You can grab mysqltuner from here: https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl

Just do this from ssh:
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl
chmod +x mysqltuner.pl
perl mysqltuner.pl

Because it's a managed server, you can give the results to your host provider.

PHP 5.4.39 is good. If you had plenty of RAM, you can try to install php cache like xcache. If you choose to install xcache, setup it's cache. I will tell you after you install it (if you want to use it :D)

For firewall, I would recommend to use config server firewall. Your host probably know about this. If you internet connection using dedicated IP, you can try whitelisting your IP.
 
My host installed Memcache, and I installed [bd] Cache add-on (since for @Slavik's LiteSpeed add-on I required to purchase a different LS license).

The server seems to be doing pretty well, DEDICATED RAM usage is under 400 MB at any given time, Burst Ram is around 300 MB and below. The only problem I am facing is with CPU at times, the loads go high and the site gets a tad bit sluggish (not very slow but at the same time not as fast as usual).

Is there anything specific to be done with XenForo or MYSQL or any other aspect to increase optimization and reduce CPU loads?

I started a ticket with my host, and this is the response:
The host itself has an average of 70% Idle CPU so you are not being limited by the host.

I see that you are averaging 55% idle CPU although you did have a dip down to 9% just a few minutes ago:

09:00:02 AM CPU %user %nice %system %iowait %steal %idle
09:10:01 AM all 55.43 0.00 12.48 0.16 0.00 31.93
09:20:01 AM all 43.61 0.02 10.23 0.21 0.00 45.94
09:30:02 AM all 50.01 0.00 11.69 0.10 0.00 38.19
09:40:01 AM all 52.26 0.00 11.38 0.00 0.00 36.36
09:50:01 AM all 59.26 0.00 12.61 0.01 0.00 28.13
10:00:01 AM all 50.46 0.00 10.35 0.02 0.00 39.18
10:10:01 AM all 51.90 0.00 11.07 0.01 0.00 37.02
10:20:01 AM all 53.49 0.00 11.40 0.01 0.00 35.10
10:30:01 AM all 44.26 0.00 9.26 0.01 0.00 46.48
10:40:01 AM all 54.45 0.00 11.03 0.03 0.00 34.50
10:50:01 AM all 48.28 0.00 9.51 0.01 0.00 42.20
11:00:01 AM all 60.36 0.00 12.56 0.00 0.00 27.08
11:10:01 AM all 75.40 0.00 15.31 0.10 0.00 9.19
Average: all 37.07 0.30 7.57 0.07 0.00 55.00

Having more CPU will allow you to handle more simultaneous traffic and reduce the chances that you dip down to low idle CPU [resulting in things slowing down] but from your track record it looks like a temporary issue. It is up to you if you want to upgrade to the next level for more CPU. Personally I wouldn't unless this was a business site that has to be 100% fast 100% of the time - in which case heavy optimization would be my first step prior to spending any money.

So yea even I'd like to know what I could optimize better before jumping the gun and spending more $$$
 
I seem to have not really configured Memcache earlier, and with the assistance of my host I've set it up properly and started the back-end cache as per the manuals of XenForo.

Will monitor server loads and see if there is improvements :D
 
Top Bottom