|Windows IIS optimization|
How can we improve performance?
We have a Windows server with probably 10,000 unique visitors/day on a number of sites. The performance is inconsistent in terms of serving up pages. We run SQL Server and an email server on the same machine.
What suggestions could you give for figuring out how to make the server run faster (assuming that we are optimizing the website code itself as much as possible)? Do you think we should consider moving either SQL Server or the email server to a different server?
Welcome to WebmasterWorld howlegh!
|We run SQL Server and an email server on the same machine. What suggestions could you give for figuring out how to make the server run faster (assuming that we are optimizing the website code itself as much as possible)? Do you think we should consider moving either SQL Server or the email server to a different server? |
Yes, remove Email and SQL from the Web Hosting machine. Those should be separate for just the reasons you bring up.
You could also look at Cache Control and HTTP Compression.
http compression will overtax an already taxed server. It requires anywhere from 25-50% more CPU utilization on dynamic content.
10,000 visitors a day breaks down to about 7 visitors every minute. Triple that based on the fact most people are likely there in some common 8 hour window. So 21 visitors every minute, and maybe each of them requests 3 pages for that minute. So your server could be serving up 1 page every second on what I would say would be towards the higher end to probable.
If your server is slowing down with this traffic, I'd take a better look at your code as I think you'll find there are some overly complex, or un-optimized queries.
What kind of hard drive set up to you have on this box? Are the things you talked about (web server, exchange, sql) all contending for resources on the same drive?
If you've got MSSQL installed on the same system you'll need to customize the memory settings SQL uses. SQL server will consume all available system memory over time if you let it. IIS and SQL server can coexist on the same system and be much faster than accesses over a 100 base t network. ADO using named pipes to the same server is faster than ODBC/SQLOLEDB over a LAN.
This is all very dependent on a number of hardware factors. If you're on a single processor/single core system you are better off splitting IIS and SQL to two different computers. If you have a multicore/multiprocessor system you should be able to have both coexist and perform well assuming your drives aren't a bottleneck. Websites should be on a different drive/array than the SQL databases.
Ideally you would have SQL databases, index files, log files and full-text indexes all on different drives/arrays. 4 drives/arrays for SQL and one for your website content and another one for the operating system and SQL Server Executables. (Six drives/arrays total.) This isn't possible on many systems which will force you to go the multiple server route.
However, with 10k uniques per day you should be able to configure a single server to handle this kind of load assuming all 10k don't access the server in the same hour.
There are some excellent MSDN Technet articles out there about using Performance Analyzer to figure out what hardware resource is blocking your server from performing quickly. I used to run a quad Pentium Pro 200 MHz Compaq server with three drive arrays and handle 30k uniques per day on IIS5 running ASP.
Also, turn off IIS logging if you don't need it. On a busy site IIS's logging can lead to random slowdowns as the log is flushed from memory to disk.
I am running the same setup (Windows, SQL Server, mail server) on a single box. Classic asp. With 10K users per day on classic asp website, plus 20 or so other sites, server is just fine. And this is an entry level single CPU machine.
Throw in .NET, and you have troubles, I am now about to convert to a more powerful box because of the resources .NET and .NET websites take, although they don't even begin to approach the same traffic asp websites do.
Perl is also consistently bad in this setup (just my experience)
Check your code, find and eliminate bottlenecks.
Performance issues are *highly* application dependent. What does your ASP app do? Does it use the database alot? How big is the database? What are the hardware specs? If there are 10,000 visitors, how many pageviews are there? How are you so sure the app is fully optimized?
Use Perfmon to monitor your CPU, memory and physical disk utilization over time. When watching the disk, you care about Average Disk Queue primarily.
Once you see what stats are spiking, figure out what is causing it. In the case of processing, you need to determine if it is IIS/ASP, SQL, or some other process.
If disk queues are consistently high, you need to figure out where the read or write contention is.
The best advice is to move SQL and email off of the web server - I think someone else already noted that.