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

Best server stack for development

Discussion in 'XenForo Development Discussions' started by Chris D, Oct 9, 2012.

  1. Chris D

    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.
     
    Darkimmortal, EQnoble, yavuz and 2 others like this.
  2. Jeremy P

    Jeremy P Well-Known Member

    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)
     
  3. Sim

    Sim Well-Known Member

    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.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    (y) Yeah almost exactly the same stack as WPN-XM.

    I wish I'd found it sooner :D
     
    Jeremy P likes this.
  5. Chris D

    Chris D XenForo Developer Staff Member

    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 :)
     
  6. Sim

    Sim Well-Known Member

    FWIW, I use nginx + php-fastcgi to serve all my websites (WordPress, vBulletin & XenForo) - quite impressed with it really.
     
  7. Insy

    Insy Well-Known Member

    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.
     
    Sim likes this.
  8. Jeremy P

    Jeremy P Well-Known Member

    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;
    }
    
     
  9. Luke F

    Luke F Well-Known Member

    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)
     
  10. Insy

    Insy Well-Known Member

     
  11. Luke F

    Luke F Well-Known Member

    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
     
    Insy likes this.
  12. Insy

    Insy Well-Known Member

    Properly configured, IIS provides excellent performance with PHP-FCGI :) But it uses more memory - this is a M$ product isn't it ?
     

Share This Page