Tag Archives: performance

Load Test Your Server with Blitz.io

Want to test how your server performs under load? If you’re in the process of optimizing a server, or have just installed a caching solution, it’s good to see the effect your changes have had.

Blitz is a configurable service that will pound your site with page requests, allowing you to specify the concurrency, timeout, and duration of the onslaught. As it goes about this, it builds statistics and plots them along timelines. You can watch response times, errors and timeouts as it slowly ramps up the number of concurrent users until it reaches the maximum. At the end, it even projects how many hits per day your setup can handle at that rate.

The service has a generous free tier, though they offer paid upgrades for higher concurrency and duration. The free tier offers 250 concurrent users over a one minute rush. (Though if you sign up with this invite link, they will add additional concurrencies to your account.)

I found Blitz very useful when I was trying to squeeze faster response times out of my WordPress setup, tweaking my caching system options and adjusting Nginx and PHP configurations. Since they use the connections at their datacenter, you get more real-world results than if you simply ran Apache Bench locally on the server, or from your residential internet connection. Both tools have their uses, of course, and Blitz is a good one to have in your arsenal.

Thinking Async

I’ve written about loading JavaScript asynchronously in the past, as it’s a great way to decrease load times and prevent hang-ups when third-party scripts don’t load properly. But Chris Coyier has went and compiled the definitive guide. It covers the basic concepts and reasons for doing it, as well as different methods for implementing it; the easy HTML5 way and using embedded scripts to inject a non-blocking call to an external script.

Its a nice long and informative article, and worth a look if you’re looking to do some performance optimization of web site. (Be sure to look into sprites after you’ve switched to loading JavaScript asynchronously!)

Thinking Async [CSS-Tricks]

Facebook Announces HipHop for PHP

PHP is my favorite server-side programming language, but it has one major Achilles’ heel: speed. A language that is interpreted by the server at load time can’t hope to compete with a compiled language for speed. That’s what Facebook’s new project, “HipHop for PHP,” aims to solve. HipHop converts PHP scripts to C++ code and then uses g++ to compile it. This brings a CPU usage decrease of up to 50%, according to the announcement.

One night at a Hackathon a few years ago (see Prime Time Hack), I started my first piece of code transforming PHP into C++. The languages are fairly similar syntactically and C++ drastically outperforms PHP when it comes to both CPU and memory usage. Even PHP itself is written in C. We knew that it was impossible to successfully rewrite an entire codebase of this size by hand, but wondered what would happen if we built a system to do it programmatically.

Interesting, for sure. Imagine using it with WordPress for a high-traffic blog…

HipHop for PHP: Move Fast [Facebook Developer Blog]

Beyond Super Cache: W3 Total Cache

Donncha O Caoimh’s WP Super Cache plugin has become very popular in the WordPress community, especially with bloggers with medium-traffic blogs on shared hosting plans.

But what if you’re running on your own server, be it VPS, dedicated, or something else along those lines? What can you do to squeeze some extra performance out of your high-traffic blog?

Enter W3 Total Cache, a plugin that the infamously slow-loading blog Noupe has recently started using to combat the sluggishness that their constant social media hits cause. It can do a lot of things, including:

Continue reading →