XF 1.4 Xenforo Debug Stats: Timing, Memory, DB Queries

Going from vBulletin to Xenforo we've already noticed a considerable improvement on page speed and server load, but we're trying to optimize even further. The XF Debug info shows 3 primary stats to illustrate efficiency:
  • Timing
  • Memory
  • DB Queries
My question is about memory but I wanted to open this discussion to all suggestions and improvements as I think anyone working on 1 of them is likely working on all 3 of them.

I'm having the biggest problem with getting memory size down- it's consistently 60MB+ on the homepage and 30MB+ on other pages. From what I've seen from others, typical sizes are well below 10MB. I can't seem to nail it down to an add-on causing this problem... perhaps it's a server configuration issue?

Would love to hear what people are doing to bring down their memory size. And of course, any other tips for improving the stats in this debug info.


Well-known member
A lot of it is likely the server. If you compiled php with every available option and then jammed a bunch of extensions in there. Seems to do the trick of consuming memory.

My original VPS has me at 22 mb or so a page no matter what and now I'm down to 5 to 7 mb a page load. Which is a bit lower than my shared host was.


XenForo moderator
Staff member
I have 22 add-ons installed and run at 6.5MB for my portal page and 7.5MB for the forum index, on my local install.


XenForo developer
Staff member
You can't necessarily compare directly to others; the comparisons are mostly useful within a system. You can potentially see significant differences based on whether you use an opcode cache (and if so, the specific implementation).

(That said, 60MB seems extreme.)


Active member
Just chiming in real fast to say that with hooks completely disabled we see, if anything, an increase in MB size (I work with trigatch, just told him this too seperately). I do like the suggestion to check out PHP compilation. We will check with our server guy.

That said - might it be worth hoping that one day the MB info might turn into a link to give diagnostics like the query info? :D
The only debug I'm aware of is located at sitename.com/?_debug=1

That's the same destination URL you get when clicking the timing link in the footer. Were able to see memory usage on that link (in our case "Memory: 65.9521 MB (Peak: 72.4452 MB") but it doesn't provide details of that memory usage.

Disabling all add-ons provides only marginal improvement (couple MB here and there) and recompiling PHP with only the required modules was also unsuccessful in reducing the total MB count.

We're still digging and trying to track down the problem, but are thinking it might be a bunch of little things that combined together create a snowball. In the meantime if you've got any further ideas we'd love to hear them! Thanks in advance.


Well-known member
The memory usage is being reported back by PHP. So you will be getting the query structure and times from that page. Plus overall memory usage for php on that page load. That's what I meant.

What is your current hosting? I can spin up a vps on digital ocean in an hours time. Bet if you ran a backup on it you would see a huge decrease in memory usage. That said your individual needs from php may be different.

Edit - just actually read the comment on your recompile. Still willing to setup a test server for giggles.