Web APP hardware sizing


we host our website on the cloud and want to host it on our datacenter and i'd like to know how to determine the proper hardware to serve our needs what elements should i have and how to determine the CPU power and ram for both web app and database server
the info that i already have for example:
1-.net application connect to SQL server
2-the size of the main page: 3.7 MB
3-the size of the database: 55 GB
4- number of visits per day:70000
5- my manager want to assume that the no of concurrent session 70000 also

so based in these info could i know how much cpu, ram & iops i need and if not what the other metrics do i need.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Let's say each frontend webserver can handle 500 concurrent sessions (assumption since you'd need to test that); that would mean you will need 140 servers. So jeah... I think it might be time to have a word with your manager.

The main dataset you'd be after is the number of active concurrent sessions you currently have at the peak use time.
tedatadcuAuthor Commented:
Hi DrAtomic,

thanks for your comment, what is the server specs that will handled 500 concurrent sessions (CPU & ram) , i Will try to get the accurate concurrent session but let's assume it's 5000 how could i calculate H/W for that. also what about SQL server H/W
Dan McFaddenSystems EngineerCommented:
First, you need to understand the way the app works.  70,000 visits per day is not 70,000 concurrent sessions.  big... HUGE... difference!

So, lets start with a few questions:

1. do you have a current performance baseline?
2. how are your virtual devices (server) configured in terms of resources?  CPU, RAM, Disk?
3. how do you define a visit?  does that mean HTTP hits or 70,000 unique IPs making page requests?
3a. a hit is essentially a file object request
3b. a unique visit is defined as a collection of hits that when assembled by the client, displays a web page.
3c. if this is a web service, then a visit could be a hit
4. is your web application (website) stateful? Does the app maintain persistant session info across requests or not?
4a. if yes, where and how is session state managed?
5.  what version of .NET?
5a. could be a big question... have the DEVs built it out on 64bit yet or not?  Its a memory utilization thing.
6. how often does the web app hit the database?
7. what kind of content is coming out of the database?
8. how big is a typical query result set?

For example, I've run production line-of-business web applications on virtualized servers with 2 CPUs (1 core each) with 4GB RAM in a 5 server web farm with a SQL backend.  It handled, comfortably, 150,000 unique users a day.  If I remember correctly, we never had more than 100 concurrent web sessions.  That being defined as 100 unique clients, simultaneously (to the millisecond) making http requests.

tedatadcuAuthor Commented:
hi dan,

thanks for your answer, is there a tool that i can run on the live system to collect those metrics and after i collect the metrics how can i use them to decide hardware that i buy (cpu, ram , iops)
Dan McFaddenSystems EngineerCommented:
There is no complete, do-it-all-for-you tool.  As I mentioned above, its all about understanding your app.

As for how to collect info and metrics:

1. for the CPU:  you can use CPU-Z to see what the CPU(s) are capable of and save the info in a text/html file
2. for the RAM:  CPU-Z also reports on the RAM
3. IOPS:
3a.  for a web server, this is pretty much not an issue.  Disk speed & capabilities (IOPS if you want) are only an issue on the app's initialization when everything must be read-in and placed into cache. For static pages, cache is king.  For dynamically generated content, caching the common components of the page is important then the question is how fast your queries execute and return results.
3b.  for a database server (or cluster) fast disk is important.  Also extremely important in a high traffic app, is properly configuring your partitions, volumes and database files.  This is an entirely separate topic which can consume pages of recommendations.  But it will also come back to... know your application.
4. metrics... http logs are king.  If you do not have http logging enabled, please turn it on using w3c format and collect all available fields.  Analyzing your http logs will help you better understand what your users are doing (and not doing) at what specific times of the day, how many users are doing something, and how much data your web servers are sending and receiving.  This is where you will find out what your real user activity is and how much data transfer is really occurring.
5.  metrics... creating a performance baseline will also go a long way to helping you size future hardware.  Using Perfmon to collect performance data and then analyzing it is also a must.

So there are 3 categories here...
1. HARDWARE = what does your existing hardware setup look like.  you need to look at your current web server and database server setups.
2. HW PERFORMANCE = this is the perfmon info.  it tells you how well your existing platform (physical or virtual) is utilizing it computing resources
3. USER ACTIVITY = how many users per minute/hour/day/month... are doing what, when they are doing it and how much bandwidth they are consuming.

- Perfmon-ing IIS:  http://blogs.msdn.com/b/friis/archive/2015/01/05/perfmon-amp-iis-asp-net.aspx
- EE question about monitoring: http://www.experts-exchange.com/Software/Server_Software/Web_Servers/Microsoft_IIS/Q_28260780.html
- perfmoin-ing SQL server:  http://www.brentozar.com/archive/2006/12/dba-101-using-perfmon-for-sql-performance-tuning/


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.