If I buy a server on which I'll be able to put as much RAM as I want, how much RAM can I make available for my asp.net web app using the latest versions of everything?
Reason I'm asking is that I plan to use InProc session to its full potential.
Thanks.
Any process on a 32-bit Windows Server is limited to 2GB unless you have set the /3GB switch in your boot.ini file, in which case a process can use 3GB.
If you're using a 64-bit server you will be limited by what the server can offer.
See Memory Limits for Windows and Windows Server Releases.
You may also need to increase the Max memory the application pool in IIS can use.
Also see the maximum memory allowed for w3wp worker processes on 64-bit IIS.
Are expecting a heavy load on the server? Had you thought about using the database to store sessions, or MVC .Net with no session state?
Increasing the memory to 6 GB or more on the server won't help because 4 GB is the
maximum for addressable memory for Win-32. You would have to go to Win 64 in
order to add more memory to the server configuration.
If its a dedicated is box, you can try running with the 3GB switch,
which would allow the asp.net to use up to 3GB.
You should also check what your current max memory is set to...!?
Related
I have a Windows Server 2012 R2 with 128Gb of memory and INtel Xeon E5 2650 v3.
Any time the memory usage for the App Pool goes close to 2.4Gb (according to Task Manager) I'm starting to get Out of memory exceptions and I have to recycle the app pool.
The Virtual Memory Limit is set to 0 for this app pool.
The overall server memory usage is always under 25%.
How do I increase the app pool memory limit?
How do I make it so that is not running as 32-bit application? Is this happening because I enabled Enable 32-bit applications? I actually need this because I have a managed assembly which is 32-bit only.
What is other solution for this? Don't say check your code, I need for certain cases that memory usage amount.
Thx
32 bit applications can address a maximum of 2 GB. Also see https://msdn.microsoft.com/en-us/library/windows/desktop/aa366778(v=vs.85).aspx
We have a small (for now) Asp.Net MVC 5 website on a dedicated VPS. When I go to the server and fire-up task manager, I see that "SQL Server Windows NT - 64 bit" is using around 80% of CPU and 170MB of RAM and IIS is using 6% CPU and 400MB of RAM. Server Specs are:
CPU 1.90Ghz dual core
Memory 2GB
Windows Server 2012
SQL Server Express 2012
Disk Space: 25GB, 2.35 Free.
The database is not very big. Its backup is less than 10MB.
I have tried to optimize the website as much as I could. I added caching to a lot of controllers and implemented donut caching for quite a lot of controllers. But today, even though there were only 5 users online, our search wouldn't work. I restarted the Windows on the server and it started working but I got the high CPU usage the minute server started. Interestingly when I open the SQL Server Management Studio and try to get the report for top CPU-consuming queries it says that there are no queries currently consuming any CPU!!! But at the same time I can see that SQL server is consuming a lot of CPU. How can I examine what is taking all the CPU? Below is a picture from the server:
I was/am very careful with designing and implementing the website. All the database access is through latest version of Entity Framework. I just wonder if the server's specs are low. Any help would be very much appreciated.
Update:
Here's the result of the sp_who2 stored procedure.
This could happen if the memory set to use is more than the available memory on the box. The default memory setting of 2147483647MB. In our case the AWS box had only 30.5 GB so we changed the setting to 26GB and the CPU usage fell to 40%. You generally want to leave 20% of memory for OS and its operations.
I would agree running SQL Profiler to spot large query durations and large write operations. Try running perfmon and spotting any potential connection leaks (reclaimed connections).
We're running into a strange problem. Our ASP.NET application is running on 64-bit Windows 2008/IIS7 machine with 16Gb of RAM. When w3wp.exe process reaches 4Gb (we track it simple via Task Manager on the server) - Out of Memory exeption is thrown even though there's a plenty of memory still available.
Is there a known issue were ASP.NET process is limited to 4Gb of memory on 64bit system (and using 64bit app pool)?
Is there any way to lift that limit?
It kind of sounds like you have an undisposed resource somewhere that ends up getting garbage collected eventually, but not quickly enough for your needs. Do you reuse any SQLConnection objects? Or MailClient objects? Or unmanaged Image objects?
As for the lower-than-expected memory limit, there are two types of memory use by a ASP.NET app. One is reserved memory and the other is actually used memory. I believe the task manager tracks actual memory use, but reserved memory probably also has a limit. To find out how much reserved memory your process is taking up, go to IIS7, click on the server (the top level, above app pools and sites folder), then click the Processes option and then click your app's process. It should show you CPU use, number of requests and memory usage (both reserved and actual).
I have my IIS 6 running my website. It is on a Windows Server 2003 which has 4GB of RAM. I run SQL intensive code after the user submits a form (math statistics stuff). This process is not threaded (should it be, especially if 2 or more users run the same thing?). But my process seems to consume only a couple of GBs of memory and the server crawls. How do I get my IIS process to use nearly all the memory?
I see on other sites that its 2GB or 3GB allocated using boot.ini. But is there another way for the process to use memory? If I make it multithreaded, will there be a process for each thread?
If there is still memory free for IIS, it does not need more. Even if you give it more memory it will perform better. It is good to see some memory is not used and can be used for other processes as IIS. If you want to make is multi threading, it depends on what you do parallel if more memory is used, and if you gain any performance.
The basic here is to start with your requirements and see what peak use you can have. Then make a performance test to see if your machine can handle that load. To be sure you can handle some more do an other test to see the peek load your machine can handle. Then you will know if you have to invest any more time.
Check you database server to see if you bottleneck is not on that machine, most developers forget optimizing and maintaining their databases.
We are running an ASP.NET app on a web server with 4GB+ of memory in IIS 6. After reading many articles, it states that we need to set the "maximum memory used" for the Application Pool to 800mb to eliminate the "out of memory exceptions" that are happening for us. However, what should the "maximum virtual memory" in the Application Pool be set to? I can't find information as to what that should be set to.
The first thing you need to cover is whether you need so much memory in a web application. Our experience tells that a web application should use a reasonable amount of memory. That eliminates out of memory exception forever.
We usually recommend 1024 MB virtual memory as the max virtual memory usage for a pool on x86 machine.