Swimminginthought

A place for all things technical and my mind..

Menu
  • About Me / Hire Me
Menu

Is your website slow? Fix It.

Posted on March 21, 2012 by Percy Kwong

Today, almost everybody has a website.  Many are run on a Webserver called Apache.  It’s an amazing piece of software that is ironically free and incredibly secure (when configured properly).

There are plenty of content management and publishing tools out there as well.  WordPress (my personal favorite), Drupal, Movable Type just to name a few.  The problem is when you start to get the traffic and the content starts to grow, you’ll watch your website get slower and slower over time.  This post aims to help people fix these issues.

There are two types of fixes; Hardware fixes and Software fixes.  It is very common for an IT person to simply say, “We need more hardware”, when the answer isn’t always going to be a bigger server.  There are a variety of software tuning strategies one should try before assuming you need to get a bigger server.  This post will address both of these issues, but my concentration on this post will be the software fixes.

For the technically challenged, most content management systems (CMS) have plugins that are available and most definitely, you’ll want to leverage this functionality.

So let’s talk about how to take care of some of these issues:

1. Implement a caching system.  The single most important thing one person can do to make their website faster.  If you’re using WordPress, there are plenty of caching plugins.  Test a few of them out and determine which one suits your needs the best.no

2. If you’re using apache, it too has a built in caching module.  If you’re lucky enough to have plenty of RAM, I would suggest caching some or all of your website in memory.  This is done through apache configuration.

3. Increase the number of processes and child processes.  If you do this in your apache configuration, you’ll see an incredible speed increase.

4. Tune your database and content management system to hit the database less.  Again, this is done through Apache and in some cases, it can easily be done with a plugin on your CMS.

5. Tune your database configuration.  Again, this is an important step.  All databases have a caching mechanism.  It’s up to you to tune it properly as well as threads and maximum concurrent queries.  The better the tuning, the faster your site.  Remember, CMS systems are database backed.  You want to hit the database as few times as possible.

6. Make sure your domain has a good DNS server that is fast.  If it doesn’t, consider outsourcing your DNS to a provider that has an excellent system.

7. Split content into different places.  For example, you can use Amazon’s S3 to serve up your images on your website.  They’ve got the speed, they’ve got the bandwidth, and they’ve got the network infrastructure to do it right.

8.  If you’re one of those incredibly lucky souls to get so much traffic you don’t know what to do with it, you’re at a new level.  I would consider using a content delivery networks (CDN).  Think of a CDN as a cache that has multiple locations throughout the world.  When a visitor comes to your site, they will be redirected to the CDN server that is closest to them.  This lowers latency, load, and most importantly, increases the user experience. 99% of the people out there will never need a CDN.  If you’re serving up lots of videos or audio, you should consider it, but beyond that, a CDN would be used by the likes of companies like CNN, the NY Times, etc.   You get the idea.

9. Examine your graphics formats.  Make them smaller or use formats that are more efficient if you can.  Smaller graphics = faster website load times.

Now, let’s talk about the simple hardware fixes:

1. Increase the RAM on your server.  The more RAM you have, the less you swap in and out of disk.  This is going to give you a significant improvement over what you had, but it may not help you out much if your software isn’t configured properly (See above).

2. Implement RAID.  Again, you’ll need to pick the right RAID setup, but faster disk access = better performance.

3. Change your hard drive.  In an ideal world, you would have an SSD drive.  They’re insanely fast.  If you can’t afford an SSD, consider some of the Hybrid drives out there these days.  They are definitely better than just a plain old hard drive.  If a hybrid drive is out of your price range, just look for a hard drive with better specifications than what you’re currently running.  What you need to look at is seek time and random read write performance.  Also, more heads and platters = better performance.  So do your research.

Hard drives are funny things. Almost ridiculous in the way they work.  Basically, the platters spin under the heads while the heads will scan for the data.  If it finds it, then it will then serve it up.  Don’t get me wrong, there are indexes that tell the heads approximately where the chunks to your file are, but for the most part, it’s a hit and miss process. (Unfortunately, the hard drive will miss the data more of the time than it hits it).  This is why rotational speed is so important.  A 10,000 RPM hard drive is a lot faster than a 5400 RPM hard drive, but most people will buy by price without looking at specifications.  This leads to lost performance. You can still get a good hard drive within your budget if you just simply do a bit of research.

So there you have it.  The basics of how to get your website performance increases.  I’ll be writing an updated technical how-to on the tuning of the website soon.

In the meantime, this should point you in the proper direction.

I’ve written a guide for both the novice and expert alike to help tune your mysql server.

$15.00 [wp_eStore_buy_now:product_id:9:end]

 

If you’re not technical enough to implement any of these things or just need them done properly and in a hurry, consider hiring me.  I can do it for you!

 

3 thoughts on “Is your website slow? Fix It.”

  1. Captain Doughfish says:
    March 31, 2012 at 3:11 pm

    You’re speaking Greek. No comprende. Can you explain some of these things, like how to do it?

    Reply
    1. Percy Kwong says:
      April 5, 2012 at 8:37 am

      I am working on a document that will explain all of the simple details.

      Reply
      1. Percy Kwong says:
        April 30, 2012 at 1:44 pm

        Document is done. At least for the MySQL portion. Sorry it took so long. I wanted it to be complete.

        Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • Kubernetes install gotcha on CentOS-7.x
  • Infrastructure as Code using AWS Cloudformation
  • Does SSL matter? It does and it’s not just web encryption.
  • Apache can’t serve the .well-known directory
  • Cloudy with a chance of Meatballs
  • Resurrection of the Blog
  • Encryption type Matters with Deep Packet Inspection – solved
  • Completely off topic.. Just a personal note.

Recent Posts

  • Kubernetes install gotcha on CentOS-7.x
  • Infrastructure as Code using AWS Cloudformation
  • Does SSL matter? It does and it’s not just web encryption.
  • Apache can’t serve the .well-known directory
  • Cloudy with a chance of Meatballs

Recent Comments

  • Percy Kwong on Boosting Octane Yourself. I did the research, made it, and proved it.
  • Nick Doelman on Boosting Octane Yourself. I did the research, made it, and proved it.
  • Percy Kwong on International Text solutions – A solution
  • Muzahid Ul Islam on The Browser Wars; Which One is Best?
  • Muzahid Ul Islam on International Text solutions – A solution

Archives

  • September 2019
  • August 2019
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • August 2011
  • June 2011
  • March 2011
  • February 2011
  • November 2010
  • October 2010
  • September 2010
  • July 2010
  • January 2010
  • November 2009
  • October 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008

Categories

  • Activism
  • All
  • Amazon S3
  • Announcements
  • Apache
  • Apple
  • Applications
  • Automation
  • AWS
  • Azure
  • Backups
  • Blogging
  • Books
  • Bootcamp
  • CentOS – RHEL
  • Cloud Computing
  • Cloudformation
  • Consulting Advice
  • Craigslist
  • Databases
  • Deep Packet Inspection
  • Doing the right thing
  • e-Book Readers
  • E-Mail
  • EC2
  • energy-efficiency
  • environment
  • Expose
  • firewalls
  • General Observations
  • Hardware
  • Hope
  • Hosting
  • IaC
  • Important things to do in life
  • Infrastructure as Code
  • Kubernetes
  • Linux
  • Media and Encoding
  • Miscellany
  • Mobile Phones
  • MySql
  • Networking
  • Performance
  • Personal
  • pfsense
  • Politics
  • Privacy
  • Redundancy
  • Routers
  • security
  • SPAM
  • Tech that doesn't work like it should
  • Tips and Tricks
  • Tools that work
  • Tout
  • Video
  • Virtual Computing
  • VOIP-Voice Over IP
  • VPN
  • Web Browsers
  • Web Hosting
  • Websites
  • Windows
  • Wordpress

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
©2026 Swimminginthought | Built using WordPress and Responsive Blogily theme by Superb