Archive for April 16th, 2008

Apr 16 2008

Microsoft Hosting Summit - One-on-one with Michael van Dijken

The WHIR team recently had the pleasure of attending Microsoft's fourth annual Hosting Summit in Seattle, WA (which, for the record, is breath-takingly gorgeous and seems to have a unique balance between man and nature, and I could go on and on, but I digress). Hopefully you followed the ever-eloquent Liam Eagle in his live coverage of the event and checked out some of the photos from the summit on our Flickr site.

Lucky for us, after the summit we had the opportunity to explore Microsoft's campus in Redmond (we saw the executive offices that Bill Gates and Steve Ballmer work in AND played in Microsoft's museum) and took a moment to chat to a familiar guest on WHIRtv, Michael van Dijken, Microsoft's lead marketing manager for hosted services. Michael had some enlightening things to say regarding the direction Microsoft is taking with its partners through these events.

In the coming week we'll be bringing you some of the attendee feedback we collected from the event, and let me just say that the openness and willingness from Microsoft's partners to share their thoughts and opinions was rather impressive.

I also wanted to bring to your attention that WHIRtv is now available through iTunes so if you want these videos conveniently delivered to you every time we post a new one, be sure to subscribe here.

No responses yet

Apr 16 2008

Microsoft Hosting Summit - One-on-one with Michael van Dijken

The WHIR team recently had the pleasure of attending Microsoft's fourth annual Hosting Summit in Seattle, WA (which, for the record, is breath-takingly gorgeous and seems to have a unique balance between man and nature, and I could go on and on, but I digress). Hopefully you followed the ever-eloquent Liam Eagle in his live coverage of the event and checked out some of the photos from the summit on our Flickr site.

Lucky for us, after the summit we had the opportunity to explore Microsoft's campus in Redmond (we saw the executive offices that Bill Gates and Steve Ballmer work in AND played in Microsoft's museum) and took a moment to chat to a familiar guest on WHIRtv, Michael van Dijken, Microsoft's lead marketing manager for hosted services. Michael had some enlightening things to say regarding the direction Microsoft is taking with its partners through these events.

In the coming week we'll be bringing you some of the attendee feedback we collected from the event, and let me just say that the openness and willingness from Microsoft's partners to share their thoughts and opinions was rather impressive.

I also wanted to bring to your attention that WHIRtv is now available through iTunes so if you want these videos conveniently delivered to you every time we post a new one, be sure to subscribe here.

No responses yet

Apr 16 2008

50+ Tips and Resources to Improve Your Site’s Speed and Performance

Webmaster Turbo Kit: 50+ Tips and Resources to Improve Your Site's Speed and Performance

By now, nearly everyone knows that you can't have an effective site without speed. Web users have short attention spans and are generally not willing to wait for a bloated website to load. Take advantage of these tips, tools, and resources, and you'll have a much better time capturing their attention.

Tips

Follow these tips to slim down and speed up your site.

  1. Remove anything that isn't vitally important: Get rid of all of your "ego" elements that show off your design skills, and just keep the components that contribute to your site's function.
  2. Cut down on HTTP requests: Reduce the time that users need to spend downloading components by cutting some out or combining them.
  3. Cut your page down: Keep your HTML and image size below 50kb for fast loading.
  4. Make use of thumbnails: Serve up images in a smaller size with thumbnails, which will allow the user to see a larger image if they'd like to.
  5. Spread your content around different locations: Use a content delivery network to cut down on response times due to a lack of close proximity to your web server.
  6. Remove comments from your HTML: HTML comments are useful, but if you're going for speed they're just not necessary.
  7. Reduce your images: Fewer images mean fewer HTTP requests, so use text instead of images whenever you can.
  8. Tell browsers how long your content can be cached: Use an Expires header to indicate that a specific component can be held in cache until a certain date, and repeat visitors will enjoy much faster load times.
  9. Compress your images: Always be sure to compress your images before saving, even images in Flash files.
  10. Compress components: Use the Gzip protocol to tell web servers to compress your site's components for faster loading.
  11. Be careful with banner ads: Banner ads can add to your load time and cut down on the effectiveness of your site.
  12. Place stylesheets in your document HEAD: Put your stylesheets on top, and you'll let your page render progressively, giving users visual feedback that the page is loading.
  13. Use CSS: If you've got your styles on an external .css file, they can be cached for faster loading.
  14. Move scripts to the bottom: With scripts, progressive rendering is blocked on all content below the script, so it's best to leave them until the end so that all other page elements have a chance to load.
  15. Avoid nested or full page tables: Tables that are nested or take up a whole page will take longer for the browser to load while it works out the layout.
  16. Be careful with CSS expressions: If you use CSS expressions to dynamically set your properties, you may be asking browsers to evaluate expressions a number of times during any given browsing session. To cut down on this problem, you can either eliminate them, or just use one-time expressions.
  17. Choose the right image format: Use JPEGs for photographs and true-color, GIFs for flat-color images, and PNG when you need more color support than GIF.
  18. Fragment your pages: If you have a huge page full of content that could potentially be broken up, split them up into multiple short pages that will load faster.
  19. Move your JavaScript and CSS off-site: If you have your JavaScript and CSS inlined with your HTML, they'll be downloaded every time a browser requests the HTML document, but if they come from outside, they'll be cached, and thus load faster.
  20. Put a slash at the end of your links: Make it easy for the server to figure out that it's loading a directory page, and it will load faster.
  21. Clean up your code: When using WYSIWYG editors, you'll often find that it adds useless code, like empty tags. Get these out of your code, and you'll move along faster.
  22. Cut down on DNS lookups: Every unique hostname on your page requires a DNS lookup, so be aware of how many different hostnames you have in your images, scripts, objects, and other components.
  23. Provide height and width tags: Using height and width tags will tell browsers where everything will end up, and can load components faster.
  24. Clean up your JavaScript: "Minify" your JavaScript code by cutting out unnecessary characters like space, newline, and tab, and you'll improve your response time.
  25. Use the Photoshop "save for web" feature: By using this feature, you can reduce your image file sizes and shave seconds off your load time.
  26. Avoid redirects: Redirects will always slow down users because they have to wait for their browser to find a new page.
  27. Avoid JavaScript as much as possible: JavaScript adds HTTP requests and size to your site, so any time you can cut it out will help your performance.
  28. Cut out duplicate scripts: Although it doesn't sound likely, this does happen. Check your code to make sure that you're not asking browsers to download unnecessary script.
  29. Cut down on image colors: Your image filesizes will be smaller if you have fewer colors in them.
  30. Learn how to properly use ETags: Servers like Apache come with ETags, which when used correctly can be helpful for caching. But if they're not configured properly, they'll slow you down.
  31. Never use images to display text: Cutting down on images this way will reduce your HTTP requests and help you load faster.

Tools

Put these tools to work for testing and improving your site's speed and performance.

  1. Web Page Analyzer: Use this analyzer to test out your speed and performance.
  2. Online Image Optimizer: This optimizer will quickly and easily compress your image files.
  3. Akamai: Akamai offers a number of speedy solutions, specifically content delivery networks.
  4. HTML-Optimizer: This tool will clean up your HTML and script code of dangling tags, missing attributes and broken links.
  5. JSMin: JSMin promises to remove comments and unnecessary whitespace from JavaScript files so they'll load faster. Generally, this tool can reduce your filesize by half.
  6. PageTest: Find out how your page downloads in various speeds from Dulles, Virginia, using this tool.
  7. CSS Tweak: With CSS Tweak, you can optimize your style sheets for better performance.
  8. JPEG Compression Wizard: Shrink your images without damage using this free service.
  9. ShrinkSafe: This Dojo compressor will reduce your filesize using obfuscation, which converts code into more compact, smaller strings.
  10. Tracert: With Tracert, you can monitor your site's performance on speed, DNS, and traceroutes.
  11. mod_gzip: With this tool, you can serve compressed content on an Apache webserver.
  12. CleanCSS: This tool will merge similar selectors, get rid of properties you don't need, and remove whitespace.

References

Check out these articles to get great ideas and guidance for improving performance on your site.

  1. Best Practices for Speeding Up Your Web Site: Take some advice from Yahoo! and learn how to increase your site's speed.
  2. Speed Up Your Web Site Load Time: This article offers formatting tips that will increase your site's performance.
  3. Need Web Site Speed?: Edward Tsai offers lots of suggestions for services, products, and strategies that will get your site moving.
  4. 5 Ways to Speed Up Your Site: Paul Stamatiou offers the methods he used to cut down his bloated webpage to that of 34kb.
  5. Improve Your Homepage Performance Significantly: Take these tips into consideration when evaluating your homepage's performance.
  6. Speeding Up Your Web Page: About.com delivers a number of useful tips for tweaking your site's speed.
  7. The Cost of Banner Advertising on Web Performance: Consider how serving advertising can slow down your site and affect the way users view your site.
  8. 6 Ways to Speed Up Your Site: Follow this article's tips to get your site loading faster.
  9. How to Speed Up Your Webstite: This article offers almost 50 different strategies for reducing your site's load time.
  10. Speed Up Your Site: Web Site Optimization: Jennifer Alvin has lots of great tips for "bandwidth thriftiness."

Share this : digg delicious reddit furl

No responses yet

Apr 16 2008

New Spring promotion from Lunar Pages

LunarPages just launched a really awesome promotion on any 2-Year Basic Hosting Plan that I’d like to share with you – starting today, they are offering a limited time special for $4.95/month. This massive discount is worth $50 off!!

Related Guides

Related Hosts

Share this : digg delicious reddit furl

No responses yet

Apr 16 2008

Reducing locking delays in MySQL

Published by major under Uncategorized

Before getting started, it’s important to understand why MySQL uses locks. In short - MySQL uses locks to prevent multiple clients from corrupting data due to simultaneous writes while also protecting clients from reading partially-written data.

Some of you may be thinking, “Okay, this makes sense.” If that’s you, skip the next two paragraphs. If not, keep reading.

Analogies can help understand topics like these. Here’s one that I came up with during a training class. Consider two people sitting in front of a notepad on a table. Let’s say that a sentence like “The quick brown fox jumps over the lazy dog” is already written on the notepad. If both people want to read the sentence simultaneously, they can do so without getting in each other’s way. A third or fourth person could show up and they could all read it at the same time.

Well, let’s say one of the people at the table is writing a screenplay for Cujo, and they want to change “lazy” to “crazy”. That person erases the “l” in “lazy” and then adds a “cr” to the front to spell “crazy”. So if the other person is reading the sentence while the first person is writing, they will see “lazy” turn into “azy”, then “c_azy”, and then finally, “crazy”. This isn’t a big issue in real life, but on the database level, this could be dangerous. If the person who was reading the sentence showed up during the middle of the letter changes, they would think that the dog was “azy”, and they’d walk away wondering what the adjective “azy” means. To get around this, MySQL uses locking to block clients from reading data while it’s being written and it blocks clients from writing data simultaneously.

Now that we’re all familiar with what locks are, and why MySQL uses them, let’s talk about some ways to reduce the delays caused by locking. Here’s some situations you might be running up against:

Writes are delayed because reads have locked the tables
This is the most common occurrence from the servers that I have seen. When you run a SHOW PROCESSLIST, you may see a few reads at the top of the queue that are in the status of “Copying to tmp table” and/or “Sending data”. On optimized servers running optimized queries, these should clear out quickly. If you’re finding that they are not clearing out quickly, try the following:

  • Use EXPLAIN on your queries to be sure that they are optimized
  • Add indexes to tables that you query often
  • Reduce the amount of rows that are being returned per query
  • Upgrade the networking equipment between web and database servers (if applicable)
  • Consider faster hardware with larger amounts of RAM
  • Use MySQLTuner to check your current server’s configuration for issues
  • Consider moving to InnoDB to utilize row-based locking

Reads and writes are delayed because writes have locked the tables
Situations like these are a little different. There’s two main factors to consider here: either MySQL cannot write data to the disk fast enough, or your write queries (or tables) are not optimized. If you suspect a hardware issue, check your iowait with sar and see if it stays at about 10-20% or higher during the day. If it does, slow hardware may be the culprit. Try moving to SCSI disks and be sure to use RAID 5 or 10 for additional reliability and speed. SAN or DAS units may also help due to higher throughput and more disk spindles.

If you already have state-of-the-art hardware, be sure that your tables and queries are optimized. Run OPTIMIZE TABLES regularly if your data changes often to defragment the tables and clear out any holes from removed or updated data. Slow UPDATE queries suggest that you are updating too many rows, or you may be using a column in the WHERE clause that is not indexed. If you do a large amount of INSERT queries, use this syntax to enter multiple rows simultaneously:

INSERT INTO table (col1,col2) VALUES ('a','1'), ('b','2'), ('c','3');

This syntax tells MySQL to hold off on updating indexes until the entire query is complete. If you are updating a very large amount of rows, and you need to use multiple queries to avoid reaching the max_allowed_packet directive, you can do something like this:

ALTER TABLE table DISABLE KEYS;
INSERT INTO table (col1,col2) VALUES ('a','1'), ('b','2'), ('c','3');
~~~ many more inserts ~~~
ALTER TABLE table ENABLE KEYS;

This forces MySQL to not calculate any new index information until you re-enable the keys or run OPTIMIZE TABLE. If all of this does not help, consider using InnoDB as your storage engine. You can benefit from the row-level locking, which reduces locking in mixed read/write scenarios. In addition, InnoDB is able to write data much more efficiently than MyISAM.

No responses yet