Lowest Cost Cloud Load Testing Tool

Web Performance Optimization, Part 10: The Evolution of Client Side Caching

web performance optimization client side cachingWhile we've touched upon client side caching in our series on Web performance, we haven't discussed how client caching has grown more rich and useful over the years. In the initial days of the Web and the HTTP/1.0 protocol, caching was mostly limited to a handful of headers, including Expires, If-Modified-Since, and Pragma: no-cache. Since then, client caching has evolved to embrace greater granularity. Some new technologies even permit the deployment of offline-aware, browser-based applications.

Why Business Executives Place a High Priority on Web Performance in 2012

Happy New Year! I mean that literally...it is a happy new year for web performance geeks like you and me.

web performance geeks are happy in 2012Did you ever read The Hobbit? There was a clever exchange between Gandalf and Bilbo where the meaning of "Good Morning" was discussed. Are you wishing me to have a good morning or are you saying it's a good morning whether I want it or not?

Well, 2012 is going to be a great year for the web performance and load testing industry. I wish that you have a happy new year, AND it will be a happy web performance new year whether you want it or not.


Load Testing for Holiday Season was Awesome

LoadStorm begins 2012 with an upbeat outlook because the last few months of 2011 showed over a 400% increase in load testing volume.

The actual number of load tests being executed by our customers were maybe only double the number in 2010, but the scale of tests was much bigger. It is also interesting to note that many more online retailers were running tests of 25,000+ concurrent users. We had many calls with traditional brick and mortar companies that were putting significant investment into their web store capabilities - including speed and scalability.

Anecdotally, we can share with you that it was a good investment because some of those customers told us that their online sales had risen as much as tenfold (10x) over the previous year! That's great news for all of us web performance engineers.

Not only does it seem clear to us that web stores are getting high priority for e-commerce, but it is also clear that web performance has gotten much more attention from the C-suite. Several of our customers mentioned their load testing projects were being driven from executives worried about site crashing under heavy traffic. That's outstanding! Finally, the stories of Web site performance failures is getting the attention it deserves. I guess it was tough to ignore all the headlines blasting companies like Target when their site crashed in 2011.

Operations and marketing leaders are starting to understand the correlation between web performance tuning and profitability. Web sites are not just online brochures, nor are they just a secondary revenue channel. The message that is coming through loud and clear is that faster sites make more money.

In more than one project-related conference call with companies running load tests of 50,000-100,000 concurrent users, there was a VP of Marketing being very active in driving her/his team regarding the results he/she was expecting. It was refreshing (somewhat shocking) to hear a 60 year old traditional advertising agency veteran telling everyone on the call that "sub-second response time is imperative to success!" I loved it. The web coders...not so much because they had lots of optimization ahead of them.

Web Performance Optimization, Part 9: Optimizing HTML

web performance optimization HTMLIn our past installments on Web performance optimization, we've seen how caching, server configuration, and the use of Content Delivery Networks (CDNs) can increase a Web site's responsiveness and improve Web performance metrics. Most of the techniques we've reviewed have focused on configuring the Web server or optimizing server applications. Unfortunately, a Web page that downloads quickly but is slow to parse or execute on the client will appear just as slow to a user as if the Web server were on its last megabyte of memory. In this article, we'll discuss some ways that Web page content can be streamlined for an optimal client-side experience.

 

Streamline JavaScript Includes

web page optimization fewer requestsJavaScript abounds on the Web. From jQuery to Dojo, the Web is full of JavaScript libraries that can easily be dropped into a Web application. And any site whose developers are actively adding features is going to accrue its own storehouse of .js files. Unless a site's JavaScript is carefully managed, its Web pages could end up making a dozen or more separate requests for scripts. As we've already discussed in our article on
web performance optimization non-caching strategies
, the more requests your site makes, the slower it will load.

Tip of the hat to TechAttitude.com for the graphic showing how Web page sizes and number of objects have grown tremendously over the past 16 years. In the interesting article they state, "...the average size of a web page has increased by more than five times since 2003" and "the use of mulitmedia is increasing by 100% each year".

Follow these guidelines to manage and reduce the burden of JavaScript on your Web pages.

Web Performance Optimization, Part 8: Content Delivery Networks

So far in our series on Web Performance Optimization, we've focused on how to reduce the number of requests between client and server through caching, and how to make requests more efficient by managing server resources. Another strategy in Web optimization is intelligent distribution of resources across the Internet, which can greatly reduce request latency by locating redundant copies of Web content on multiple servers spread across the Internet. In this installment of our series, we focus on content delivery networks (CDN), a technology that increases throughput by bringing content closer to the people requesting it.
 

What is a CDN?

In the simplest Web site configuration, a single Web server services requests from multiple clients. While this is often good enough for the simplest, lowest traffic Web sites, complex Web sites that need to scale to thousands or millions of visitors require more processing power. This is why many sites have resorted to using Web server farms, which are clusters of multiple Web servers offering redundant copies of a site's content. Web farms use load balancing software to monitor the amount of load on any one server. They can also use this information to route requests to the server with the least load at a given point in time.

web optimization content delivery networkA CDN is a type of Web farm or server cluster, except that instead of using a single farm or cluster, the servers are spread out over the Internet in multiple geographical locations. These are called edge servers, because they are located at the extremes, or edges, of the Internet, instead of all being located off of a central Internet backbone link. The goal of a CDN is to decrease the time it takes to deliver content to a specific user based on that user's location.

Let's say, for example, that a company based in New York receives a request for Web content from a user in Seattle, WA. In a traditional setup, the Seattle computer's request would have to find the most efficient route on the Internet to New York, usually via a busy backbone link. In a CDN configuration, the CDN could tell the Seattle client that its nearest edge server is on a subnet in Portland, Oregon. By obtaining the content from a server closer on the network, the client greatly reduces request latency.
 

Web Performance Optimization Part 7: WordPress Tuning

web performance optimization for WordPressIn recent years, the good folks at WordPress have made it easier to use their free software not just as a blog, but as the hub of a rich content management system (CMS), complete with static content and custom data types. Given that, it's no surprise that Webmasters and businesses around the world are increasingly basing entire sites around the platform. (And did we mention the "free" thing?)

While WordPress runs decently out of the box, site operators who employ a few tweaks and follow a few rules of thumb will achieve much better performance in the long run. In this article, we look at the best practices that will keep your WordPress site humming efficiently.
 

Limit the Number of Plugins

WordPress plugins are great. With a few clicks, ordinary users can add complex functionality to WordPress that otherwise might have taken hundreds or thousands of hours of programming.

But plugins also present a performance danger. Each plugin in the WordPress plugins directory must be loaded every time a new request is made. Even if the plugin is disabled, it will still load. This performance "gotcha" particularly affects sites on shared virtual hosting systems (e.g., Dreamhost, HostGator). Performance degradation can be dramatic on shared hosts; in some situations, user requests may never finish completing.

The number of plugins that will cause a site to slow down will vary based on a variety of factors. The author has been told by representatives of HostGator that they encourage customers to limit the number of installed plugins on their virtual hosting service to seven. Webmasters should select the WordPress plugins they employ carefully, and use a load testing service to measure the performance impact of any new plugins that they add to their system.

Using Web Analytics for Modeling Application Usage in Performance Tests

web analytics used in performance testsIn my last article, I wrote about the paradigm shift in web application architecture and why performance testers have to re-think their strategy around testing Rich Internet Applications (RIA) for performance. Web application development processes and user expectations continue to grow by leaps and bounds. Sadly, the techniques and approaches employed to test those applications have not kept up with the same growth rate. But the good news is that newer tools are coming up and methodologies are being defined to close in on that gap. Hence, it is essential that performance testers make use of them at every phase of the performance testing lifecycle.
 
Early on in the performance testing lifecycle, testers gather requirements and collecting application usage statistics is typically one of the primary tasks. In this article, I will explain how “Web Analytics tools” can be a great source of information to gather historical data about the application usage and user behavior.


 

Traditional Web Server Log Approach


Traditionally, performance testers have been relying on the web server log files to collect historical application usage data. A web server log was and still is a great source of information. They contain enormous data on web usage activity and server errors. Downloading log files from the web server and running report generation tools will help testers get meaningful info out of them. However, web server logs have their limitations. For example,

  • Usage data contained in the web server logs do not include most “page re-visits” due to browser caching. For e.g. If a user re-visits a page, no request is received by the web server as the page is retrieved from browser cache. 
  • 
While data contained in the Web server logs can provide insights into system behavior, it does not help much in understanding “user/human behavior”. 
  • 
Web server logs do not provide user’s geographical info, the browser they used and the device/platform they accessed the application from. All of which are vital metrics to understand user behavior on the application. 

While Web Server log files are still a great way to measure user statistics, new ways to measure web traffic have propped up that provide information from a user-perspective rather than a system perspective. A large number of organizations are implementing what is called “Web Analytics Tools” as part of their Web application infrastructure. For example: Industry reports suggest that Google analytics, a leading Web Analytics tool provider is used on 57% of the top 10,000 websites.

Web Performance Optimization Part 6: IIS Performance Tuning

web performance optimization IISIn our last article on performance tuning, we examined how to squeeze the most performance out of an Apache server. In this installment, we'll take a look at how to apply some of these same principles to Microsoft's Internet Information Server (IIS), which ships as part of Windows Server.

While its percentage of the Web server market share has declined in recent years relative to Apache, IIS still remains the second most deployed Web server on the Internet. Its deep integration with Windows and host of management utilities make it a great choice for anyone hosting Web content and applications in a Windows environment. With a little performance tuning (aided, of course, by load testing), an IIS machine can perform just as well as an equivalent Apache configuration under high load.

The Usual Suspects: Compression and Connection Management

Many of the techniques a team might use to enhance IIS performance are similar to the techniques used on Apache, as they involve configuration of the HTTP protocol.

The Risks Of Testing in Scaled Performance Environments

This article will explain the risks associated with using a scaled (aka downsized) environment for Performance Testing. I’ve been a little off topic lately and I thought I would jump back into the realms of Performance Testing. I thought I would attempt to answer one of the most complicated questions I’m faced with when Load Testing. The question is this “If we half the size of the performance/load testing environment can’t we just multiple the figures up?” This is a straightforward question and the answer is simple – ‘NO’. But justifying the answer and explaining in simple terms is more difficult. Particularly to PM’s and people not directly attached to the technology. So I’m going to attempt to answer in simple terms why scaled load testing environments tend not to work and highlight the risks to be considered when using them. Point people at this article if you struggle to answer this question – and let me know what they think.

performance testing scaled downFirst lets take an object: A square – if we half the square, do we get half the size? Well yes and no – the square is half the size, but its capacity is 1/4 of the original square.

This is a very simplistic view - but it illustrates if the environment is ‘halved’ the capacity will not. I’m setting the scene so please bear with me …..

Throttling Web Performance

Have you ever wondered why your web access speed is sometimes blazing fast, while at other times you are waiting for response at a slow-as-molasses pace? Yeah, me too. I've been obsessed with web performance and page speed since 1996, so I'm sensitive to slowdowns.

Stress Testing Bonuses for GOTO Prague 2011

stress testing tool 5k free users for GOTO Prague

Since most of our readers are software/web developers with global reach, we want to share with you info about an upcoming international conference where you can learn cool new coding techniques and hang out with some rock stars in the developer industry. LoadStorm is a proud sponsor of this software development conference and is offering 5,000 free virtual users in our stress testing tool to attendees!

A Paradigm Shift in Web Application Architecture & Why Performance Testers Should Care

web application architecture paradigm shiftModern browsers are turning into miniature operating systems. They can multi-task browsing processes, allocate and manage memory, collect garbage and what not. They are capable of running complex Web applications on their own with minimal Server interaction. There is now a paradigm shift in the Web Application architecture as a majority of application processing is shifting from the Server to the Web browser. The Web browser, once called a “Thin” client has become a big fat cat lately.


The Browser Wars

Meanwhile, leading browser makers are fiercely competing against each for dominance in the Web browser market share. This so-called “browser wars” has set off major developments in the capabilities of popular browsers like Internet Explorer, Firefox and Chrome as more and more features are built into them. Browsers are now capable of processing data from multiple sources like Content Delivery Networks (CDNs), Ad Networks and Analytics providers and present them to the user. Browser makers are also scrambling hard to bundle as many new features and enhancements as possible to their browsers to stay ahead in the race. Mozilla, for example, recently announced a new rapid release schedule in order to bring faster updates to their Firefox browser. Google has been doing this to its Chrome browser for a while now. However, as browser capabilities are improved, it has also introduced additional complexity to Web application architecture.


Mobile Computing and the Rapid adoption of newer Web Standards

On the other hand, W3C, the organization that sets Internet standards has also realized the need for newer Web standards in this era of Mobile computing. HTML, the core technology for structuring and presenting content for the Web is undergoing a major upgrade as part of W3C’s new HTML5 specification. Among other things, the new HTML5 standards will make it possible for users to view multimedia and graphical content on the Web without having to install proprietary plug-ins and APIs. Related standards like CSS (that defines the layout) and DOM (that defines interaction with data objects) are also getting an overhaul. Technologies like CSS3 and XMLHttpRequest (XHR) are gaining wide adoption and popularity. These newer Web standards have put the onus on the web developers and front-end engineers to build interactive web applications that are fast, highly responsive and that behave like a traditional software application.


Web Performance Optimization Part 5 - Apache Server

web performance optimization Apache serverSo far in our series of Web Performance articles, we've addressed the three majors types of caching that Web server application developers can employ: server file caching, application caching, and data caching. We've looked at additional performance enhancements that Web server administrators can can activate, such as HTTP compression, file consolidation, and connection pipelining.

In this latest installment of our series, we're going a little deeper and focusing on Apache. The world's most popular Web server, Apache currently powers over 63% of sites on the World Wide Web. While Apache runs decently out of the box, development teams and system administrators should combine frequent load testing with the following tuning recommendations to ensure their applications perform well under heavy traffic.


Memory Models: Prefork vs. Worker

A Web server must be able to respond to anywhere from dozens to thousands of concurrent user requests. Each request, obviously, must be fulfilled by either a separate application process, or a separate thread running within a single process.

Apache can handle concurrent requests in two different ways, depending on which Multi-Processing Module (MPM) was selected at compile time. The default MPM on Unix is prefork, which handles each separate user request in a separate instance of Apache. The other MPM module available for Unix systems is worker, which launches fewer instances of Apache, and handles multiple requests in separate threads within each process.

Worker is the preferred MPM module for Apache under Unix, as it is faster and uses less memory. So why is prefork the default? Because any team that deploys worker must ensure that any modules that run under Apache are thread-safe. The thread-safe requirement extends to any libraries used by these modules, which makes running a programming environment such as PHP under worker tricky: while PHP is itself thread-safe, there is no guarantee that its various extensions are. Some developers, such as Brian Moon, have reported success in running PHP under worker using a minimal set of extension libraries. Your mileage, however, may vary.

Cost of Fixing Software Defects

I love this graphic on Altom Consulting's home page that shows the relationship between when a bug is found and the cost of resolving the problem.


cost to fix software defects


Their tagline for the company that relates to this graphic: "We believe in testing as early as possible to minimize the impact and cost of fixing defects."



Web Performance Testing - Cost Benefit Analysis

Forgive me for stating the obvious, but web applications are a critical part of global business in 2011. I see no alternative other than more dependence by companies everywhere on web software and Internet infrastructure. In my opinion, all business trend data predicts greater overall web usage, more complex application architectures, and tremendous spikes in extreme traffic volumes.


Critical Applications, Yet They Aren't Getting the Investment Needed

ComputerWorld last week made a definitive statement regarding the critical nature of web applications:

Those who are unprepared are vulnerable to service outages, customer dissatisfaction and trading losses - and often when it hurts the most. Successful businesses understand the need to assure service and application availability if they want to retain customers, deliver excellent service and take maximum advantage of the opportunity their market offers.
This is not a theoretical problem - just look at the recent challenges for the London 2012 Olympics andTicketmaster. Just when everyone wants to do business with you, you’re not available.

performance testing London OlympicsThe London Olympics site was overwhelmed by high demand for tickets and many buyers received the message, “We are experiencing high demand. You will be automatically directed to the page requested as soon as it becomes available. Thank you for your patience.”

That's a failure even if the representatives of the site said it had not crashed. Performance failure...pure and simple for the whole world to see.

Examples of performance failure like this seem to occur weekly, if not daily, somewhere in the global business universe of websites.


Transformative Moment? When Global Retailers Fail!

Recently Target.com crashed under extreme user volume. They cut a deal with a designer line of knitware (Missoni) and promoted a special sale on the morning before products were sold in stores. By 8:00 a.m. EDT, the site was crashing. The Boston Globe went so far as to say:

”...the Missoni mess could be a transformative moment in the relatively brief history of e-commerce. Retail analysts say it shows that even though online shopping has made major strides since Victoria Secret’s website famously faltered during a 1999 webcast, companies still may not always have the technological muscle to meet consumer demand for such frenzied promotions.”

Performance Requirements

performance requirements riskThe aim of this post is to outline how to determine and prioritise the key performance requirements within a project. I’ve already covered how important it is to have good performance requirements. These are the items that drive and determine the quality of the performance testing - but actually how do we best manage, assess and identify performance requirements?

Managing Performance Requirements

Lets take a step back first. I’ve often found that the person that best defines the performance requirements is usually the performance tester. This is in contrast to the business analysis or the stakeholders defining them. Why? A number of reasons - the main being time and accuracy.

Here’s a typical conversation:

Retailer Should Have Load Tested

load testing target site failureWhen will retailers learn? When will marketing departments going to consider the technical ramifications on their campaigns and launches? When will the IT department escalate performance engineering to a high priority? When will we stop reading about sites crashing under heavy volumes of traffic?

Hopefully never! Because these stories are great examples why you need LoadStorm.

Target Inc.'s website crashed yesterday due to special promotion. Apparently, the discount retailer has cut an exclusive arrangement with an Italian luxury designer called Missoni, and it would seem that the online sale of Missoni knitwear generated enough buyers to bring the site down.

I sure would like to know how many concurrent users killed it. Wonder how many requests per second the Target site was handling with less than a 5 second response time?

Can there really be more than a few hundred knitwear aficionados that would hold Missoni goods in such high esteem? What are the odds that those few hundred would all be anxiously awaiting the online sale and access the site simultaneously?

Perhaps it was 5,000 or 50,000. The result is the same - lost revenue, bad press, unhappy customers, and brand devaluation.

Web Performance Optimization Part 4 - Non-Caching Strategies

web performance optimization speedometerWelcome to the fourth part of our Web Performance Optimization series. It is our hope that these suggestions and best practices will assist you in improving the speed of your site. We view performance engineering as an iterative process whereby developers and testers will run load tests, analyze measurements, and tune the system incrementally. Our goal is to help you make your site faster and handle higher traffic.

We've talked extensively on this blog about how server applications can use caching to improve Web server performance, often dramatically. In addition to caching, Web site developers and administrators can employ other techniques to reduce the size of wire transmissions and increase document delivery speed.


File Consolidation

Web servers can reduce the number of requests generated by the client by reducing the number of separate files the client must fetch. Servers can facilitate this by combining separate files of the same type. From a maintainability standpoint, it often makes sense for a Web site developer to store the Cascading Style Sheet (CSS) code for her site in several separate files. A Web browser, however, doesn't care if the CSS code is contained in four small files, or one monstrous file; all of the elements share the same namespace once they're loaded into the browser.

According to The Exceptional Performance Team

80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of HTTP requests required to render the page. This is the key to faster pages."

Minify is a PHP5 application that combines multiple Javascript and CSS files into a single file. This simple utility can eliminate anywhere from two to 12 HTTP requests for a single page. Minify goes the extra mile and applies GZip compression and cache control headers to these unified files for maximum performance.

Another key technique for consolidating multiple files is to take advantage of CSS sprites. This technique puts multiple images into one composite image that can be used by the browser for many different individual parts of a page. CSS background positioning is used to display only the image you need from the sprite.

The HTTP requests are greatly reduced because one request replaces potentially hundreds of requests. I have seen some customers' ecommerce pages that contain over 300 images. A sprite could produce a 300 to 1 reduction in requests for that page. Multiply that overhead savings by say 10,000 concurrent users, and the result is a tremendous performance improvement. Most new versions of browsers support CSS backgrounds and positioning, which has allowed developers to adopt this performance technique.

Performance Testing Manager Joins Our Blog

A rumor has swept around the world this week through Twitter and Facebook that Jason Buksh, performance consultant, is going to be an ongoing guest blogger for LoadStorm. That rumor has apparently been substantiated! You heard it here first. We look forward to many useful insights from Jason.

So, please welcome our newest performance test expert blog contributor here at LoadStorm.com.

As his first contribution (other than his insightful interview), he sent me this funny cartoon about stress testing.


stress testing is frustrating

Super Real-time Cloud Monitoring

web monitoring toolWe are excited to announce a partnership with CopperEgg because they provide a product that is a perfect complement to our load testing tool. RevealCloud is a web monitoring tool that can be used for performance engineering or operations.

Many of our customers have asked if we have a tool to monitor the server-side metrics during a test. Unfortunately, we don't. We now recommend their RevealCloud Pro product. It helps busy app developers monitor the performance and health of web applications in the cloud.

It's easy to use and installs quickly. Please give it a try.

Here's a cool excerpt from their site that I think concisely explains their value proposition:

If you want to focus on developing great apps instead of wasting time troubleshooting why that app is running slowly, then get RevealCloud Pro.

  • Installs in less than 10 seconds
  • Sends alerts via email or text
  • Updates every few seconds
  • Monitors the health, load, performance and capacity
  • Provides in-depth insight into performance including historical tracking
  • Supports Linux and FreeBSD, physical, virtual and cloud
  • Is viewable from ANY browser (laptop, iPhone, iPad or Android)

Performance Testing Interview with Jason Buksh

performance testing with JasonJason Buksh is a Technical Project Manager and Performance Consultant in London, England. Jason has extensive experience with performance testing at many companies including HSBC and Siemens. He is skilled with tools such as Rational, Grinder, and Performance Studio. His certifications include LoadRunner.

We appreciate his time to share some good thoughts with us about a topic that gets us excited. Here is his interview with us.

What is your technical background?

I learned to program when I was 13 - it was a vic20, I then swiftly moved onto 6502 for the BBC micro. University studying computer science was an obvious and easy progression for me. First job was writing rendering engines (C++) for virtual reality simulators. I would describe myself as a techie at heart - I’m genuinely interested in how things work. I think having a strong and long background in IT enables me to grasp new concepts easily - which is great when I have to go into different companies and need to understand their systems quickly. I've a 2:1 in Computer Science, ISEB Practitioner and SCRUM Master Certified.


Do you consider yourself more of a software developer or QA professional?

We should get out of the habit of separating them so readily. I feel strongly that every software developer should QA their work. Its not good enough to code and then relinquish QA to another team. Its lazy, increases delivery time, wastes effort and increases cost. Everyone should be a QA professional within their own field. I think a large dedicated QA team is a good measure to the inefficiency of an IT project. I’m going to write a post on this very topic.


How much involvement do you have with load and performance testing?

My career is built on it. I’ve performance tested many mission critical and highly transactional systems. Companies like Expedia have extremely large volumes of traffic, and the performance of such a system is paramount. My experience at global financial institutions has taught me a great deal about trading platforms and the importance of milliseconds in response time.


What is the biggest change you have witnessed in the way people conduct load testing?

There is a quiet move away from Loadrunner and its going to become an avalanche. It's been underdeveloped and overpriced for a long time.

Server Monitoring in Windows Azure

server monitoring in Windows AzureIf you are hosting your web application in Windows Azure, here are some tips regarding monitoring your servers and application during a LoadStorm test that were provided to me from a Microsoft software engineer:

Sharing with you the steps for performance testing/bottleneck identification. Attaching all the requisite documents and counters.

Explanation of perfmon counters - http://msdn.microsoft.com/en-us/library/aa905154(SQL.80).aspx

Other tools we use:


Ways to Use Perfmon Counters Config File via Command

Web Performance Optimization Part 3 - Data Caching

web performance optimization eliminate diskIn the previous installments of our Web performance series, we've examined how developers can employ Web server caching and application caching to speed up their Web applications. In this installment, we'll see how caching entire data sets can increase platform efficiency.

What is Data Caching?

Database caching is a species of application caching that caches the result of one or more database queries in the application server's memory. For our purposes, we use application caching to refer to caching any component in an application server's memory, and data caching to refer to caching a collection of data for future querying and sorting.

There are two main approaches to data caching:

  1. Data set caching. Data returned from a database is stored in a data set, an in-memory representation of data that mimics the column/row structure of a relational database.
  2. In-memory databases. An in-memory database is a relational database that operates completely in a server's RAM, as opposed to storing data to a hard drive. In-memory databases can be used for fast access to data previously retrieved from a traditional, disk-based RDBMS.

Let's dig deeper into each of these.

Analyze Database Slow Query Log and Optimize Expensive Queries

If you're serious about web performance optimization, then you must run an efficient database. One necessary skill is an ability to analyze a database slow query log and optimize the most expensive, slowest results. While one relatively slow query may not be the end of the world, many slow queries will add up quickly and frustrate users.


Setting Up a Slow Query Log

Running a slow query log is not a default setting in MySQL, so the first thing you’ll need to do is set one up. Open the server’s configuration file and enter “log-slow-queries” as well as an output file. On the next line, enter “long_query_time=x”. The value x represents a certain number of seconds, and any query taking longer than that number will appear in the output log.

Although needs will vary, a value of 1 is generally recognized as a good starting point. For heavily used servers, a value of 1 may result in a slow query log which is too large, creating additional performance problems.

In addition, you may want add a third line which reads “log-queries-not-using-indexes”. (Evidently the creators of MySQL did not realize that the plural of "index" is actually "indices.") This will instruct MySQL to log any query which does not use an index, whether or not the query time exceeds the value listed on the second line. If you only want to log queries not using indices, you can set the value on the second line very high.

Web Application Performance Optimization, Part 2: Application Caching

In our first installment of this series, we examined how Web server caching is implemented. Caching stores critical pieces of information in memory or on a local hard drive for subsequent rapid retrieval. In this installment, we'll look at how Web application environments can use application caching to reduce load and increase performance.

What is Application Caching?

web application cachingApplication caching stores calculated components in memory for future use, either by the same user or multiple users. Because of the complex architecture of modern Web applications, application caching can produce huge gains in Web site response times.

A Web application is usually comprised of multiple architectural layers. At the simplest level, Web applications consist of the client, which runs the application (usually a series of HTML pages and associated technology); and the server, which processes data and generates output. When we zoom in on the server side, however, we find that most non-trivial applications consist of several additional layers. Typically, these layers include the UI layer, which generates the user interface (usually HTML); the business logic layer, which implements business rules; and the data layer, which stores and retrieves data from one or multiple data sources.

Skipping Load Testing is a Dangerous Choice

load testing is like wearing a helmet - it's good insuranceIn 1948, Indian Motorcycles asked my father if he wanted to be a dealer for them. The rest is history. I grew up riding dirt bikes, racing at field events, and rebuilding a few classic cycles. My dad always wore a helmet and made sure I did too. Sometimes the helmet he gave me wasn't very cool, but I was sure it was best for me because he told me stories of guys that didn't wear them.

Sad news caught my eye today about a guy protesting the helmet law in New York. Unfortunately, while he was riding in a rally he lost control of his Harley, flipped over the handlebars, and hit his head on the pavement. He didn't survive the crash. State troopers determined that he would not have died with a cracked skull if he had been wearing his helmet.

Two things come to mind:

  1. Legislation doesn't always work.
  2. He made a choice that was costly in the end.

How does this motorcycle helmet situation relate to load testing? It's simple:

Every day web developers make the decision that load and stress testing is NOT necessary for their site or application.

Yeah, and you can ride without a helmet too. It's just a bad idea. The risk is too great.

Performance of your site has a direct correlation to your success. Slow sites lose revenue. Sites crash under heavy traffic every day because they got a favorable review on Slashdot. Unexpected volume comes from unlikely sources and blindside your company. Digg, Reddit, Twitter, and hundreds of other social media sites can immediately pour tens of thousands of users to your URL. How will your site handle it?

Ross Perot Helped Start LoadStorm

Performance testing LoadStorm and Ross PerotBack in 1986, I had no idea who H. Ross Perot was. Nor did I really care. However, he not only played a unique role in American politics back in the 1990s, but he also was instrumental in the forming of the global technology powerhouse known as CustomerCentrix, LLC. By extension, he was critical to the development of LoadStorm because CustomerCentrix is our parent company.

Therefore it is only fitting that today we honor the 80th birthday of one H. Ross Perot, founder of information technology giant
Electronic Data Systems (EDS).

EDS was purchased by General Motors in the eighties because the IT outsourcing industry was booming and because GM had a poor track record with information technology. As a student in Nashville, TN during those days it was huge news when GM announced the creation of Saturn - a new car company to remake all the old manufacturing paradigms encumbering the US Big Three. The first plant was planned for a small town just south of Nashville. It was going to be an enormously beneficial investment for the area and for the whole country. We all believed the hype! So I determined that my career as a computer scientist should start with the biggest revolution in American business, and I set about getting a job in the computer side of Saturn.

Web Application Performance Optimization, Part 1: Web Server Caching

As we've discussed previously, Web site optimization directly affects a company's bottom line. A sudden traffic spike that swamps a website's capacity can cost a company thousands or even tens of thousands of dollars per hour. Web servers and Web applications should be built and deployed from day one with performance at the forefront of everyone's mind.

Web site administrators and web application developers have a host of tricks and techniques they can employ to deliver Web pages more quickly. From my experience, I've seen 1,000% performance improvement from simple web application optimization techniques. Caching is the #1 tuning trick in the web developers kit. Customers ask me weekly what I recommend for speeding up their app. I always start with "caching, caching, and more caching". It's like magic for a site.

A ViSolve white paper shows a return on investment of $61,000 for a $20,000 total cost of ownership of only two caching servers!

In this article we'll look at how two different but related forms of caching are used to conserve server resources and reduce network latency; thus, greatly improving your customers' experience with your site.

What is Caching?

web server cachingCaching refers to any mechanism that stores previously retrieved content for future use. As I learned it in college back in the VAX/VMS operating systems class, it is temporarily putting something into memory that you will use again in order to avoid hitting the hard drive. Computer scientists today are less concerned about saving every byte like we were back then. Still, web applications are constantly re-using data and files; so why in the world would we want to make an expensive hit to the database? Hard drives can be 10,000 times slower than memory because they are mechanical and must move to the correct position and spin to the exact spot where data exists. Memory moves at the speed of electricity.

The goal of caching is to increase the speed of content delivery by reducing the amount of redundant work a server needs to perform. Putting a file in memory to re-use it can save millions of drive accesses; thus, the speed of getting the browser what the user needs is increased by magnitudes. Caching and performance go hand-in-hand. It's a no-brainer.

Web Performance - Get it Right

web performance - heat didnt winThe Miami Herald published an ad for clothing congratulating the team on their 2011 NBA championship. Perhaps no one noticed. #FAIL

Whoops, I guess the editor wasn't watching the game when the Dallas Mavericks closed out the NBA Finals and took home the trophy. Congrats to the Mavs. Dirk earned the right to be in the greatest player discussions - especially when it applies to comebacks in the 4th quarter.

The huge mistake by the newspaper makes me think about how obvious web performance failure is a tremendous error. Perhaps a site owner or web application product manager can ignore the performance aspect, but their users will not. The speed and scalability of an online system has been proven statistically to directly affect its effectiveness.

Load Testing ROI - 5 Good Data Points

load testing prevents losing moneyLoad and performance testing your website is important. Tuning it can have more than a 1,000% return on investment.

Some of the case studies referenced below show us that we can improve revenue 219% just by improving performance our site. Other data confirms that the average business loses $4,100 per hour when their site slows down under load. An outage costs $21,000 per hour on average. Retailers can lose $100,000 per hour.

It's possible to have a successful ad campaign or a wonderful Slashdot day that your site can't handle - and that can send
46.9% of your traffic to your competitors. Or worse, cost you 150,000 customers.

Take Web Performance Seriously

At the beginning of 2009, Denny's made a bold marketing move. At a time when many Americans were out of work, and those with jobs were struggling to make ends meet, the restaurant chain cut an ad offering every American a free breakfast. The ad only aired once, during a little event called the Super Bowl.

And that's when Denny's troubles began.

Within minutes of the ad airing, customers who attempted to access Denny's Web site to get their free meal coupons found that they couldn't get through. The company planned the commercial and the $3 million ad buy perfectly. What it didn't plan for was the ensuing deluge of traffic, which Internet marketing expert Rob Kmiec estimates represented anywhere between a 434% and 1,700% spike in the daily traffic to dennys.com. Had the company planned for the additional attention and invested in a Content Delivery Network (CDN) or cloud network to handle the ensuing load, Kmiec argues, it would have reaped nearly a 1,000% return on that investment. Instead, the company lost the opportunity to serve an additional 153,300 customers.

Performance Testing Interview with Rodney Bone

performance testing Rod Bone interview
Rodney Bone
is a performance consultant that works for Revolution IT in Brisbane, Australia. He has graciously invested his time to share insights about performance testing with us. Please follow him on Twitter (@rod_bone) and tweet your thanks for his interview.

That's Rod in the picture at the right when he did some reserve time during the Brisbane floods over Christmas. The slow sign is just ironic.

What is your technical background?

Started as a software engineer with Accenture, where I was involved in the entire end to end SDLC including experience in the BA space.

Do you consider yourself more of a software developer or QA professional?

Now, definitely QA, I think todays generic developer is only one part of a large picture and Accenture’s model of exposing developers to the whole SDLA is one that should be encouraged by all companies.

How do you determine the load to apply to the target app during load testing?  

Ask the business, and ask as many people as applicable. Users, and BA’s have different opinions, so talk to them all. Once you nail the processes and the amount of transactions per hour run with that. Back that up with Log info as historical information is the best source of information. With new applications this is not always available.

Do you prefer using requests per second (RPS), concurrent users, or some other metric to define load?

They answer different questions. You can sometimes hit a server with the right RPS with one virtual user but that doesn’t tell you that the web server is up to serving the required amount of concurrent connections. I have tested an app where they plugged the Apache Load Balancer in out of the box and it only served 20 concurrent connections. FAIL! And you wouldn’t pick this up without concurrent users.

Storm on Demand - Pay Per Test

Storm on Demand Users Cost
250 $9.97
500 $19.95
1,000 $39.90
5,000 $199.50
10,000 $399.00
25,000 $997.50
50,000 $1,995.00

performance testing sign upIt's easy. You can be load testing in 15 minutes.

  1. Click the "Free Account" button.
  2. Enter your name & email address.
  3. Click the confirmation link in an email.
  4. Create a test scenario for your site.
  5. Run a load test.
  6. Analyze the test results.
  7. Send us a testimonial because you are amazed!

Best Load Testing Tool

"LoadStorm I love you and I am gladly going to pay for your services!" - Bernardo Rivas Carillo, Software Development Engineer in Test, Wirestone

"Excellent product – quick and easy to set up, great analytics tools, and affordable." - Mislav Kos, Application Developer, Soliant Consulting

"We can only wish that more of our vendors would be so responsive and accommodating as LoadStorm." - Miguel Picornell, VP Operations, Optaros, Inc.

"Great load testing tool! It's exactly what we need. I think the world of the service!" - Rafael Santander, Performance Engineer, OffandAway.com

"LoadStorm...awesome product!" - Kaine Escott, CEO, Harvey Norman Big Buys

"Thanks for the help and the great customer service!" - Andrew Glenn, CTO, Group Commerce Inc.

"Thank you alot! LoadStorm is essential for us to ensure the best performance & scalability." Claudio Bianchi, CEO, FreeSharewareDepot

Want a Live Demo? Have Questions?

Please feel free to contact:

Scott Price
Vice President
(970) 389-1899 mobile
support@loadstorm.com

Click here to submit a testimonial