Fastest XenForo site I've seen, how are they so fast?

The speed of the forum isn't related to the forum itself, but more on the server setup where it is residing imo.
Agree, I use the same software obviously but I'm wondering what the config could be that is so fast. I just want to learn how to improve my sites to make them as fast as possible.
 
Agree, I use the same software obviously but I'm wondering what the config could be that is so fast. I just want to learn how to improve my sites to make them as fast as possible.
Network speed of 2-5 gbps, nvme disk, good processor, redis and proper caching setup. That is all one need to make site blazing fast with proper server setup.
 
redis and proper caching setup
I think this is what I need to focus on. I use redis, but don't think I'm using the best setup. Just a local redis on my ubuntu server running XF also with MySQL. Powerful dual proc server with SSD's.
 
In principle, the server itself matters, but the secret is in the simplest and cleanest design possible, like the default one on XenForo. Apart from that, it matters whether there are and how many add-ons are installed in the forum system. Plus, it matters whether there is an advertising code in the forum, like the one from Adsense for example. And so on..... small at first glance but important things. :cool:
 
Simplest (but not necessarily the cheapest) thing you can do to improve performance is to ensure you have sufficient RAM available to keep the entire database in memory via InnoDB caching via innodb_buffer_pool_size and innodb_buffer_pool_instances in your MySQL settings.

Obviously if you have a very large database this might not be feasible - but it really does make a huge difference in performance.
 
xenforo is a pretty fast piece of software if configured correctly, on a slightly above average cpu, and not loaded up with tons of plugins.
Our site is pretty quick but there was no real magic to get it going that fast.
 
Simplest (but not necessarily the cheapest) thing you can do to improve performance is to ensure you have sufficient RAM available to keep the entire database in memory via InnoDB caching via innodb_buffer_pool_size and innodb_buffer_pool_instances in your MySQL settings.

Obviously if you have a very large database this might not be feasible - but it really does make a huge difference in performance.
Thank you, adjusted from 32G to 96G (80% of RAM) and set instances from 16 to 8 per a query to chatGPT for verification.
 
Did some redis server tuning per chatGPT as well. Things looking very good so far with speed. Also got an offline suggestion to convert header/footer images to webp which is good and turned on webp support in cloudflare.
 
I run several XF sites and dream of mine being as fast as the DIY Solar forum. What is their magic that makes their site so screaming fast?

Another thing is that PHP likes faster clock speed for cpu, buying more cores (if its cloud/vps) might not gain you significant performance if there is no load on the server.

You can run this php code to see at first glance whats the php and hardware performance, of course you can run full benchmark with dedicated tools if you have access to it, is just a simple code to understand performance, works also on shared hosting providers.

Little benchmark script, you can post your result:
PHP:
<?php
header("Content-Type: text/plain");

// Basic CPU test
function cpu_test($n = 5000000) {
    $x = 0;
    for ($i = 0; $i < $n; $i++) {
        $x += sqrt($i);
    }
    return $x;
}

// Memory allocation & array operations
function memory_test($n = 300000) {
    $arr = [];
    for ($i = 0; $i < $n; $i++) {
        $arr[] = md5($i);
    }
    return count($arr);
}

// JSON/string manipulation
function json_test($n = 10000) {
    $data = [];
    for ($i = 0; $i < $n; $i++) {
        $data[] = ["i" => $i, "hash" => sha1($i)];
    }
    return json_encode($data);
}

$start = microtime(true);

$results = [];
$results['cpu'] = cpu_test();
$results['memory'] = memory_test();
$results['json'] = strlen(json_test());

$end = microtime(true);

echo "=== PHP BENCHMARK ===\n";
echo "CPU test done\n";
echo "Memory test done\n";
echo "JSON test done\n";
echo "----------------------\n";
echo "Total time: " . round(($end - $start), 4) . " sec\n";
echo "----------------------\n";
print_r($results);

I have few instances running on higher clock Ryzens, it scores about Total time: 0.1187 sec to 0.1387 in execution time, some slower intel Xeon i have ~ 0.5387, both with opcache and 8.3.28 php version.
The sites speed feels like night and day in comparing between these instances, both using the same software stack.
 
I am using an older server so this could be a good part of it. It's about 10+ years old, a Dell PowerEdge R620 with 2 x Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz procs.

I took a quick look at Dell for modern era 1U servers. Yeah, no. Not worth it for my needs. I wonder though if a cloud based ubuntu option would be better and be the more affordable way to modernize the server architecture? I currently own my own servers and have a rack in Ashburn, VA. It's been great but I really need to look at moving towards a cloud offering someday. I took a quick look at Azure a few weeks back and it's going to cost far more to move from owned to cloud it appears.
 
Oh man. Those have pretty low IPC. That's malaise era Intel.

I would strongly recommend against Azure
AWS is ok if you spend the time learning it and using reserved instances. But it's still kinda spendy because of what you get charged for bandwidth and disk.

Hetzner dedicated is freaking fantastic and really cheap for the grunt you get. But it's only available in the EU.
In the USA you can get cloud with dedicated CPUs and it should be 'fast enough' but not great.

You may want something like a page caching engine to speed up your existing setup.
 
wonder though if a cloud based ubuntu option would be better and be the more affordable way to modernize the server architecture?
Perhaps spin up an XF demo to get a feel for how fast XF Cloud is, given how snappy my forum is. It uses Vultr, so perhaps if you ask the devs what spec virtual server they use for it, they might tell you and you can create a similar one. Cost is a factor of course and I have no idea what the specs of their servers are. I'd be interested to know.
 
Back
Top Bottom