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

Anything better than this for Xen under nginx?

speedway

Well-known member
#1
Hi all

I have had comments that my Xenforo test site is slower than my VB 4 site (AHHHHH!!!!!). They both run on the same server, same DB, same nginx. I set up the XF conf like this:

* NB: **** represents hidden info.
* NB2: listen address is an IP address, I have 4 to choose from so I have one set for the site.

Code:
server {
        access_log /****/****/****/xf.australianspeedway.com/log/xf-.access.log combined buffer=32k;
        error_log /****/****/****/xf.australianspeedway.com/log/xf-error.log error;
index index.php index.html;
listen ***.***.***.**;
server_name xf.australianspeedway.com;
 
root  /****/****/****/xf.australianspeedway.com/public;
 
client_max_body_size 20M;
 
error_page  500 502 503 504  /50x.html;
  location = /50x.html {
        root  /****/****/****/xf.australianspeedway.com/public;
  }
 
  location / {
            #This sends everything through index.php and keeps the appended query string intact.
            try_files $uri $uri/ /index.php?$uri&$args;
}
 
        #add some expires
        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
      expires 1y;
      log_not_found off;
        }
 
        #protect the innocent
      location ~ ^/(internal_data|library)/(.*)$ {
      internal;
        }
 
include /usr/local/nginx/conf/staticfiles.conf;
include /usr/local/nginx/conf/php.conf;
include /usr/local/nginx/conf/drop.conf;
 
}
This is almost identical to the VB conf file with a couple of addon bits for Xenforo. I would be very interested to see what others think.
BTW, I have APC cache running on both sites.
Cheers
 

p4guru

Well-known member
#2
checked your error logs for any clues xf.australianspeedway.com/log/xf-error.log error ?

check apc cache stats to make sure you allocate enough memory to apc cache ?

checked both your sites and seems all the 3rd party advertising js/swf calls slowing page load times
 

speedway

Well-known member
#3
checked your error logs for any clues xf.australianspeedway.com/log/xf-error.log error ?
Just checked the logs and it only shows things that people have been trying to access, things that actually don't exist on the site at all (not part of Xenforo)

check apc cache stats to make sure you allocate enough memory to apc cache ?
I have 32Mb assigned to APC and it currently has space free

checked both your sites and seems all the 3rd party advertising js/swf calls slowing page load times
Interesting.... I have been asking the 3rd party ad supplier why they are slow today and they reckon the site(s) are fast on their end with Vb being faster. If I turn the ads off altogether, XF is FAST! Will approach them again telling them what you have said. Barring them coming to the party I will have to bother someone for a way to defer them loading via CSS....
 

speedway

Well-known member
#4
You know, I think now it IS the adverts screwing things up. I just turned off all the blocks with ads and the site is definitely fast.
 

speedway

Well-known member
#6
What dB engine are you using for your XF tables - MyISAM or InnoDB?
Whatever is default for XF as far as I know. Will check it out for certain.

Edit: It looks to be MyISAM according to phpmyadmin. Come to think of it, I have never enabled InnoDB on this server.
 

speedway

Well-known member
#9
Which is what has happened here I think. My VB4 site runs on MyISAM and as it is still running I don't want to change. What I might do when the time comes is dump the DB from my dev site, shutdown VB4, reconfig the DB server and reimport the data. ...... if that wil work :)
 

Mouth

Well-known member
#11
Feels fast to me. 1.5-2.0 sec page loads times of average.
Perhaps you have all your SQL cache for active vB and XF just feels slower because SQL for XF is reading/writing to disk and not caching due to memory being used for vB data?
 

speedway

Well-known member
#12
Feels fast to me. 1.5-2.0 sec page loads times of average.
Perhaps you have all your SQL cache for active vB and XF just feels slower because SQL for XF is reading/writing to disk and not caching due to memory being used for vB data?
I do have the ads turned off at the moment, if I turn them back on it jumps to between 5-8 seconds.
 

CyclingTribe

Well-known member
#17
Hmmmm, thanks Click.... nope it hosted in the US at the moment, Servint. Whose your ISP? I am with Internode via a Telstra frame at the exchange.

If you look at this report by gtmetrix it is saying the site is loading in 5.7s and the ad stuff is one of the culprits to being slow: http://gtmetrix.com/reports/xf.australianspeedway.com/sohrIBLk
Ah, okay - well those kinds of tests are useful, but I wouldn't put too much stock in them. Use them as a general guide for what to look at when optimising your server/site, rather than an authoritative report. Testing server location and resources can impact on the measurements, and the loading time will be for the very last byte to finish downloading - which is usually quite different from what end-users will see.

Quite often the ads/java/and other elements will load after the page has begun to visually render in the browser window, so whilst the results from the test report might say 5 seconds - for the end user they may well see the page start to render at less than one second (whilst all the rest of the page downloads in the background).

I've done a comparison with my site - CycleChat - which runs on a 6 core AMD server with 64GB RAM, SSD, and is optimised for XF (and which I know runs like greased lightning when no Google Ads are being loaded [and you're accessing it from the UK]):

http://gtmetrix.com/compare/C7qC9GKr/KBj6pPcl

According to the report - it's apparently slower than your site!!??? :eek: - Now give it a try and tell me what you think to the speed as it renders in your browser - did it take 5 seconds?

Cheers,
Shaun :D
 

Arkshine

Active member
#18
Just tested both from France. About speedway's forum, without ads (blocked with adBlock), it's definitively way faster, almost as much as Cyclechat. You should try to see if ads can be rendered after the page being loaded because right now it blocks the render. Looking at gtmetrix waterfall, you see well all the extra ms comes from ads. Without that, your forum should load around ~2 seconds.
 

p4guru

Well-known member
#19
Interesting.... I have been asking the 3rd party ad supplier why they are slow today and they reckon the site(s) are fast on their end with Vb being faster. If I turn the ads off altogether, XF is FAST! Will approach them again telling them what you have said. Barring them coming to the party I will have to bother someone for a way to defer them loading via CSS....
If you're game you could try Centmin Mod v1.2.3 beta version which has ngx_pagespeed support for Nginx http://centminmod.com/nginx_ngx_pagespeed.html which automatically optimizes CSS/JS ordering amongst other Google pagespeed recommendations.
 

speedway

Well-known member
#20
Thank you guys, I really appreciate you looking at this.

@Shawn - I see what you mean about those metrics on gtmetrix, definitely going to be looking at them differently from now on. I was most interested in the stuff about the ad server which Arkshine confirms by using the ad blocker, they are holding things up for sure.

@p4guru thanks for the heads up, I might just give that a try. I am not so hot at CSS stuff so if I can get something to help me along I am all ears. I need to recompile nginx for webdav support anyhow so may integrate that into centmin 1.2.3b

Cheers guys