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

XF 1.5 Troubleshooting slow page load time

Discussion in 'Troubleshooting and Problems' started by Peace, Apr 28, 2016.

  1. Peace

    Peace Active Member

    I'm trying to figure out why my xF site is running so slowly. I'm on an SSD VPS that serves our live vBulletin site in 0.1 seconds (according to vB debugger). xF is consistently showing between 0.3-0.5

    Thread list:
    Page Time: 0.4088s
    Memory: 5.9162 MB (Peak: 6.7330 MB)
    Queries (16, time: 0.0096s, 2.4%)

    Forum list (home):
    Page Time: 0.4417s
    Memory: 5.4976 MB (Peak: 6.3275 MB)
    Queries (21, time: 0.0067s, 1.5%)

    Thread view:
    Page Time: 0.4209s
    Memory: 5.9423 MB (Peak: 6.6895 MB)
    Queries (19, time: 0.0071s, 1.7%)

    Memory usage is lower than vBulletin, and we have more than enough available CPU (running at like 2% utilization right now).

    I like optimizing queries on plugins, but as you can see above, the queries make up only a very small percentage of time.

    This leads me to "Included Files", which is 175 (vBulletin is only 56).

    Could that be the culprit? And if so, how do I start troubleshooting?

    The only weird pattern I've found is that it seems to be query related (even if the queries themselves are not slow). For example, if I keep refreshing Thread view, I will get much better results:

    Thread view (after some refreshes)
    Page Time: 0.0764s
    Memory: 5.9208 MB (Peak: 6.6867 MB)
    Queries (17, time: 0.0070s, 9.1%)

    As you can see, number of queries dropped by 2 (from 19 to 17). Every time it's 17, the page time is below 0.1 seconds. Every time queries is 19, it shoots up to 0.3-0.5 seconds.

    What I don't understand is, I've looked at the two queries that come up, and both of them is running faster than 0.001 seconds every time. So how come each time they run, page load time increases by at least 0.3 seconds?

  2. Brogan

    Brogan XenForo Moderator Staff Member

    The initially higher query count (and therefore timing) is likely due to the first visit, with subsequent visits serving cached data.

    Looking at your site, you have a number of add-ons installed, which are likely contributing to the queries and timing.

    What happens if you disable all add-ons? Are things improved?

    Having said all that, it's not really possible to compare XF to VB in terms of page load time and queries.
  3. Peace

    Peace Active Member

    Disabling add-ons brings the slower load instances down from 0.4, closer to 0.3 - but we have another test server running nginx (with exact same xF forum + add-ons) where it's constantly 0.1 or below. I guess something isn't processing mySQL or PHP quite as fast on our current server. I will keep debugging and post back here if I figure anything out.
  4. Brogan

    Brogan XenForo Moderator Staff Member

Share This Page