how to analyze and reduce website server load

Once you have your website established and running properly it may be time to take a look at your server load and loading times. Take a look at the following points you will find scripts, tips, and tools you can use to decrease your website’s server load.

Move your Javascript files to the bottom of your page

When a browser goes to download CSS, scripts, and images from your site, it usually has a maximum amount of information it can stream at once. By placing the scripts at the bottom of our page, we can allow the essentials to load first and then load the scripts at the end.

Compress your Javascript

By compressing and removing the whitespace from your scripts, you can greatly reduce their file size, and thus, reduce the overall loading time of your website. Some minifies are: Javascript Compressor, YUI Compressor or JSMin

Compress your CSS files

Use this utility to compress your CSS to increase loading speed and save on bandwidth as well. You can choose from three levels of compression, depending on how legible you want the compressed CSS to be versus degree of compression.

Use CSS sprites

The origin of the term “sprites” comes from old school computer graphics and the video game industry. The idea was that the computer could fetch a graphic into memory, and then only display parts of that image at a time, which was faster than having to continually fetch new images. The sprite was the big combined graphic. CSS Sprites is pretty much the exact same theory: get the image once, shift it around and only display parts of it, saves the overhead of having to fetch multiple images.

Split up your data across different domains

If you are running a larger site that brings in a medium to large amount of visitors, you might consider placing your static information and data (such as images for your posts) on another domain. For instance, you could have all of you main HTML and necessary files of yoursite.com and all of your images and videos on images.yoursite.com. This way, you are maximizing the amount of parallel downloads you can have.

Use the Google Ajax libraries

The Google AJAX Libraries API is a content distribution network and loading architecture for the most popular, open source JavaScript libraries such as jQuery, jQuery UI, Prototype, script.aculo.us, MooTools, Dojo, SWFObject, Yahoo! User Interface Library (YUI),Ext Core, Chrome Frame

Reduce your HTTP requests

Open up your favorite code editor and have a look at the HEAD section of your page. Are there some scripts you can combine into one? What about all of those CSS files? Is there anyway they could be reduced some? Ask yourself these questions and inspect your website, take a good look at how many different requests your site needs to make for scripts and such and try to reduce this number if possible.

Use GET when using AJAX

The Yahoo developers found that when using a POST request and AJAX, that it requires a two step process. GET on the other hand usually transfers the packet all at once.
http://developer.yahoo.com/performance/rules.html#ajax_get

Remove any 404s
HTTP requests are expensive so making an HTTP request and getting a useless response (i.e. 404 Not Found) is totally unnecessary and will slow down the user experience without any benefit.

Declare height and width tags in your html

When you use images or tables on your pages you should always include the height and width tags. If the browser does not see those tags it will need to figure the size of the image, then load the image and then load the rest of the page. When the height and width tags are included the browser will automatically know the size of the image. As a consequence it will be able to hold a place for the image and load the rest of the page contemporaneously.

Ok now, after the suggestions above let’s go to see some tools can help you to analyze the web server load

Use YSlow for Firebug

YSlow is a Firefox add-on that integrates into the firebug web development tool. YSlow analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages. YSlow is a Firefox add-on integrated with the Firebug web development tool. YSlow grades web page based on one of three predefined ruleset or a user-defined ruleset. It offers suggestions for improving the page’s performance, summarizes the page’s components, displays statistics about the page, and provides tools for performance analysis, including Smush.it™ and JSLint.

Use SmushIt for your images

It uses image format specific non-lossy image optimization tools to squeeze the last bytes out of your images – without changing their look or visual quality. You’ll get a report of how many bytes you can save by optimizing your images and all the changed images as a single zip for download.
You can use Smush.it as a Firefox add-on, or you can simply go to their site and use the uploader that is provided.

Pylot

Pylot is a free open source tool for testing performance and scalability of web services. It runs HTTP load tests, which are useful for capacity planning, benchmarking, analysis, and system tuning.

Webload

Webload is another completely open source load generation engine. Webload is one of the most widely used software products for developers looking to optimize their sites, so it makes sense to mention it here.

Site-Perf

Site-Perf is an online tool that emulates natural browser behaviour downloading your page with all the images, CSS, JS and other files – just like a regular user.

Web Page Analyzer

Web Page Analyzer free web site speed test to improve website performance. Enter a URL below to calculate page size, composition, and download time.

That’s all till now, hope you found some useful suggestions to improve the performance of your websites.

Reference Links:

  • http://developer.yahoo.com/performance/rules.html
  • http://www.websiteoptimization.com/secrets/performance/
  • http://www.webhostingsearch.com/articles/how-to-decrease-website-server-load.php
  • http://javascriptcompressor.com/
  • http://developer.yahoo.com/yui/compressor/
  • http://www.crockford.com/javascript/jsmin.html
  • http://www.cssdrive.com/index.php/main/csscompressor/
  • http://css-tricks.com/css-sprites/
  • http://www.alistapart.com/articles/sprites
  • http://www.dailyblogtips.com/speed-up-your-site-use-the-height-and-width-tags/
  • http://code.google.com/intl/it-IT/apis/ajaxlibs/
  • https://addons.mozilla.org/en-US/firefox/addon/5369
  • http://developer.yahoo.com/yslow/smushit/
  • http://www.pylot.org/
  • http://www.webload.org/
  • http://site-perf.com/
  • http://www.websiteoptimization.com/services/analyze/
  • Advertisements

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out /  Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out /  Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out /  Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out /  Change )

    Connecting to %s

    %d bloggers like this: