Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted June 12, 201410 yr The time to first byte in my server is about 0,4s. I want to reduce it to 0,2s. As I use cpanel, I want to keep apache and do not want to use any nginx plugin. I have read this article about disabling apache modules that are not used by many websites to make apache faster: http://haydenjames.io/strip-apache-improve-performance-memory-efficiency/ I would like to know which modules IPS needs to run, as long as my server runs only IPS. Thanks for any help.
June 13, 201410 yr As I use cpanel, I want to keep apache and do not want to use any nginx plugin. Any particular reason you don't want to use nginx plugin for cpanel?
June 13, 201410 yr Author Run Apache with Nginx in the same server is a good ideia? I have read that Nginx is faster than Apache, but even in TTFB? What about pagespeed module plugin? If I use cpXstack I will have to install the Apache plugin or the Nginx plugin?
June 13, 201410 yr I ran cpxstack for quite some time when I was on cpanel server. ran ip site off nginx and other domains off apache. had the h264 pseudostreaming module on both and I experimented with pagespeed but never spent a lot of time on that.
June 13, 201410 yr Nginx looked too much of a pain to setup. I went with apache, php-fpm, unixys varnish plugin, SSD drives and xcache. Runs like a dream, sub 1 sec times and .2 TTFB.
June 13, 201410 yr Try http://www.nginxcp.com/ All you need to do is literally copy & paste 5 lines of code as root. If you really wanted, you could contract them to 1 line. :tongue: nginxcp will install nginx in front of your apache. So, it'll send php requests only to apache and handle all the static by itself. This way, you can still use .htaccess and all the apache features without having to sacrifice huge apache overhead since your usage of apache is reduced. All the whm functions like easyapache and etc are still functional. (Those will break with cpxstack) This is the easiest by far to install and you'll get to use your server in exact same manner as before. Just better performance. And yes, nginx is better for TTFB. Often by extremes.
June 13, 201410 yr the unixy varnish plugin sucks to be honest, I bet you'll have users either logged out all the time OR find themselves suddenly logged in as someone else at some point. Unixy themselves could not fix it for me and a few others dealing with it. Had this issue both on cpanel and directadmin. if you only run forums (no ip.content as default app) I think it worked ok though. the nginx plugin grumpy mentioned alone is a heck of a lot better than that. the only difficult part (and it only takes 10 minutes) running ipboard fully on nginx (cpXstack) is setting the rewrite rules in the domain conf file. I had better performance overall using nginx with cache (I forget details now) than I did with the plugin in front of apache. however the plugin in front of apache worked better than just apache or apache with unixy plugin.
June 13, 201410 yr Author Nginx looked too much of a pain to setup. I went with apache, php-fpm, unixys varnish plugin, SSD drives and xcache. Runs like a dream, sub 1 sec times and .2 TTFB. That's amazing! I guess I will try this set up. What about the Zend Opcache (http://community.invisionpower.com/topic/399183-zend-opcache-optimizer-my-hero/)? Does it can be stacked with varnish? It takes the place of cache, right? I am on php 5.5. I guess the pagespeed module could also be stacked with all.
June 14, 201410 yr That's amazing! I guess I will try this set up. What about the Zend Opcache (http://community.invisionpower.com/topic/399183-zend-opcache-optimizer-my-hero/)? Does it can be stacked with varnish? It takes the place of cache, right? I am on php 5.5. I guess the pagespeed module could also be stacked with all. zend opcache is php operation code cache. varnish is page cache. Separate layer. If you use nginx, you shouldn't use varnish as they're both webservers with capability to do page caches. (you need to write the page cache rules yourself to work well) Stacking them is counter productive. Choose one. zend opcache, apc, xcache is operation cache and you can't use multiple at the same time. They will break each other. Choose one. apc, xcache doubles as user cache (you can disable one of the features in their config), and there is also memcache for user cache. You can only use one by IPB setting. Choose one.
June 14, 201410 yr That's amazing! I guess I will try this set up. What about the Zend Opcache (http://community.invisionpower.com/topic/399183-zend-opcache-optimizer-my-hero/)? Does it can be stacked with varnish? It takes the place of cache, right? I am on php 5.5. I guess the pagespeed module could also be stacked with all. Re zend, I run xcache. Run pagespeed mod too and also run a cdn. That's all ya need really.
June 14, 201410 yr Author I am having big trouble to change to PHP-FPM and Event MPM on Apache. Cpanel do not have this built in option and I have tried this script with no success: https://support.sysally.net/projects/cphstack Anyone knows a good tutorial to enable PHP-FPM and Event MPM on a cpanel box?
June 14, 201410 yr What were the changes you had to make varnish works ok with IPS? I exclude all index.php urls, admincp and profile page image uploads. That's it.
June 14, 201410 yr I am having big trouble to change to PHP-FPM and Event MPM on Apache. Cpanel do not have this built in option and I have tried this script with no success: https://support.sysally.net/projects/cphstack Anyone knows a good tutorial to enable PHP-FPM and Event MPM on a cpanel box? I have a link to the guide I used, I'll dig it out.
June 15, 201410 yr I exclude all index.php urls, admincp and profile page image uploads. That's it. And with those exclusions do you really think you are taking huge advantage of Varnish :smile: The answer is NO
June 15, 201410 yr I run seo URLs, so index.php is used for things like the admincp, faq, log in etc. Varnish is serving all topics, blog posts, articles - 99% of my hit content! It also includes all images, javascript and CSS. I did run tests and trials, I'm well aware what my site is and isnt serving via varnish. But do tell, i guess you must know my websites and server better than me. So errr. YES. :drool:
June 15, 201410 yr Author Is there any advantage in paying for unixys varnish pluguin for cpanel instead of installing varnish by telnet?
June 16, 201410 yr I'm not really sure why you went with varnish as a choice after most of recommendation for nginx... even with easy setup. ---------------- Unixy Varnish will make the installation easier for you. Manual varnish installation over ssh for cPanel is very time consuming and easy to make mistakes. (not telnet, at least I hope not telnet) ---------------- Overall. I do not believe varnish is a good choice for IPB. IPB offers custom response for to everyone, even guests. If they visit a page, they now must be replied with a visual feedback that the page is now read (like bolded vs not bolded). As every page request, with exception of items like css/js/images, they need a unique and tailored page. That cannot be cached. And that's the biggest bulk of the processing by significant margin. You do NOT want a cached result of one guest showing for another guest. They should be getting a different page. Varnish is very suited for pages that are consistent with regardless of who's visiting, like wordpress for example. It looks the same all the time. There are no markers for read/unread articles. IPB does. When someone makes a post, it needs to show up right away, caches built by anyone other than IPB's directive will lack accuracy since (hopefully) they'll make lot of posts fast. If it throws away a cache too often in order to make it more accurate, it'll then become inefficient. Or if you make the cache rules too lenient, you won't be hitting it often enough that there's a point to it. It'll also make skewed understanding. If you tell 99% of the site to be not-cached and 1% of the site to be cached. Of that 1% which does have caching rule, if it gets 99% hit rate, it'll say 99% hit rate. When in reality, your cache hit rate is 0.99% overall even though your directed cache hit rate is 99%.
June 16, 201410 yr Author I have many URL redirections set in Apache and I read that would be really hard to set them properly on Nginx.
June 16, 201410 yr That's why I suggested the nginx in front of apache solution. No change would be required then.
June 16, 201410 yr I set ttl to 15 secs for dynamic content, it takes most people that long to do a page refresh or move to another page. So far I have had no issues. Anything that needs an instant update, like changing a profile pic can be excluded. At the end of the day it works for me, my server load is zero compared to much higher before. Search traffic one hit page loads or flash social hits are no longer consuming resources.
June 16, 201410 yr With regards database marking, guests see all the same on my setup, as I have it set to DB marking and not cookies. Members see their own set of cached results, personal to them. It's by no means ideal, but then that is not easy to do with a website that updates by the second.
Archived
This topic is now archived and is closed to further replies.