Bringing page load times back under control

Reality sank in last week when we were looking at performance graphs in google webmaster tools that over time our page times have crept up to nearly 5 seconds a page as the content on our site had grown to over 62,000 stores an 250,000 coupons. It dawned on us that the rate at which google had been taking pages from our website decreased and our traffic had been relatively stable as this process happened…

( Read more )

Slow DROP TABLE

It is a known fact that ext3 is not the most efficient file system out there and for example file removals can be painfully slow and cause a lot of random I/O. However, as it turns out, it can sometimes have a much more severe impact on the MySQL performance that it would seem. When or why?

When you run DROP TABLE there are several things that need to happen – write lock on a table so it cannot be used by any other thread, the data file(s) removal by the storage engine and of course in the end MySQL has to destroy the definition file (.frm). That's not all that happens, there is one other thing:

CODE:
  1. VOID(pthread_mutex_lock(&LOCK_open));
  2. error= mysql_rm_table_part2(thd, tables, if_exists, drop_temporary, 0, 0);
  3. pthread_mutex_unlock(&LOCK_open);


( Read more )

Unfolded Google Internal Speed Tool for Developers

Google is well-known for its fast searching engine as it can provide search queries within a count of half-second or even less.
Other services of Google perform considerable service for internet users as well except Gmail which sometimes shows poor performance. Google is typical with minimalist design. Yet, the speed performance of Google leaves no lack to the users to get the result of queries at once.

Good news. The key weapon of Google’s velocity is known as Page Speed, an internal tool that works to make efficient its site contents, is unfolded nowadays for website developers. Firefox plugin incorporated with Firebug is the first open-sourced tool that allows individual users to get the websites much faster than usual.

Excerpted from Google Blog Post:

A simple illustration on how Page Speed works to optimize your sites performance is that when you upload an image, compressed type of files will automatically provided for you. Thereby, you can directly display the compressed image on your site with no trouble. JavaScript or CSS which is used for faster display of your web pages can be identified obviously by Page Speed. The brilliance of this internal tool presents unquestionable comfort for individual users who are accessing your website accordingly.



( Read more )

Booting Linux in five seconds

At the Linux Plumbers Conference Thursday, Arjan van de Ven, Linux developer at Intel and author of PowerTOP, and Auke Kok, another Linux developer at Intel's Open Source Technology Center, demonstrated a Linux system booting in five seconds. The hardware was an Asus EEE PC, which has solid-state storage, and the two developers beat the five second mark with two software loads: one modified Fedora and one modified Moblin. They had to hold up the EEE PC for the audience, since the time required to finish booting was less than the time needed for the projector to sync.

How did they do it? Arjan said it starts with the right attitude. «It's not about booting faster, it's about booting in 5 seconds.» Instead of saving a second here and there, set a time budget for the whole system, and make each step of the boot finish in its allotted time. And no cheating. «Done booting means CPU and disk idle,» Arjan said. No fair putting up the desktop while still starting services behind the scenes. (An audience member pointed out that Microsoft does this.) The «done booting» time did not include bringing up the network, but did include starting NetworkManager. A system with a conventional hard disk will have to take longer to start up: Arjan said he has run the same load on a ThinkPad and achieved a 10-second boot time.


( Read more )

Browser Page Load Performance

Steve Souders is currently doing more to improve the performance of web pages and web browsers than anyone else out there. When he worked at Yahoo! he was responsible for YSlow (a great tool for measuring ways to improve the performance of your site) and he wrote the book on improving page performance: High Performance Web Sites. Now he works for Google but much of what he's up to is the same: Making web pages load faster.

I've been really excited about one of his recent project releases: UA Profiler. The profiler is a tool that you can run in your browser to determine the status of a number of network-performance-specific features that tie heavily to browser page load performance.

Here's a look at the current breakdown:



We can see Firefox 3.1 taking a lead, fixing 9 out of 11 of the issues tested for. Firefox 3, Chrome, and Safari 4 all come after with 8 fixed. Firefox 2, Safari 3.1, and IE 8 next at 7. Those numbers help to give you an overall feel of the page load performance that you'll see in a browser. (Naturally these tests don't take any rendering or JavaScript performance numbers into account but network performance generally trumps their total runtime anyway.)


( Read more )

VPS MySQL and Apache Optimization Guide

With a many of webmasters switching to Virtual Private Servers (VPS) from shared hosting and preferring them over costlier fully dedicated servers, the main issue is memory and resource optimization. Most VPS packages have dedicated memory constraints of 128MB to 256MB. Apache and MySQL are known to be the most memory (resource) intensive applications that tend to crash or slow down a low to mid range VPS often. While OpenVZ or Virtuozzo based VPSs can have a memory limit in addition to the dedicated RAM to high memory needs, Xen based VPSs can not use more than the stipulated amount of dedicated RAM, adding to the problem.

In this short do-it-yourself Apache and MySQL optimization guide, I will present some small yet useful tips that I have collected from the net and will also share my own VPS settings and experiences that I hope would be very useful to first time and newbie VPS owners. I would also like to make it clear that I’m not a system admin or server guru of any caliber, but a techie and geek who loves to try and do things himself. So, always make a backup of files concerned and don’t hold me responsible for any kind of loss incurred. Try at your own risk!


( Read more )

Innodb Performance Optimization Basics

In discussing with people I like to ask them a basic question — if you have a server with 16GB of RAM which will be dedicated for MySQL with large Innodb database using typical Web workload what settings you would adjust and interestingly enough most people fail to come up with anything reasonable. So I decided to publish the answer I would like to hear extending it with basics of Hardware OS And Application optimization.
I call this Innodb Performance Optimization Basics so these are general recommendation which work well for many applications, though the optimal settings of course depend on the workload.


( Read more )