facebook offer button

Website Performance Tutorials

Performance Improvement Tutorial

● Connectivity Issues
In order to troubleshoot such issues you have to check the internet connectivity to your server. Here are some tips:

Run ping and traceroute checks. Compare the results with other sites. Usually results with less than 200 ms are fine and do not indicate problems;

Try working in your control panel (cPanel, Plesk, etc.);

See how fast mails download.

Connectivity affects greatly your site when on it you have:
• Flash animations
• Big graphics
• Huge file downloads
• Video/Audio files
● Application Development Issues
This is probably the most common case for a website being slow.

There are many helpful tools for investigating this problem such as GTmetrix, Pingdom, etc.

Slow / heavy MySQL database queries - such are known to be generated by various popular applications (forums, CMS, e-commerce solutions) and custom scripts.

A MySQL query is considered slow and heavy when it is executed for longer than 1 second. Such queries are not common and that's why they are logged for additional troubleshooting. Every host keeps such logs (when there are any) and should provide them upon customer's request. Once your host provides you with the slow queries log, you will know which MySQL queries are slow. Then you can begin optimizing your code and database. There are many useful resources on the web to get you started but very often this task requires advanced programming skills.

Slow inclusion of remote scripts and resources - This is the case when you include RSS feeds, flash animations, banners and others. When you include remote resources you are already slowing down your site. Sometimes this will have little or no effect (Google Adsense for example), other times it will slow down pages with seconds (RSS news feeds). A good practice is to make sure that the remote resource is not downloaded for each site visit. For example, if you have news RSS feed, you should set a cron to download the news each hour and then include it in your page. Generally, any kind of content caching will help in such cases. Unfortunately, this is not applicable for dynamically loaded content when it is important to have fresh results (gaming servers status queries). In such cases you can do little but to accept this drawback.

Slow inclusion of local scripts and resources - usually this is when your pages are overpopulated with content. Other times there are slow / looping scripts executed, images / animations are loaded incorrectly.

The first case is when a page includes too many articles, chatboxes, weather modules, videos, flash animations, etc. Then, in order your page to load it will execute hundreds of sub-scripts which make many database queries, load content worth megabytes and so on. If you take a look at popular web sites or portals, you will find that most of them are kept as compact as possible. This is because each additional content slows down regardless of how powerful the host server is. This is exactly what we recommend - keep your website as compact as possible. Adding too much content usually just slows down your website and confuses your visitors. Other times there are just buggy scripts making loops, or scripts which are being closed incorrectly and so on. Slow scripts may also include incorrectly resized graphics or try to preload big flash animations. In such cases it is a good idea to try opening images / flash animations outside of your scripts and see how long it takes them to load.
● Incorrect Scalability
The price for extra CPU, Memory and Network bandwidth units has become negligible Still every server has a certain limit to its capacity. Along with that, web applications become more resource demanding by default and their needs grow very fast when the site's popularity increases.

Naturally, any server's capacity can be exceeded if it hosts unstable/unoptimized scripts. Thus, if you have not planned correctly the scalability of your website, there will be slowdowns if not even service interruptions. Estimating the exact needs of your website is very hard because there are no general truths. For example, no one can estimate how much memory / CPU is needed for a forum with 1000 users. An SMF forum with 1000 users and 100 000 posts may perform as good as a vBulletin forum with 2 000 users and 50 000 posts.

To describe it we more precisely we can take the help of an interesting phenomenon called the Slashdot effect. It is observed when a popular website features a smaller one, forwarding an unexpectedly high number of visitors to it. Usually this makes the smaller site totally inaccessible. A similar result can be accomplished by a very aggressive marketing campaign. That's why it is generally wiser to ensure more server resources than your current needs seem to be. This will allow you to develop and grow firmly your online presence while keeping your site stable and fast. When thinking of scalability you have to take into consideration the provided RAM Memory and CPU units. Generally your options are:

Linux shared hosting account & Windows shared hosting account - provides shared server resources to many websites

● Affordable prices;
● Easy to upgrade / downgrade between plans;
● Ease of use with least technical knowledge required

● CPU and Memory units are shared by all users;
● Resource over usage is not tolerated;
● Custom server configurations are not allowed. Such would have effect on all users on the server

Linux reseller hosting account & Windows reseller hosting account

Brings the shared hosting to the next level. The clients get much more server resources to support the increasing demands and stable growth of their own as well as their clients websites

● More server resources - Up to 10 times fewer accounts hosted on the one server compared to the standard shared one; ● Make your presence globally with Brandable cPanel with your Company Logo; ● Ease of use with least technical knowledge required. WHMCS with all plans; ● Extra security & extra resources with Unlimited sub domains, parked domains, FTP accounts, MySQL Databases with all plans

● Higher prices compared to the shared hosting plans; ● Custom server configurations are not allowed. Such would have effect on all users on the server; ● CPU and Memory units are shared by all users

Linux VPS hosting account & Windows VPS hosting account

An innovative technology that allows you to create many virtual systems on a single (or in some cases - more than one) machine

● Dedicated CPU and Memory units;
● Better Performance - guaranteed server resources with the advanced virtualization and multiple machines included in the cloud;
● Easy to upgrade / downgrade between plans;
● Custom server configurations are allowed;
● Affordable Prices - compared to the dedicated hosting solutions

● Higher prices than the shared accounts

Linux Dedicated Servers & Windows Dedicated Servers - preferred by professionals who have better understanding of their sites' needs

● Guaranteed dedicated CPU and Memory units;
● Custom server configurations are allowed;
● Full access to the server configuration;
● Easy Memory upgrades

● Higher prices;
● Advanced skills and knowledge are required to take full advantage of the server;
● Hard CPU and Hard Disk upgrades

● Reduce Execution
To achieve a good website performance it is very important to optimize the number of the executions. The most common cause for excessively high number of executions is either something irregular happening to your website that should be addressed and stopped, or in the better case a legitimate peak in your website traffic, which can also be addressed and handled.

What is an execution?
A simple example of an execution is when a visitor opens your website and your index PHP file is loaded. This counts as one execution. The more visitors your website has, the more executions it will generate. Please note that this is valid only for dynamically generated content. If you open a picture or an HTML page a new execution will not be generated on the server. Executions are counted for the following scripting languages - PHP, Perl, Python, Ruby, etc.

Using Awstats to identify irregularities that cause high number of executions
In order to reduce the number of executions generated by your website you have to identify the source of the issue. Sometimes the high number of executions is not created by high number of legitimate visitors and you may be able to lower it by taking some corrective actions. The best way to do this is to make use of  Awstats tool in your cPanel.

There are three sections in Awstats that you can check to identify a possible issue.

The Awstats Hosts (Top 25) section displays a table of hostnames or IP addresses that have accessed your website. If you recognize an extensive number of visits from a certain IP address or a network, you can block the access to your website from it to prevent a possible DoS attack against your site. For example, if you notice many requests from Chinese IP addresses and your visitors are mainly from Europe then you can block the Chinese IPs to reduce the number of executions.

hosting tutorial

The Awstats section Pages-URL (Top 25) provides you with useful information about which part of your website is most viewed. You should check this section to identify the pages that generate the executions. Below we will talk about the most common execution generators:

hosting tutorial

Chat/calendar or other modules that refresh their content constantly can generate many executions and you will be able to see the executions in this section. For example, if your site uses a calendar module and you see that the calendar.php script has been accessed many times then it is a good idea to disable this module.

Application login pages. Very often sites are abused by bots that try to gain administrative access. If you see many requests to your site's admin login page (Joomla! administrator folder, WordPress wp-admin.php, etc.) you can do two things: o Password protect your administrative folder o Allow access only from certain IP addresses by adding simple .htaccess rules

Comments sections. Very often sites are abused by bots that try to post spam comments. If you see many requests to your site's comments section (WordPress wp-comments.php, Joomla! JComments, etc.) then you should add CAPTCHA that will show an image to your visitors before allowing them to post a comment in order to prevent bot’s requests. There are many CAPTCHA extensions for WordPress, Joomla!, Drupal, etc. that you can use to protect your site's comments section/contact forms.

Robots/Spiders visitors (Top 25). As you probably know, search engines use bots to index websites on the Internet. Those visits to your website are recorded and shown in this category. Sometimes bots generate too many executions and you need to either block the bots or decrease their crawl rate. If you notice too many requests from certain bots than you can change their crawl rate. The way you set the crawl rate depends on the particular bot. For example, you can modify the crawl rate of the Google boat from your Google Webmasters Tools account.

hosting tutorial

web hosting