Request_URI For IIS Updated with ISAPI_Rewrite 3 Support

Request_URI for IIS, NeoSmart Technologies’ compatibility toolkit for IIS on Windows, has been updated to version 1.1, with support for Helicon’s ISAPI_Rewrite 3.x

With this update the installation process has been simplified somewhat, in particular the need modify HTTPD.INI to set the server variables has been eliminated – you just need to install ISAPI_Rewrite 3, configure php.ini to load up request_uri.inc, and you’re set.

Request_URI for Windows 1.1 retains backwards compatibility with ISAPI_Rewrite 2.x for those of you who’d rather not switch to the new (and much-improved) version 3.x.

Continue reading

File-Based Extension to the WordPress Object Cache

WordPress 2.5 has just been released, and has users are quickly finding out, file-based object caching has been removed from this release.

We’ve just released another extension to the WordPress object cache mechanism, supplementing our existing plugins for adding eAccelerator and XCache support to WordPress’s object caching features.

NeoSmart Technologies’ File-Based object caching extension for WordPress re-implements the cache-to-disk object caching feature of WordPress 2.0 through to 2.2. NeoSmart Technologies is also committed to the maintenance and support of the file-based caching mechanism.

Please be careful with the use of this plugin. It’s been disabled in the default WordPress codebase since WordPress 2.1 as a result of certain shared webhosts complaining of increased disk I/O access and thrashing when WordPress is subjected to extreme load times (as in the event of a Digg or Slashdot attack); so make sure your disk is fast enough to make it worth using this extension.

Continue reading

WordPress, PerformancePress, and GSoC 2008

For those of you that haven’t yet heard, WordPress is once-more taking part in the Google Summer of Code. Google Summer of Code 2008 is a Google-sponsored program where college students are encouraged to contribute to their favorite open-source projects for a summer, and in exchange both they and their mentors receive some monetary compensation/motivation for their efforts.

I really don’t need to go into details about this much, since Lloyd Budd has done such a good job explaining what it is and what WordPress hopes to achieve in this program. This year, WordPress has an even-larger and more-exciting list of possible projects than before, along with a list of the mentors available for each idea. This Google Summer of Code, I’ll be mentoring for the WordPress projects in the one area that is closest to my heart: improving performance.

It would be unfair to say that WordPress is slow or an inadequately-performing blogging engine, because that’s not really true. "Performance," more than any other software characteristic or trait, is a very relative and subjective index. It depends on thousands of different factors, it has dozens of different baselines, and most confusingly of all, sometimes the perception of performance matters more than the performance itself.

Continue reading

WordPress 2.5 and the Object Cache…

Caching and Why We Need It

Ever since the creation of interpreted languages and the birth of dynamic web content, developers have been on the lookout for tools, workarounds, and extensions in search of a solution for a solution to bring maximum performance to the world of dynamically-generated web pages.

Perhaps the simplest, most straight-forward, and most effective of these solutions is the caching technique. In most caching implementations, the dynamic content generated by user requests to a particular URI on a server trigger the caching mechanism which then stores the generated content in a "storage facility" somewhere. Future requests to the same URI retrieve the stored content rather than spend time and effort re-creating the response.

The most-popular method of caching involves the archiving of the complete HTML response generated by the webserver and then stored as a static content on the hard drive for retrieval at a later date (usually with some mechanism responsible for expiring the content upon certain actions or after a set amount of time).

Continue reading

Don’t Believe The Lies: PHP Isn’t Thread-Safe Yet

If you took everything you heard for granted, you’d have been lead to believe that the official PHP distributions (from php.net) have been thread-safe since version 5.2.0.

That’s not true. Don’t fall for it. Don’t attempt to use PHP in a multi-threaded environment (mpm_worker on Apache, ISAPI on IIS, etc.), because PHP thread-safety is a myth.. nothing more than a bunch of lies, if you will.

If you look at the PHP download page, you’ll see that the pre-built binaries (in this case, Windows) are split into two: thread-safe and non-thread-safe:

Thread-Safety

The problem is, no matter which you choose, PHP isn’t thread safe. You’ll still get the same, old, dreaded “PHP has encountered an access violation at memory_address” error.

It’s not a question of server configuration so much as it is one of PHP writing bad code and pretending that’s not the case. PHP isn’t multi-threading ready and most everyone knows it… but it seems they still feel the need to pass it off as if it were, never mind the complaints and bug reports that come.

Continue reading

XCache and eAccelerator WP Plugins Updated

We’ve just finished uploading the latest versions of our XCache and eAccelerator plugins, now at version 0.6.

For those of you that missed the initial announcement, we’ve written two plugins that let WordPress communicate directly with memory-resident opcode PHP variable caches that are used in XCache and eAccelerator to boost performance and decrease I/O activity.

eAccelerator and XCache are the two most-popular open-source opcode caching engines for PHP, and we highly recommend that any and all hosts use them to improve PHP performance by several folds. In particular, we recommend XCache for best performance.
Continue reading

Server Move Completed – NeoSmart Technologies Fully Optimized!

We’ve been working on moving to a new server all week, and we’ve just finished the transition. Best of all, we’ve switched to the new servers without any downtime in-between. Our new server is a 1.86 GHz Core 2 Duo and with 3GB of DDR2 RAM – all thanks to the awesome guys and gals at Lunarpages, the best host there is.

A lot of work has gone into this transition in hopes of raising the performance – and more importantly, the reliability – of our server. In the past year (since we first started our hosting with LP), we’ve gone from several million hits a month to dozens of millions, and our old server took quite a hit. To that end, we’ve focused on deploying lightweight and highly-optimized code all around; hopefully there will be no more un-expected downtime… ever.

Our current software setup is very complicated, but hopefully it’ll take us all the way to 0.00 minutes of downtime – that’s our goal! We have multiple application servers and programs running in the background each doing what they best – instead of the traditional have-the-web-server-do-it-all way. At the moment, we currently have a software stack comprising of a tightly-knit mesh of these products:

Continue reading

FastCGI for IIS Final Released, Congratulations to the IIS Team!

Congratulations are in order for Microsoft’s IIS development team – today they’ve just announced the public availability of the final version of the IIS-FastCGI ISAPI Extension – a long-awaited and much-improved way of running just about any open-source scripting engine on IIS, safely and quickly.

The Microsoft [[MSFT]] FastCGI module for IIS 5.1, 6, and 7 (with Windows Vista and Server 2008) have been in the works for quite a while now, and we’ve been using them since the first beta release – they’re good. While the biggest benefit will be seen in using FastCGI w/ IIS7 to take advantage of the new kernel-mode caching, it’s still a huge improvement over the old way of running scripting engines for languages like PHP on Windows.

The Problem: Most open-source scripting engines like PHP and Ruby on Rails were initially developed on/for the *nix world. On Unix-based platforms, the easiest way of creating multi-threaded applications is just to run the same app twice or more (The CGI model). On Windows, that doesn’t work out so well, because it takes a lot more resources to create another process. So these engines released Windows-specific single-process multi-threaded engines; the only problem was, they weren’t stable. Too many race conditions in some very non-thread-safe code wreaked havoc on many Windows systems, with the PHP developers themselves giving “Stability on IIS” the lowest level of concern.

Continue reading

eAccelerator PHP Extension Isn’t Thread-Safe…

For all the Windows-bound PHP users out there, consider yourselves warned: even if you’re running the (supposedly) thread-safe PHP Win32 binary redistribution, you’re still susceptible to PHP Access Violation Errors, race problems, heap corruption, and much worse if you use the popular eAccelerator opcode-caching extension.

We did our testing with the binaries compiled by SiteBuddy using the latest versions of both PHP and eAccelerator. Almost immediately after initiating a stress test on our test servers we experienced the dreaded “PHP Access Violation” error – which brings down the entire IIS Worker Process to its heels.

Continue reading

DDOS Attacks & Server Updates

Today, at or around 15:30 GMT, NeoSmart Technologies was victim of a distributed denial of service attack that lasted over two and a half hours. Unfortunately, as a result of the DDOS attack, our server had to be hard-restarted and we encountered some data corruption. All files were recovered with the exception of our MySQL tables for the forum which were completely unusable in the aftermath of the attack; these were restored from the latest backup we had (0200 GMT of June 5th, 2007).

The attack lasted around 3 hours, the recovery process another hour or so. We’re sorry for this downtime and are implementing failsafes that will hopefully protect against data corruption in the future. Luckily, our other data is stored on PostgreSQL (with the exception of this blog, which miraculously survived the ordeal unscathed) which is less prone to data corruption in our experience.

We urge anyone with any information about this attack to come forth, and remind the perpetrators that this is a felony punishable under law.

But at NeoSmart Technologies, we always do try to make the best out of whatever situation we’re in, so we took advantage of the downtime to do some server upgrades we’d been planning for a while:

  • Apache Tomcat (for the Wiki and Bug Tracker) was upgraded to version 6
  • MySQL was upgraded from version 5.1 to version 6.0
  • We upgraded PHP from 5.2.1 to 5.2.3
  • The IIS rewrite module was re-compiled and upgraded
  • Installed an XMPP/Jabber Server
  • Several other script changes

At any rate, hopefully this is like lightning and doesn’t strike the same place twice! We’re still here, and we will be for a very long time to come, God willing of course.

Once more, sorry for the downtime, and to those people who unfortunately had their posts vanished in the forums: our deepest apologies.