Search

Hi Guys,

I have noticed that sometimes Symphony runs slow. I checked its profile and got these results:

Engine Initialization           1.6121 s 
Page creation process started   1.6185 s 
XML Built                       0.2105 s 
XML Generation                  0.0142 s 
Page Built                      0.2318 s 
XSLT Transformation             0.2539 s 
Page creation complete          2.1043 s 

Total Database Queries      124
Slow Queries (> 0.09s)          2
Total Time Spent on Queries     2.1485 s
Time Triggering All Events  0.0011 s
Time Running All Data Sources   0.2006 s
XML Generation Function     0.0131 s
XSLT Generation             0.3232 s
Output Creation Time            2.7214 s
Total Memory Usage          3.71 MB

It’s weird, sometimes when refreshing, “Engine Initialization” and “Page creation process started” hit ~ .05 and “Page creation complete” hit .5, other times its just really high (as above)

I also noticed that these two queries take a considerable amount of time

0.22441101074219 SELECT `session_data` FROM `sym_sessions` WHERE `session` = 'r4rfuk2096h5hf3v8bb4d20iq7' LIMIT 1

1.8615469932556 DELETE FROM `sym_sessions` WHERE `session_expires` <= '1292318483' OR `session_data` REGEXP '^([^}]+\|a:0:{})+$'

Any ideas guys?

Thanks as always

That sounds disproportionately high to me. How many rows do you have in the sym_sessions table?

What version of Symphony are you using? Symphony 2.1.0 and 2.1.1 fixed some session related bugs (the garbage collector was too strict before, leaving rows in the sessions table undeleted). If you are using an earlier version try updating to the latest version might help with the slow session queries.

@klaftertief I’m using 2.1.2.

@nick gonna get back to you but I feel its alot!

Hi Nick,

Below are my results

mysql> SELECT COUNT() FROM sym_sessions; +—————+ | COUNT() | +—————+ | 56913 | +—————+ 1 row in set (0.03 sec)

Any idea whats going on?

56913

Wow, that’s a lot. But to console you:

The first query is the one that searches for your session information. So this one will only fire if you’re logged in (99% of your users aren’t).

The second query looks like session garbage collection wich will only fire every now and then (I don’t know the numbers but it’s very rarely).

We’ll have a look at the table’s key settings and if they can be optimized to speed up the first query. With an entry number as high as 50k I see problems when using REGEX. Maybe that can be optimized too.

Can you post an excerpt from the table on pastie so we can check if your garbage collection is working properly? Please only do so if it’s not a production site!

Is your sessions table MyISAM or InnoDB?

InnoDB is best for tables like session tables where the data has a short lifespan.

Thanks guys for your response!

It’s a production site. I noticed that the web page load time is increasing drastically. From 4 to 6 seconds! Engine Initialization and Page creation keep hitting very high and low numbers. From the front-end everything has been optimized.

Is there a way of determining whether the load performance is being impacted through symphony or just maybe at server level?

56913 is quite high right??? This website gets a considerable amount of hits though. Could this be why?

@ErisDS, gonna get back to u

Thanks

56913 is quite high right??? This website gets a considerable amount of hits though

I wouldn’t have thought that this number would be affecting performance too much. I’ve seen this table hold more than a million rows without affecting performance. But then again, that was before the addition of the regexp query that attempts to delete old rows.

Is it always this single query that is causing slow page load times? Or could it be data sources? Both four and six seconds are unacceptably high load times so I’m curious. What is the server spec and traffic level? Are any other sites running on the same server? Have you implemented caching, and could the slow page loads be happening when the cache is rebuilt after expiring?

Thanks alot Nick for your input…(u have been a real help on alot of issues lately).

Using Google analytics, the page load time of a a particular page is 15 seconds. Visiting the page the second time round, it hits 4 seconds. We achieved a Ylow score of 85 , cached the datasources aswell as images etc. Analyzing the problem further, on the initial visit it seems the issue is with the pngs, gifs…etc.

Using webpagetest.org, we noticed that we have around 70pngs whose size is practically nothing, however “time to first byte” is incredibly long. Is this a symphony issue or a server related issue?

I read somewhere that this issue occurs often in Wordpress sites…

Here are the stats:

Requests    Size
image/png   56  163411 bytes
image/gif   7   17150  bytes      

however “time to first byte” is incredibly long. Is this a symphony issue or a server related issue?

Seems like a server issue, yes. If you run Symphony’s profiler (?profile) and see slow times there, then this is the issue (since these times are not concerned with browser rendering, they are purely the times to build the HTML page and send it to the browser).

Would you mind posting a URL to the site in question for us to review?

Thanks Nick.

Here is the page that is taking extremely long on initial visits

//Removed   15.2 

I just noticed this...maybe I'm saying nonsense but I think maybe it has to do with the JIT manipulation...Below are two images served from different folders...

URL: //removed
Error/Status Code: 200
Start Offset: 5.565 s
Time to First Byte: 99 ms
Content Download: 271 ms
Bytes In (downloaded): 19.9 KB
Bytes Out (uploaded): 0.4 KB


URL: //removed
Error/Status Code: 200
Start Offset: 7.629 s
Time to First Byte: 435 ms
Content Download: 5 ms
Bytes In (downloaded): 1.3 KB
Bytes Out (uploaded): 0.4 KB

I also read that generally TTFB is related to server side processing and is more of a back-end issue, generally related to dynamic web pages.

Here are the stats… http://www.webpagetest.org/result/110110BG874M/1/details/

Thanks Nick once again

any idea guys?

thanks as always

I ran the tests myself and full page load time was about 3s, including rendering assets in the browser. Browsing the site directly, each pages’ server loading times was always less than four seconds (many less than one second), so I’m unable to replicate your problem.

The images seem to be fine. The URLs of the images suggest they are not being served through JIT, instead these are the direct URLs to the source files, so these are loaded by Apache in the usual way like any other file. The result you posted doesn’t say how long each image took to load. The “Start Offset” time is the time the image first starts loading, measured from the first request (i.e. logo-rtfx.png started downloading 5.565s after the page was first requested).

Thank you very much Nick for your prompt replies. I really appreciate it.

I just realized that the results that I received were taken from Google's Web Master Tools which records the user experience, so if we have several users using old browsers, the values depicted are gonna look a bit out of the ordinary. However what was strange is that using webpagetest.org, the results did seem a bit alarming (maybe odd).

//removed

If you notice the time to first byte is quite high for each png.It also shows a page load time of 11 seconds.In Firebug, I flushed the cache, and I'm getting onload numbers of an average of 15 seconds. I am looking at:

//removed

Basically I just wanted to confirm whether it is a symphony issue or not.

Once again thanks Nick.

link text

this is the link, sorry about that

Your rtfx link is coming up in 5 seconds for me…

Thanks designermonkey..yeah in Firebug, //removed seems to be around that time. However looking using webpagetest.org, at link text its showing 13 seconds! The resource requests (i.e.pngs, gifs,...) seems to be the issue here. Is this a case of just using a CDN? However, the TTFB on the first line seems to be quite long. This is a a server processing issue which I guess is a Symphony issue??

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details