Your users may be experiencing poor performance from your website. There are a variety of reasons why this may be happening, from issues related to how your site was built to internet and network problems. This article describes what you can do to improve the performance of your site, and how you can investigate performance issues that may be beyond your control.
Optimizing your site
Make sure your web documents embody the best practices in web page development. These include, but are not limited to:
- Use semantically-appropriate and valid markup
- HTML or XHTML elements should be used to describe their content. For example, a
blockquoteelement should contain quoted text, and not be used to create a text indentation. Your documents should be validated and (where appropriate) well-formed.
- Use absolute or relative paths
- Use CSS
- Use CSS for controlling the presentation of your documents. External CSS files are cached by the browser, reducing overall page-load times. Do not use HTML tables to control page layout (unless presenting tabulated data) because they significantly increase a document's markup footprint.
You can reduce the file size of media such as images, videos, and music by using compression techniques. Background images, particularly those that are tiled, can usually stand up to extra compression. Make use of separate image thumbnails where large images are not needed.
Templating, functions, etc.
For all sites, enable Page Speed Optimization for the domain.
Optimization, queries, connections, etc.
Your MySQL database might run slowly if it has a lot of "overhead". Overhead is caused by rows being deleted, leaving empty space. The more active a database is, the more overhead there may be. For instance, when Spam Karma sifts through spam comments in WordPress, it creates and subsequently deletes a lot of rows.
You can cleanup overhead with phpMyAdmin. View the Structure of your database in phpMyAdmin. At the bottom, click "Check tables having overhead". Then select the pulldown "Optimize Tables".
You can also cleanup overhead via a shell script and/or cron job. You may want to run a monthly cron job to do this for you. A cron job entry might look like so:
#!/bin/sh /usr/bin/mysqlcheck -o -v -u USER -p PASSWORD -h MYSQL.YOURDOMAIN.COM DATABASENAME;
Replace the items in all-caps with values appropriate for your site.
Data passing between a user agent and a web server traverses the internet by means of a packet switching system that may encompass a dozen or more nodes, depending on the physical locations of the user and the web server.
- Main article: Traceroute
One major reason for poor site performance is when one or more "hops" taken by data packets passing through the internet are obstructed or delayed. Traceroute is often used for network troubleshooting. By showing a list of routers traversed, it allows the user to identify the path taken to reach a particular destination on the network. This can help identify routing problems or firewalls that may be blocking access to a site.
Some users may be suffering from a poorer performance than others. This may be the result of problems with a particular Internet Service Provider (particuarly if it is one of the large Online Service Providers, such as AOL). Network congestion, bandwidth throttling and restrictions, data discrimination and filtering, and even content filtering can all result in poor site performance.
Load, users, uptime, etc.