XF 1.2 Cache Rebuilding Process Takes Ages

yavuz

Well-known member
This is happening for quite some. It didn't bother me until I started to receive 500 internal server errors during an add-on installation.

I have 60 add-ons, a compilation of simple and detailed ones (don't know how else to describe them) installed on my board. In the past I have installed and uninstalled a variety of styles and add-ons but currently there are also two styles installed which have two child styles.

Why is the rebuild process taking such a long time, especially when it comes to rebuilding templates?

Is there a way to detect, unused but in the database remaining templates or any other part of junk data that we can maybe flush out?

Thank You.
 
It's also worth mentioning that I'm on a dedicated server with high specs:

Harddisk: 2x 2000 GB SATA 3,5" 7.200 rpm
CPU: AMD Opteron 3280 Octacore
Barebone: Fujitsu PRIMERGY MX130 S2
RAM: 24x Gigabyte RAM

Memcached, APC and other optimization in place.
 
The easiest option is to reduce the number of styles and languages you have.

However, beyond that, optimization of MySQL writes is probably the most significant recommendation. These processes update a lot of data. (This can apply at the general filesystem level as well.)
 
You mention "one child each", does that mean you actually have 4 languages and 4 styles? You need to count all styles/languages that are installed, enabled or not.

The cost to rebuild this is roughly number of styles * number of languages. In general, languages will "cost" more because we can't share compiled templates like we can with styles.

You can see more on InnoDB optimization here: http://www.mysqlperformanceblog.com/2013/09/20/innodb-performance-optimization-basics-updated/
 
You mention "one child each", does that mean you actually have 4 languages and 4 styles? You need to count all styles/languages that are installed, enabled or not.

The cost to rebuild this is roughly number of styles * number of languages. In general, languages will "cost" more because we can't share compiled templates like we can with styles.

You can see more on InnoDB optimization here: http://www.mysqlperformanceblog.com/2013/09/20/innodb-performance-optimization-basics-updated/

7676911412.png


1430430306.png
 
That would be considered 4 styles, though I appreciate that you can't really do much to reduce that if you're using both child styles actively.

Essentially, there's 8 times the work of 1 style and 1 language. This is done at "compile time" to speed up the run time process (significantly).
 
I have 7 styles:
upload_2014-1-15_2-14-52.webp

Adding or Removing addon which rebuild templates, phrases takes 50 to 60 seconds, is this normal @Mike ?
Or there are server settings that can be tune and speed up?
 
Possibly in the normal range. Optimizing InnoDB is always worth it though. There are potentially some things that can be done at the filesystem level (disabling barriers, for example), but I wouldn't recommend that unless you understand what it does and what can happen.
 
  • Like
Reactions: rdn
@Mike @Jeremy I've been doing some enhancements & performance tweaking and digging into the sites.

Currently I’m trying to find the best configuration for my MySQL server.

But please allow me to expand my findings: There are three XenForo sites on this server two share similar genres, near message count & user account, have same number of styles and languages installed. One of them is very slow in terms of add-on installation & rebuilding process. The same goes when someone wants to mark their forum read, it takes a lot of time.

The other forum in the same niche, is very fast. Add-on installation doesn't take more than 30 seconds most at the time, marking forums read is also fast.

The third website is tad different, has more users & posts and threads. More add-ons installed. However it shares the same fate with the other slow XenForo board.

What I’ve done, beside the optimizing the header, expires, putting it behind CloudFlare, loading content from a cookieless domain, having memcached and ACP configured, I've also disabled the listeners and to find out if that made any difference, it doesn’t.

I’m clueless about why this is happening. I hope there is a way we can determine the cause of this slowness.
 
Back
Top Bottom