• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Further improvement?

Lucas

Well-known member
#1
Went ahead and got me a dedicated for future plans. It's a pretty nice machine, specially for only myself.

I was about to install cPanel as that's what I've always worked with including managing linux but decided to get Nginx, MySQL, php-fpm and APC. Been working quiet a bit with optimizing this and playing with settings to see what's best.

Apart from these what other technologies should be consider under a dedicated server at the moment, as well as plugins/modules which are experimental but hope to improve performance.

I don't have any big sites on it at the moment but it's more than anything for practicing and learning purposes.
 

Lucas

Well-known member
#3
Well from everything I have read and heard dump regular mySQL and get Percona.....don't know much about it other than I have heard it's the best.
Interesting, so Percona basically is MySQL but with improved performance on certain areas. I'll definitely give it a try.
 

Ernest L. Defoe

Well-known member
#4
I know that's what the host that hosts my site uses. It seems to be a little better. Doesn't hurt that the SQL server and data is on a SSD so you get better read/write speeds. He also uses memcache (while a pain to setup is really nice for caching).
 

Lucas

Well-known member
#6
Percona is a drop in MySQL replacement, highly focused on InnoDB performance (which is what XenForo loves).
Indeed, plus it sounds like more hours of funtime with configs. Although I've read a bit that it requires less config than MySQL in general as some features are also removed.

Will report back!
 

Dan Cryer

Active member
#7
If you're using nginx and PHP-FPM, it is definitely worth looking into FastCGI caching if you haven't already. You can get some really awesome caching results if you get the cache key right. :)
 

Lucas

Well-known member
#8
You mean this? :)

Code:
    location @fallback {
        fastcgi_index  index.php;
        fastcgi_pass    127.0.0.1:9001;
        include        fastcgi_params;
        fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
        fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    }
 

Dan Cryer

Active member
#9
You mean this? :)

Code:
    location @fallback {
        fastcgi_index  index.php;
        fastcgi_pass    127.0.0.1:9001;
        include        fastcgi_params;
        fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
        fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
    }
That tells me that you are indeed using PHP-FPM, so you can look at doing FastCGI caching. :) To enable, you'd want to do something like this:

Before your server {} declaration
This defines where you want to store a given cache, and how big you want to make it. So this is storing in /tmp/nginxcache, and will create a 256M cache.

Code:
fastcgi_cache_path /tmp/nginxcache  levels=1:2 max_size=256m keys_zone=xenforo:256m inactive=5m;
Before your @fallback declaration
This code sets a key that represents a distinct request, so in this case it is caching based on the hostname, your session cookie, your FB User ID cookie, request type (GET/POST), the URI (/threads/X), and any args (?x=y).

Code:
set $xf_cache_key "$host$cookie_xf_session$cookie_xf_fbUid$request_method$uri$args";
In your @fallback declaration
This will tell nginx to cache FastCGI responses, using the cache defined above, and the cache key you've defined. It'll also add a header to all responses to let you know whether the cache was used (it'll return HIT / MISS usually, sometimes other values.)

Code:
fastcgi_cache  xenforo;
fastcgi_cache_key  $xf_cache_key;
add_header  XF-Cache-Status $upstream_cache_status;
Hope that helps, let me know how you get on if you decide to use it. :)
 

Lucas

Well-known member
#10
Thanks a lot for the suggestions Dan, I'm going to set it up as soon as I can. So if I'm running more than one forum I can always simple set the cache path/file to a different one and name it xenforo2, for example, correct?