Tag Archive for Performance

First slow web site of 2013 spotted…

At 09:30 on 1st January, as the country stumbled, bleary-eyed into 2013, people’s thoughts naturally turned to New Year’s resolutions. At the top of the list were the usual decisions to eat or drink less. Cancer Research UK has capitalised on this by launching their “dryathlon“.

Would be “dryathletes” are encouraged to sign up and pledge to abstain from drinking alcohol for January. As well as raising awareness of alcohol-related illnesses, the objective is to encourage people to donate their “beer money” to charity.

When, I tried to sign up for this it was obvious that I wasn’t alone. The site seemed slow compared to other websites at that time and part way through the registration procedure I saw this error message.Gateway timeout

I persevered and after a few “page refreshes”, I was able to register. Then I encountered problems with the page that populated the related page on Justgiving.com .

HTTP 500 error

Despite this, I’m pleased to say that my registration was successful. I only hope that this example of poor web performance didn’t dissuade too many people from joining this worthwhile cause.

If you’re feeling inspired to donate, please visit my JustGiving page here.
http://www.justgiving.com/dryathlete-richard-bishop

Bristol Pound – a great concept but a flawed web launch

I was drawn to the Bristol Pound project by a tweet that I spotted at lunchtime today.

The concept is simple:

  • Launch a local currency to help support the local economy in Bristol.
  • Encourage people to support local businesses.
  • Boost local spending power and lock money into the Bristol economy.

This all sounds great, but I just went to their website at  http://bristolpound.org  and the page took more than 3 minutes to download. Now I’m not blessed with the world’s fastest Internet connection in the office, but that’s a lot longer than most people are prepared to wait.

I was reminded of a couple of StrangeLoop infographics:

The first one describes web user’s boredom thresholds and shows that people abandon slow sites quickly, many never return and even worse, they tell their friends about their bad experience. This can be very damaging for a brand that puts so much effort into their day 1 launch.

 

User boredom thresholds - infographic

 

The second infographic documents the increasing size of pages over time. I know that we all use high speed internet connections nowadays, but if a lot of people start to hit your site, you’re going to run out of bandwidth to serve the requests pretty quickly.

 

I think that the Bristol Pound website is suffering from “page bloat” and here’s why…

Using a Firefox browser with an empty cache and Firebug, I connected to http://bristolpound.org and saw that it took almost 3 minutes for the page to download completely. The page looks great and is graphically rich, but it doesn’t perform well for those first-time visitors hitting the site today.

The image below which is taken from the HAR (HTTP archive) file that I created shows a single image taking 2.33 (139 seconds) minutes to download. The large/slow image is called FINAL_Launch_POSTER_copy.jpg , and it is advertising tonight’s launch party for the Bristol Pound.

 

 

The main problem with this image is that somebody has uploaded the full size image to the website and rescaled it using HTML. The original image size is 3,508 x 4,966 pixels which is huge, but it is displayed at only 338 x 495 pixels. Serving a scaled-down image could save 1.8MB of bandwidth for each page request (a 99% size reduction). This would reduce the download time for this component from about 139 seconds to less than 2 seconds. This alone would significantly improve user’s first impressions of the site.

This screenshot shows the “offending image” highlighted in red.

 

There are other improvements that could be made, but to improve performance for now, I’d simply resize the image in an image editor (MSPAINT would do) and then keep my fingers crossed…..

How much detail to include in a performance test report?

Traffic lights

I’m a member of a LinkedIn group called “Performance Testing“. This morning a member of the group from BlazeMeter posted a link to their blog article about how much detail to put into a performance test report.

http://blazemeter.com/blog/what-include-load-test-report-technical-vs-management-reports

 

Historically I’ve always put large amounts of detail into performance test reports, but over the last 12 months or so I’ve started to reduce the amount of content. This allows me to produce what the customer generally wants in a shorter time frame.

In most performance tests customers tend to want to know the answer to one question:
Will my application perform well under expected user load?

This can generally be answered with “yes” or “no”, although occasionally the answer is “maybe”. (I tend to use traffic lights to show this at a high level.)

Often much more information than this is simply wasting time. In the last year or so I’ve started to produce reports  in Powerpoint that can be easily referred to in conference calls or webinars, be presented to clients at their site and can be re-used internally by my client’s project managers when they want to pass on information to their own internal customers.

I have found that by including less high-level detail and including embedded spreadsheets, charts or other documents allowing technical readers to “drill down” to the detail; I can keep all the potential readers of my reports happy.

I’ve attached a PDF “mock up” of a performance test report based on a test that I ran for a client earlier this year. I’d be interested to hear any comments from other testers about what works for them.

pdf-icon

Sample Test Report

A lesson in not leaping to conclusions

Gadgets

 

I have a pretty decent quad-core PC at home with 8GB RAM and performance generally isn’t an issue for me. This spec is more than adequate to run the occasional virtual machine for testing and evaluation purposes as well as handle standard business applications such as word processing, email, video conferencing etc.

 

At the moment, my performance counters are reasonably healthy; under normal use, I typically use between 10-25% of my processing capacity and about 2/3 of my available memory. This is normal for me and has been consistent for more than 12 months. The only exception to this tends to be when I edit HD videos or do other things such as saving recorded TV shows to DVD using media centre.

 

 

The problem
I work as an application performance tester which means that I’m pretty inquisitive when it comes to how computers perform. This may be the reason that I tend to leave Windows Gadgets on my desktop reporting CPU and memory use in real-time.

For some time, I’d been noticing that the third core of my quad core processor (an Intel i5 750) was busier than the other cores. I thought that I’d have a look at Windows Task Manager to see what was using my CPU cycles. When I looked at Task Manager I was surprised to see that the total amount of CPU in use was consistently less than that shown by my desktop gadget.

 

I tried the usual tricks, including choosing “show processes from all users” to see whether a system account was using CPU.

 

In short I was stumped…..

 

 

Diagnosis

I decided that perhaps I should dig a little deeper, so I installed Process Explorer.

Process Explorer shows you more detailed information about currently running processes and I was pleased to see that it showed me the increased activity on core 3. As well as showing me this extra activity it also showed that the bulk of activity was down to interrupts, rather than context switches or deferred procedure calls.

Process Explorer showing large number of interrupts

15-17% of all CPU activity was handling hardware interrupts so one core was almost fully occupied.

Process Explorer - CPU chart, core 3 busy

The (wrong) conclusion

I knew that I shouldn’t have any hardware device generating this large number of interrupts, so I thought that I’d work out what was causing the problem by a process of elimination. I decided to check external devices first because this was easier and I suspected that these devices were more likely to be faulty. I disconnected the scanner, printer, external USB hub, speakers, drawing pad etc. but the problem remained.

This meant that the problem had to be inside the PC, so I started to disconnect internal components such as my DVD drive, after disconnecting everything that I could, I rechecked and the problem still remained. Because my graphics card passed a diagnostic check and I was running out of other options, I decided that it must be my hard drive.

This was both right AND wrong.

The (correct) conclusion

After replacing my hard drive at first the problem seemed to have resolved itself. I’m not sure how this problem seemed to be fixed for a short while, but after a couple of days the problem came back.

I decided to overhaul the PC from a software perspective. I performed a Windows update to upgrade any drivers that were out of date, and then I decided to check for new drivers for my hard disk.
In device manager I right-clicked on the hard disk and chose the option to “Update Driver Software”. I didn’t really expect this to work but after a reboot the problem had gone.

Device Manager - showing option to update driver software

After several months, I’m happy to report that my PC is still working normally.

All cores have similar utilisation levels.

Process Explorer - showing four cores with similar utilisation

Interrupts is no longer visible in the top of the list of active processes.

Process Explorer

 

If only I checked for updated drivers before I spent the best part of £80 on a new drive.
Ah well, at least I learnt something new, and I now have a spare hard drive for backups!

 

 

Performance problems ITV1 website and Tweetminster during leader’s debate

Dear ITV  & Tweetminster,

I’m a web application performance tester. I could have helped you avoid some of the load-related problems that caused problems for your customers during tonight’s debate.

 

ITV leadersdebate screengrab

Sky and BBC, don’t forget to performance test your sites before the next debates !

Good Luck.