Site running on steriods or so I am told

I was told Nginx is superbly efficient and is the only way I can keep my server from being thrashed every two days. Yesterday I moved to Nginx. So far so good. If it runs fine for a week without issue then fine. Keeping my fingers crossed. Will post my Nginx configs then.

One more thing before I sign off. Apache processes are bloated since it has mod_php embedded in it. In case of Nginx you need to rung Php processes separately. So, in this case we must count the memory usage as the combined total of Nginx and Php. In many cases you will end up with the same memory size as that for Apache but there is a catch here.

Nginx processes have very low memory footprint and it can alone serve all the static files, very efficiently. This will cut down on a huge load since, on your WordPress powered blog too, there are loads of static files – images, Javascript, CSS, etc. Only the Php rendered page will tax the system, but hold on, here comes the second catch!

Your blog’s content doesn’t update every day or minute. So, why do we need to go to Php for each and every user and re-render the page again? Well we don’t need to. WP Supercache is a plugin for WordPress which does just that. It generates the static htmls of your pages and keeps them on the disk. Whenever you publish something then it will update the related static html. Cool isn’t it. What is cooler is then you can configure Nginx to directly pickup that generated static html from disk and serve it to the user, completely bypassing the bloated Php. 🙂 Only when it doesn’t find the needed static html file then it will need to go to Php to generate it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.