Archive for the ‘Uncategorized’ Category

PHP Apps: Apache vs Nginx

I’ve always read (and witnessed) that nginx is a far more efficient web server than Apache. In fact, people are noticing in vast numbers as evidenced by the latest numbers from Netcraft on web server market share. nginx market share has exploded out of nothing in the past couple of years (it’s only been around since 2005). nginx uses less memory and it much lighter than Apache, so for obvious reasons, it has become very popular. It is incredibly fast and powerful as an http and mail proxy, but just how does it do as a stand-alone PHP application server?

For myself, I wanted to know if Wordpress would run faster on an nginx or Apache server. There are plenty of how-tos out there on setting up nginx to use fastcgi for PHP applications, so I won’t go into that, but I happened to use this one.

For my little test, I used Apache Bench (ab) on a separate machine attached to the same switch. I took four tests and averaged the total time to complete the requests given by the output of Apache Bench. Below is a test of 100 requests one at a time (total time in seconds, lower is better):

nginx-v-apache-c1

That wasn’t at all what I was expecting. It wasn’t any different at all, really. The numbers were: 40.00 seconds for nginx and 40.04 for Apache. Add a little roundoff error in there and we really can’t say much about the results.

The numbers get a little more interesting when I start adding a little concurrency:
nginx-v-apache-c3

nginx-v-apache-c6

nginx-v-apache-c40

Definitely a trend, but even at 40 concurrent connections it’s not really anything worth writing home about. With a little tweaking I’m sure the concurrency issue can be throw into a whole ‘nother direction, but I just took what came out of the “box”.

Another interesting thing that I noticed was the memory usage between the two. With Apache, the web server used 23400K of memory. nginx used significantly less memory than that weighing in at a measly 4356K. However, since it can’t interpret PHP on its own and uses fastcgi, we have to add that in as well. That adds 19228K of memory, totaling 23584K, slightly more than Apache!

Apache and nginx seem to be almost the same when being used to run straight PHP applications. If you’re looking for a lighter-weight straight application server for PHP, I probably wouldn’t look any further than the LAMP stack since it has been made extremely easy to install and configure on popular Linux distros. Start adding load balancing, web proxies, mail proxies, and fault tolerance and then I’d start looking at nginx. Otherwise, I’ll be sticking with Apache for my PHP apps for now.

Related Posts Related Websites

Tags: ,
Filed under Uncategorized : Comments (0) : Aug 21st, 2009

2X App Server Client on 64-bit Ubuntu

Today I got to replace my aging Ubuntu desktop with a new machine. We’ve been using 2X for some time to run Windows apps on our Macs and I was pumped a few months ago to figure out that they had packaged a new version of their client for Ubuntu (well, Debian but it works on Ubuntu).

When I got up and running, I went to install the 2X client again:
wyatt@host:~$ sudo dpkg --install 2XClient.deb
[sudo] password for walterw:
dpkg: error processing 2XClient.deb (--install):
package architecture (i386) does not match system (amd64)
Errors were encountered while processing:
2XClient.deb

Wrong architecture. Dang.

Not to worry! 2X also distributes the binaries in a tarball so, using the 32-bit libraries, one can just run the binaries.

First, download the tarball. You can download it using your browser from their downloads page, or from the terminal via:
wget http://www.2x.com/downloads/AppServer-LoadBalancer/2XClient.tar.bz2

Untar it:
tar jxf 2XClient.tar.bz2

Copy the contents to /opt:
sudo cp opt/2X /opt/

Install the ia32libs:
sudo apt-get install ia32-libs

You can then create a launcher within the Gnome menu or whatever desktop manager you want.

To create the launcher, the command to start the client is:
/opt/2X/Client/bin/2XClient

Create 2X Client Launcher

Create 2X Client Launcher

That’s it! The 2X client should launch and run beautifully.

Related Posts Related Websites

Tags:
Filed under Uncategorized : Comments (0) : Aug 12th, 2009

Are We Going to See a Dogfight in the Web Docs Clouds?

Microsoft has finally announced formally something that we’ve all been speculating would happen for some time. Office 2010 will have not only an online version, but both paid and (the big news) a free version on the web. Microsoft is, of course, dominating the traditional ‘brick-and-mortar’ desktop-based office productivity software with their Office product already. They are entering the online document market with competitors Google and Zoho already with a decent foothold on the online market. Unfortunately for Google, Zoho, and others, Microsoft has a pretty good reputation from its Office client and anything with the Office label is probably going to be accepted by consumers.

As Matt Asay points out in Microsoft’s strategy in the virtualization market, ‘good enough’ and convenience sometimes are plenty to take over a market. Microsoft has something that Google and Zoho do not: desktop operating system market share. Just like Microsoft has done in the browser market to take over most of the market until Firefox came around (they still hold the majority), they essentially have a ‘botnet’ of users in Windows users. If the integration with Windows 7 and Office online is ‘good enough’ and integrated in the OS already, users may be drawn to it out of simplicity. Often consumers don’t care about what technology is better. In fact, I would argue that most of the time they don’t care about what’s better. They just care about what is easily available and the quickest. If Office online can meet their needs in a pinch, they probably won’t explore other options.

On the flip side of that, Google and Zoho do have a pretty good foothold in the web-based docs market. Google Docs or Zoho just might be ‘good enough’ to keep users already using their services. Plus, services like these often don’t integrate with others, so they tend to be somewhat viral in nature since collaboration with others requires those users to sign up for those services. As OS X and Linux start to become more popular alternatives to Windows, Microsoft’s advantages in integrating its OS may start to diminish, but their marketshare is still pretty high.

We still have to see exactly what Microsoft has up its sleeves for features in Office Web. Microsoft is calling their Office Web apps an “online companion” to its desktop applications, so we will see what they offer in features. Promised features so far are the ability to create documents and do basic editing, something that both Google and Zoho can blow out of the water. Only time will tell what will happen, but Google and Zoho seem to have finally brought Microsoft out of its fortified position on the ground with Office to do battle in the clouds.

Related Posts Related Websites

Tags: , ,
Filed under Uncategorized : Comments (0) : Jul 14th, 2009

Vista Needs More RAM Than OS X: A Vista Selling Point?

Microsoft’s recent “Laptop Hunters” ad campaign as well as their “TCO” comparison have been stirring quite a bit of controversy in the blogosphere, but their last add might be the most laughable of them all. The ad proclaims that Apple’s most expensive laptop under $2000 only has 2GB of RAM. They do have a good point. “Out of the box”, the low-end MacBook Pro has only 2GB of RAM at $1999. You can add more RAM if you want to, but that brings the price up. Of course.. what they don’t mention is why the Vista laptops usually come with 3GB of RAM or higher.

If you take a look at the minimum system requirements, Windows Vista Premium requires 1GB of RAM. Windows Vista Basic requires 512MB of RAM, but that doesn’t suit most users’ needs. OS X Leopard, on the other hand, only requires 512MB. (Can we call it OS X Leopard Premium?) Now, I’ve run Leopard on 512MB of RAM. The system is usable. Not incredible, but not too bad. Ever try running Windows Vista on 1GB of RAM? Pretty much the same. It works. It’s just not overly usable. I guess I am not quite sure how the PC that comes with 3 times the required memory is a better value than the Mac with 4 times its required memory. The fact that to get a well-performing Vista laptop, you need more system resources is a selling point?? Since when? What are your thoughts? Out of control ad campaign or legit?

Related Posts Related Websites

Filed under Uncategorized : Comments (0) : May 5th, 2009

Sun Joins the Open Source VM Game

Sun announced today that it is open sourcing its bare-metal hyper visor VM technology xVM.  This comes on the heels of the release of Microsoft’s Hyper-V for free, reported last week on What a N00bRead the rest of this entry »

Related Posts Related Websites

Filed under Uncategorized : Comments (0) : Sep 15th, 2008