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

Further improvement?

Discussion in 'Server Configuration and Hosting' started by Lucas, Mar 25, 2013.

  1. Lucas

    Lucas Well-Known Member

    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.
  2. Ernest L. Defoe

    Ernest L. Defoe Well-Known Member

    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.
  3. Lucas

    Lucas Well-Known Member

    Interesting, so Percona basically is MySQL but with improved performance on certain areas. I'll definitely give it a try.
  4. Ernest L. Defoe

    Ernest L. Defoe Well-Known Member

    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).
  5. Slavik

    Slavik XenForo Moderator Staff Member

    Percona is a drop in MySQL replacement, highly focused on InnoDB performance (which is what XenForo loves).
    CyclingTribe likes this.
  6. Lucas

    Lucas Well-Known Member

    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!
  7. Dan Cryer

    Dan Cryer Active Member

    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. :)
  8. Lucas

    Lucas Well-Known Member

    You mean this? :)

        location @fallback {
            fastcgi_index  index.php;
            include        fastcgi_params;
            fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
            fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
  9. Dan Cryer

    Dan Cryer Active Member

    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.

    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).

    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.)

    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. :)
    D.O.A. likes this.
  10. Lucas

    Lucas Well-Known Member

    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?
  11. Dan Cryer

    Dan Cryer Active Member

    You don't need to set up another cache, the key contains the host name, so several forums can share. :)

Share This Page