Best server stack for development

Chris D

XenForo developer
Staff member
Yes. I do all of my development in Windows. Maybe I'll buy a Mac one day...

Since I started developing stuff for XenForo I have been traditionally using WAMP or XAMMP for Windows to provide Apache, MySQL, PHP etc.

No one can deny that it's pretty easy to set up.

The only thing I'm not keen on is its performance. It's not terrible. But according to debug stats even with a fresh install of XenForo and WAMP page loads were around 1.3 seconds. So I was beginning to consider setting up something beefier set up. Maybe even using a VPS for development or even setting up a home server.

But first... an experiment.

I heard a long time ago that nginx was excellent in many areas where Apache is not. And so I decided to look for any (again, easy to setup) server stacks including nginx.

Well, I found one. And it's awesome.

http://wpn-xm.org/

Page loads are now 0.1 second and it was pretty easy to set up. I originally messed up the nginx config for full friendly URLs but it was easily fixed.

Awesome.

Check it out (y)

I know some of you will be using something other than Windows, but I'm sure there's similar stacks for Mac and Linux too.
 
I use Macports for package management on OS X, my stack is nginx+php-fpm+mariadb (which is the same stack I use for the live server). Performance is great. (y)
 
After some grief with XAMPP, I just found it easier to install Zend Studio Community Edition ... especially when coupled with Zend Studio as an IDE.

Integrated code debugging is sweet - and it was all pretty easy to set up.

Not sure why your stack was performing so slowly? Excessive swap perhaps? How much RAM do you have in your development machine?

Try running resource monitor and watch the disk tab while loading pages and such - see if pagefile.sys is getting a lot of activity. If so - you're performance is going to suffer and you should boost your RAM (and stop running any unnecessary tasks).

Similarly, do you have an SSD in your development machine? That will give a huge boost to perceived performance, especially for disk read intensive applications.
 
After some grief with XAMPP, I just found it easier to install Zend Studio Community Edition ... especially when coupled with Zend Studio as an IDE.

Integrated code debugging is sweet - and it was all pretty easy to set up.

Not sure why your stack was performing so slowly? Excessive swap perhaps? How much RAM do you have in your development machine?

Try running resource monitor and watch the disk tab while loading pages and such - see if pagefile.sys is getting a lot of activity. If so - you're performance is going to suffer and you should boost your RAM (and stop running any unnecessary tasks).

Similarly, do you have an SSD in your development machine? That will give a huge boost to perceived performance, especially for disk read intensive applications.
I should have probably spent more time looking into it, but I doubt it was that. I have 4GB in this machine on an Intel Core i3 processor. Not a dream machine by any imagination, but shouldn't be as slow as that.

Anyway, nginx is working awesome so I think I will stick with it :)
 
On my Mac, I use Macports. On Windows, Zend Server Community Edition.
nGinX + php_fpm have great performance but it's not so simple to setup compared with Zend Server. Especially for URL rewriting.
 
  • Like
Reactions: Sim
URL rewriting is actually pretty simple in nginx. You can't drop a file like .htaccess in to do it, you must do it via the config, but in most cases it's something simple like
Code:
location / {
            try_files $uri $uri/ /index.php;
}
 
I've been using nginx for development for ages, wish I'd known about WPN-XM sooner!

To be honest a LEMP stack in a background virtualbox + samba shares to the windows host has worked best for me (and has the massive benefit of native git etc.) - always end up with strange issues using the windows versions of php and nginx while doing xenforo stuff (namely serving 1x1px gifs for everything or getting stuck entirely until restart)
 
To be honest a LEMP stack in a background virtualbox + samba shares to the windows host has worked best for me (and has the massive benefit of native git etc.) - always end up with strange issues using the windows versions of php and nginx while doing xenforo stuff (namely serving 1x1px gifs for everything or getting stuck entirely until restart)
NginX Website said:
Version of nginx for Windows uses the native Win32 API (not the Cygwin emulation layer). Only the select() connection processing method is currently used, so high performance and scalability should not be expected. Due to this and some other known issues version of nginx for Windows is considered to be a beta version. At this time, it provides almost the same functionality as a UNIX version of nginx except for XSLT filter, image filter, GeoIP module, and embedded Perl language.
 

Yeah the windows version is pretty poor

Though when I was running it live years ago on windows server 03 (hnnnnnnngg), it still managed to outperform (or at least use less cpu than) apache and iis for what I was doing
 
Though when I was running it live years ago on windows server 03 (hnnnnnnngg), it still managed to outperform (or at least use less cpu than) apache and iis for what I was doing
Properly configured, IIS provides excellent performance with PHP-FCGI :) But it uses more memory - this is a M$ product isn't it ?
 
Top Bottom