Archive

Posts Tagged ‘Performance Optimization’

Speed Optimized Websites Rank Higher with Search Engines

July 16th, 2009
Comments Off

Website performance should not be taken lightly. Now, when I say website performance optimization in general I mean the time that it takes a webpage to fully render in the browser. Many different factors can influence that including the number of files that make your page, the size of the files, whether it renders in standard XHTML or quirks mode, etc. But, for search engines all that matters is the raw HTML output of your site. One of the ways that search engines measure a site’s validity is by measuring the speed it takes it to serve the HTML portion. Yes, raw web server power. Why?

Search engines try to guess which websites out there should gain more respect than others, one characteristics is speed. If you think of it, the speed it takes to serve a page reflects how much the owner invested in it and hence reflects on the ranking that it should get in a backwards way. In other words, a site that is served on a dedicated server with serious horse power should get higher rankings than a site that is served on the cheapest shared hosting plan. Another fact is that major search engines researched user return rate and have found that the return is higher for faster sites and even microseconds count. That is why the best search engines focus on speedier results and favor results from faster websites. Really?

google_webmaster_tools_crawl_stats2

Look at the graph above, you will see a direct correlation between the website’s speed and the number of indexed pages. There might be a delay and it is not 100% accurate because the speed is not the only factor here, but over time it seems to have an effect. These graphs are from Google Webmaster Tools, under the crawler stats. Ok, how should I increase the performance of my site?

Here are a few things to consider:

  • Invest in a good hosting package. If you are serious, get at least a VPS with your own IP address (dedicated IP is also a measure). A VPS or a dedicated server will always trump the performance of shared hosting over time. Notice that some shared hosting environments reach 500+ websites on the same piece of hardware.
  • If you use PHP make sure to use APC: Alternative PHP Caching.
  • Always turn on caching at all levels: Apache, PHP, and your application. All levels usually have some sort of a caching mechanism – use it!
  • Research your biggest bottleneck and tackle it, always repeat over time. Just like you do with SEO – it is always work in progress.
  • Look in the logs: every time that your server experiences an error or a warning it has to trigger the error handling mechanism which in most environments require additional resources. Especially unhandled exceptions in ASP.NET/IIS7 environments.

The list is really long and can get very technical but in general you always want to keep website performance optimization in the back of your head. It is well worth it!

What is your experience with speed optimized websites? how did it affect your SEO results?

Performance Optimization, Web Application Hosting, Web Development ,

pdnsd – Decrease DNS response time and save bandwidth

December 25th, 2008
Comments Off

Sometimes, when you realize that you could have improved the system with so little effort, we blush. This is what happened to me when I realized that most of the neworking delays could have been avoided with this tiny but wity utility. I knew that having a local caching DNS or the like is the answer but I did not want to use a full fletched DNS server. I found pdnsd – a small proxy DNS server with permanent caching. Perfect!

In a nutshel, pdnsd is a small utility that caches DNS translations locally on the HD, hence next time the server queries the address the response time is likely to be minimal. Usually, the server has to query your ISP’s DNS or whatever DNS server you specified in the /etc/resolve.conf file. In a high performing web servers you are constantly competing with other packets on the network or your network resources. This is a great advantage. By installing pdnsd you achieve the following:

  • Decrease the average DNS response time sharply!
  • Increase your server performance, especially if this server needs to communicate externally a lot like an eCommerce server which constantly needs to communicate with shipping and credit card servers.
  • Save on bandwidth.

Here is how you go about setting up pdnsd on a CentOS server:

1. Download the latest stable rpm:
go to pdnsd download page and look for your relevant rpm. For CentOS 5.2 64bit I got the latest version as of yesterday:

wget http://www.phys.uu.nl/~rombouts/pdnsd/releases/pdnsd-1.2.7-par_sl5.x86_64.rpm

2. Install the rpm:

rpm -i pdnsd-1.2.7-par_sl5.x86_64.rpm

3. Configure pdnsd to use your current DNS servers:

vi /etc/pdnsd.conf

Paste the following, of-course you should use your DNS servers instead:

server {
label="opendns";
ip = 208.67.222.222,208.67.220.220;
}

4. Start pdnsd and test that it is actually working

service pdnsd start
 dig @127.0.0.1 yahoo.com

If you get the IP, it is working. Notice the response time, if you try again you will see a sharp decrease in response time. My servers’ second response time is almost always between 1-0 ms.

5. Set pdnsd to start automatically on boot

vi /etc/default/pdnsd

Enter the following and save:

START_DAEMON=yes

Also make sure the daemon is set to auto start on boot. I use ‘ntsysv’, you can use chkconfig or whatever you are used to.

6. Set your server to use the pdnsd instead of your DNS servers

vi /etc/resolv.conf

Make sure that the first nameserver line is ’127.0.0.1′. Should look like this:

nameserver 127.0.0.1

7. Restart your network service:

service network restart

How do you know that it is working? try to use any script that needs to go outside to the network, like ‘yum update’. In most cases, you will notice that the second time is much faster. Enjoy!

LAMP: Linux Apache MySQL PHP, Performance Optimization, Web Application Hosting, Web Development , , , ,

Understanding MySQL Query Caching Process

November 5th, 2008

These days, websites are expected to perform. No excuses. I also mentioned before that website performance is key for SEO. Well, one easy thing that can be done is turning on MySQL caching. Most servers ship with MySQL in its default configuration which has caching turned off. There are many resources out there if you search enough, however I have found a presentation by Baron Shcwartz: MySQL Query Cache which explains in detail advanced concepts of MySQL Caching. Here is the slide that summarizes the process of MySQL Query Caching:

LAMP: Linux Apache MySQL PHP, Performance Optimization, PHP/MySQL , , ,

5 Peculiar SEO Tips You Should Know About

October 13th, 2008

The following are tips we have learned to address with any SEO Project in addition to the usual tasks:

1. Investment: the Length of your Domain Registration

Google will always value quality website and quality content. The length of registration that a domain is registered for is one more indicator for Google that a site is here to stay and that its owners have put some efforts into it. This fact is mentioned in the Google patent for its PageRank. In simple words: register your domain for at least 3-5 years for an improved recognition from Google.

See more: Does the Length of a Domain Registration Affect Your Rank?

2. Performance: Fast Sites Rank Higher

Again, if you are serious about your site you will make sure that your users can read your site fast. In some cases it takes some effort to improve a site’s performance, in particular with dynamic content such as a CMS or a Shopping Cart. Make sure to use the right software, apply updates (usually contain performance improvements), and consider tightening up the server’s configuration. A good rule of thumb for serving pages is an average of one second per page or less, with a half a second or less and you are a head of the pack.

See more: Landing page load time now affects keywords’ Quality Scores

3. History: the Age of Sites Linking to Yours Matter

Having incoming links to your sites is what you want. However, it will take time before you will see any significant result. This is because Google measure the age of incoming links to your site and ranks older links with a higher ranking. There is not much here that can be done except make sure that links to your main site remain indefinitely and avoid short term incoming links. Also, if you were considering disposing of an old site that somehow links to your main site – reconsider leaving it as is and letting the links mature like wine.

Many factors are at play here: the age of the domains from which links are pointing to pages on your site, The age of the links themselves, and the age of your own domain. In short, the older the links and domains, the higher the ranking or the rank influence overall.

See more: The Age of a Domain Name

4. Uniqueness: Canonical URL

Every site can decide what is the full URL that it will use. Most sites add the ‘www’ in front of the actual registered domain and some ommit. The dangerous teritory is when sites are dynamically generated, like a DB backed CMS, and links are relative. Hence if a third party linked to your site with the ‘www’ and another third party linked to your site without – it will produce identical content pages with different URLs. From Google’s perspective ‘www.yoursite.com’ and ‘yoursite.com’ are two different URLs. To solve this issue, setup a redirect to your preferred URL – your preferred URL is what is known as Canonical URL.

See more: SEO Advice: URL CanonicalizationCleaning Up Canonical URLs With Redirects

5. Relevance: Google Uses Geolocation to Serve Local Sites

Once more Google is simply trying to do its job: serve pages that are most relevant to you – the search user. Hence, it will retrieve the geolocation for a site and will rank higher local sites to local users. The geolocation data is derived from the IP address. Hence, to get more traffic from Canadian users for example, host your site in Canada.

Peculiar but simple, isn’t it?

Search Engine Optimization (SEO), Web Development , , ,