Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
yacenty Posted January 14, 2014 Posted January 14, 2014 Hello, after 3 years we are moving to the new machine. the server is bigger and better so the performance should be better. Today we are using nginx with php-fpm and memcached. What would You recommend today as an solution for whole service? nginx with php-fpm? memcached? percona-xtra db? some addons like google pagespeed module for nginx? some cachers? I'm rather not interested in CDNs becase 90-95% visits are from one country so we have to focus on our localization only. Do you have some working practices with optimisations of server? server would have 32cores and 48g of ram Any hints?
Grumpy Posted January 15, 2014 Posted January 15, 2014 If that's already working for you well, I see no reason to change. Just make sure you have op cache running as well as memcached for php processing. Also, I'm guessing you mean something like 2x opteron 6272 for processor... It's not actually meaningful to state core count without processor name. And disk matters more than any other component as they're the first bottleneck.
yacenty Posted January 15, 2014 Author Posted January 15, 2014 about hardware it's 2 times intel xeon E5-2665 (2.4ghz) 8 cores with HT. disk are sas for files and ssd for db. about software: xcache is runing for opcoding now and memcache mainly for db. of course it's working relativelly ok now with old server but we are looking for some hints for some solutions. Every 5% reduction in load or page generation is apricated.
Grumpy Posted January 16, 2014 Posted January 16, 2014 It sounds like you have the basics of the optimization down already. Some other simpler options I can think of... (which I don't know if you already did...) Set expiry settings on nginx for static files like 12h~1d You can set page cache directives in nginx for guests so frequently hit pages will hit just nginx and not php (this will mess up your stats tho). You can also set nginx cache directory to ssd or ramdisk. Be sure to optimize your sql. Set low timeouts (don't want rogue processes hanging) for all php, sql, http. It's possible to reprogram portions of IPB itself to fit your needs more specifically, but that's a stage a bit too impossible to resolve via talking on forums.
yacenty Posted January 16, 2014 Author Posted January 16, 2014 IPB we have already tweaked in many places, but we are looking for some more tweaks, but this is not a case today. What could be cached by nginx? this is interesting because just now nothing is cached by nginx. Are there any visible results? what to cache and how to not kill the stats like: users online, topic stats, pictures stats, comments. We have about 1k posts daily, over 200 pictures and over 1.5k comments in the gallery.
stoo2000 Posted January 16, 2014 Posted January 16, 2014 IPB we have already tweaked in many places, but we are looking for some more tweaks, but this is not a case today. What could be cached by nginx? this is interesting because just now nothing is cached by nginx. Are there any visible results? what to cache and how to not kill the stats like: users online, topic stats, pictures stats, comments. We have about 1k posts daily, over 200 pictures and over 1.5k comments in the gallery. Centminmod is pretty fast, one of my clients has it installed and it's the quickest I've ever seen a CCS page load. http://centminmod.com/nginx_configure_ipboard.html
Grumpy Posted January 19, 2014 Posted January 19, 2014 IPB we have already tweaked in many places, but we are looking for some more tweaks, but this is not a case today. What could be cached by nginx? this is interesting because just now nothing is cached by nginx. Are there any visible results? what to cache and how to not kill the stats like: users online, topic stats, pictures stats, comments. We have about 1k posts daily, over 200 pictures and over 1.5k comments in the gallery. I do not see strong caching directives as something for everyone. But it's impact is quite extreme if you have a lot of guests. The entire purpose is to prevent the guests ever reaching the backend, so it messes up the stats which happen at the backend. Stuff like JS based tracking won't be affected though (like analytics) or you can set up additional hooks to make sure that the tracking portion will be reached (requires custom programming). You could cache anywhere from every single page a guest can visit to just frequently hit pages like the index page. Caching logged in user stuff isn't recommended though.
yacenty Posted January 19, 2014 Author Posted January 19, 2014 in many cases we have 70/30 guest/users, so would be nice to cache for guests but also we have to have analytics stats for them
yacenty Posted January 20, 2014 Author Posted January 20, 2014 we had set up new server. only one thing that is missing now is sphinx (we will install it today). What is interesting for me, some pages are generated much faster that on old server, some are generating even 3 times slower (0.3s to 1s) All pages taken in the account are revisited - to test pages that are already in cache (xcache and memcached). What is even more interesting pages have different sql queries. for example forum main page: O(old server) - 11queires, N(new server) 11 Galery main page: O:20, N:18 Topic page: O:19, N:27 What could be the reason? Files are copied 1:1, db is different, because we have a dump from Saturday evening - so it's little bit outdated. New server is tested by 500 users, so in average we have 5-10 users clicking new server. Could it be impacted by sphinx selcted in ACP but installed at all on new server?
Grumpy Posted January 20, 2014 Posted January 20, 2014 sphinx will impact some pages. Most drastically in search pages. But also in pages like my content and such. It's also possible that since it's a new setup, your cache hasn't been set yet for a lot of things. So, it'll generate new data from sql causing more query hits. If you're measuring from your browser for these speeds, it's also possible the network isn't as stable as before to cause the delays.
yacenty Posted January 20, 2014 Author Posted January 20, 2014 I'm not taking webbrowsers, I'm only looking for page generation time provided by ipb. New server is in closer localisation so we had reduced ping from 70 to 20ms settings from ipb are 1:1 new server has everything newer nginx 1.4 ->1 php 5.4->5.2 mysql 5.6 -> 5.1 so not everywhere settings can be transfered 1:1 nice thing is - disk performance -> write: 1,2GB/s, read 1,4GB/s how long does it take to fullfill cache fully? 10minutes? 1hour 1day?
Grumpy Posted January 20, 2014 Posted January 20, 2014 how long does it take to fullfill cache fully? 10minutes? 1hour 1day? Basically, anytime you visit the page for the second time, the necessary caches for that specific page should be complete. It's not a time based thing, though I suppose you could profile it based on time...
yacenty Posted January 20, 2014 Author Posted January 20, 2014 i see strange thing every 5 minutes we get circa about 300 inserts to db What the heck? even we have 2-5 users online
Recommended Posts
Archived
This topic is now archived and is closed to further replies.