What makes a website slow?

Most people assume that it's just bandwidth that makes a site slow.

But there are other factors, especially here at WinCustomize. One problem the site faces is that indeed the bandwidth is maxed.

But another problem is that when you have 700 people on at once (like when I type this) accessing the database, the CPUs of the servers can get creamed.

Solving that is a trickier problem. A website like WinCustomize has two major CPU hogging processes:

1) You have the SQL database itself.
2) You have the scripts being run.

There are solutions to all of these things but the problem comes down to time. And as they say, time is money.

One way to solve problems is to have the SQL database on one machine and the scripting on another. This has been the way WinCustomize was and will probably have to go back to doing that. The problem with that is it that creates some database latency when you're going to another machine, even on a 100 base T. So we may have to go back to a 3 machine setup (machine 1 for SQL, machine 2 for scripts, machine 3 for files). And acutally there's a 4th machine involved for handling your Stardock.net accounts.

On scripts, if you can convert them to being DLLs rather than on-the-fly scripts, you can reduce things dramatically. Of course, that makes it tougher to modify them in the future and takes work.

A really effective way to reduce CPU usage is to rely less on dynamically generated pages. WinCustomize could reduce this quite a bit by switching to this in more areas. For example, if we took away the option to let users pick how many skins they see per page, that would let us generate the page once and everyone else would just reload it somewhat easier. Throughout the pages if the material was just generated once when it changed and then just read that would help. But on the other hand, it would make having the site itself "skinnable" (you can customize the way WinCustomize looks) much harder.

WinCustomize itself has evolved over the months to be much more efficient than it used to. And more and more users have come to visit the site since th site's popularity seems largely limited to how many visitors it can handle before it gets too slow.

To become faster, the site will have to continue to be modified so that it hits the database less and the scripts use less CPU power while somehow either getting bandwidth use down or increasing the amount total.
9,151 views 9 replies
Reply #1 Top
The proverbial between a rock and a hard place. All sites strive to get bigger and better but there is always a cost.

Powered by SkinBrowser!
Reply #2 Top
I'm a daily visitor, love WindowBlinds, love Wincustomize !
The site looks really classy, is clever and easy to navigate. Thumbs-up ! Never mind it is a bit slow !
Reply #3 Top
On the site's that I build (in PHP) I use GZip output compression. It envolves putting 1 line in an .htaccess file (Apache only, I believe) and makes it so that instead of a person receiving the actual size of the page (in my case 40kb, usually) they receive a page that has been compressed (a smidge under 6kb) which saves me a lot on bandwidth usage I don't get enough traffic to see if it slows the servers at all, though.

This site, for me, isn't slow at all. Considering the complexity/detail of the layout, it loads at a reasonable speed. However, I've noticed a few bugs such as the inability to change my account's email address since the site never seems to send the email to my new email account with the link in it...

I'm on 256k cable (Rogers@home), by the way.
Reply #4 Top

I am on cable at home and I have a single channel ISDN at work. I have noticed that on the ISDN connection and on my friend's 56k box, the site does take about 20 seconds to load a page, but I think that is more a factor of the number of images that are needed to make the the page look great though.

I am a web site designer and I know the amount of work that a site of this size would entail if you used straight html pages.

However, I believe that some of the speed problems can be solved by having an option for the site skin that would be css based instead of using images.

I can see no reasonable way with respect to the people behind the scenes that would allow the site to load faster that wouldn't entail massive amounts of coding.


BTW, props on a great site.
Reply #5 Top
My opinion is that you can kill the option to let users pick how many skins they see per page and let customization of page be harder.
A number of 10 skins per page is a good average and no one change the way the site look everyday.
The site is slower for a week or so, but always GREAT!
Reply #6 Top
Partial page caching could relieve some of the strain on the cpu and the dbase. Make pages as static as possible.
Reply #7 Top
I have recently been getting messages like this:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC SQL Server Driver][SQL Server]Your transaction (process ID #27) was deadlocked with another process and has been chosen as the deadlock victim. Rerun your transaction.

/msgboard.asp, line 491
Reply #8 Top
One way to speed up the perceived speed of a website is to specify the height and width of everything...

Images, tables, etc.

This can be difficult for tables, but a bit of creative HTML using all of the latest techniques, can have the browser determine what it supports, and degrade some of the fancier HTML quite nicely.

One thing that MS added with IE5.5 is the ability to use expressions for height and width (as well as alot of other things). URL: http://msdn.microsoft.com/library/?url=/workshop/author/dhtml/overview/recalc.asp

In order to send sizes of images without having to look each time, it's helpful to store that information in the database as well.

And of course, some speed could be gained from moving to .NET, but that is quite the undertaking...

Reply #9 Top
hehe, well.. the site is slow also because of the layout: since it is ALL in tables, the complete table has to be loaded before it can be shown.

Ofcouse. a site like this should not be written in asp, but in asp.net. The compiled code that asp.net uses is much much faster. It also provides many more options for speeding things up like caching. I think you could get a 400% speedup without having to modify your layout of flexibility of layout.