MyBB Community Forums

Full Version: Processing times? Any way to optimize it?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just moved my forum from one basic webhosting deal to an actual unmanaged fresh install VPS with ubuntu. 

I've installed mysql, phpmyadmin and all the php orange with it, and the forum is loaded and up and running. However my processing time is taking much longer.

Old host:
Generated in 34 ms (84.57% PHP / 15.43% MySQL) 

SQL Queries: 18 / Server Load: 0.35 / Memory Usage: 3.75 MB

New Host:
Generated in 2.428 seconds (10.91% PHP / 89.09% MySQL) 

SQL Queries: 18 / Server Load: 0 / Memory Usage: 4 MB

Page Generation on New:
Page Generation Statistics
Page Generation Time:
3.659 seconds
No. DB Queries:
PHP Processing Time:
1.533 seconds (41.91%)
DB Processing Time:
2.125 seconds (58.09%)
Extensions Used:
mysqli, xml
Global.php Processing Time:
2.598 seconds
PHP Version:
Server Load:
GZip Encoding Status:
No. Templates Used:
78 (80 Cached / 0 Manually Loaded)
Memory Usage:
4 MB (4194304 bytes)
Memory Limit:

The whole site is taking forever to load and I keep getting random errors saying can't access MySQL.

Download speed for the VPS - GB usage this month: 1.15 GB (0.02 GB in, 1.13 GB out) --- 6000GB of monthly Bandwidth
My host is
Those bandwidth usage numbers seem pretty weird, but to test the MySQL speed, try running this query in phpMyAdmin (or even better in the MySQL console):

SELECT * from mybb_users u
JOIN mybb_posts p on p.uid = u.uid
JOIN mybb_threads t on t.tid = p.tid
JOIn mybb_forums f on f.fid = t.fid;

How long does that take to run? For comparison, this returned 1184 rows in 15.2ms for me on my forum. Sounds like your indexes have gone missing or something, no way should it be as slow as it is.
One suggestion I have is registering your domain on cloudflare, it increased my response times quite a lot and it also helps with a lot of protections
That's not going to do anything about slow PHP/MySQL generation times once it hits the server.