限制內存機器性能的技巧?IIS 應用程序 (Tips for limit memory machine performance? IIS application)


問題描述

限制內存機器性能的技巧?IIS 應用程序 (Tips for limit memory machine performance? IIS application)

We have WPF client that communicate with the server by web-service. In the thick installation both client + server + sqlserver are installed on the same machine. The machine has 500M RAM.

I will be great full for tips about:

  1. its very difficult to find the bottleneck , because you can use in profiler on such machine without heavy impact on the result. the profiler can cause to page faults due to missing memory and the diagnostic will show irrelevant results.
  2. In the task manger i see that the asp process consume 135M this is too much. I tried to understand why it consume so much and i saw area - undefined. is it the asp process itself? does asp process has a big memory overhead? in this architecture (thick) i don't have multiple clients against the server . do you have any memory advice for it?
  3. the benchmark results has big variety . i think it because page fault. do you have any advice?

Thank you very much. i am from java world , so i am new to it.


參考解法

方法 1:

Download the process explorer and see whats needs the memory. Also check with starts with your server using the autoruns

Now 500M is little memory for a server.

From my experiences the SQL server needs a memory, iis and asp.net needs also memory, but the SQL need more, especial for cache and be fast, and make the indexing and all that. The asp.net is running with out needs of too much memory, but all depends from how you have setup your system, how many pools you have give to asp.net (I believe only one with 500M), how man sites, how many memory you get with your sites and so on.

More about

If its possible, move the SQL to a better server, and all the rest computers connect to this one. The SQL server needs memory.

Second possible, move the sap.net session from memory to sql server.

方法 2:

Limiting the memory use of iis can be done by:

Go to the IIS MMC

->  click Application Pools

->  Right-click the pool 

->  select Advanced Settings

->  go to the Recycling section, you will see there are two settings:

  • Private Memory Limit (KB)  Virtual
  • Memory Limit (KB)

When any of these 2 settings are set, if the worker process exceeds the private or virtual memory quota, IIS will recycle that pool which limits the memory usage.

You can limit the SQL server memory use in the SQL MMC, go to the database servers properties

Overall I would recommend to split the database and the iis server. 0.5gb is not a lot of memory for a server.

(by Avihai MarchianoAristosPeter)

參考文件

  1. Tips for limit memory machine performance? IIS application (CC BY-SA 3.0/4.0)

#ASP.NET #performance #iis #C#






相關問題

System.Reflection.Assembly.LoadFile 鎖定文件 (System.Reflection.Assembly.LoadFile Locks File)

如何在沒有全局變量的情況下一直保留我的變量? (How can I keep my variable all the time without global variables?)

C# / ASP.NET - Web 應用程序鎖定 (C# / ASP.NET - Web Application locking)

關閉模態對話框窗口後 ASP.NET 刷新父頁面 (ASP.NET Refresh Parent Page after Closing Modal Dialog Window)

無法將 NULL 值傳遞給數據庫 (Unable to pass NULL value to database)

wcf:將用戶名添加到消息頭是否安全? (wcf: adding username to the message header is this secure?)

使用 ASP.Net 教初學者 Web 開發的小項目想法 (Small projects ideas to teach beginners web development using ASP.Net)

SQL Server - 分組、擁有和計數 (SQL Server - Group by, having and count in a mix)

企業庫異常處理應用程序塊和日誌記錄應用程序塊在 ASP.NET 中的正確使用 (Enterprise Library Exception Handling Application Block and Logging Application Block proper use in ASP.NET)

來自proc的asp.net多個結果集:是否有必要將結果映射到類?如果是這樣,怎麼做? (asp.net multiple result set from proc: is it necessary to map results to class? If so, how?)

如何在測試工具中實例化 asp.net 代碼隱藏類? (How can I instantiate an asp.net codebehind class in a test harness?)

Web 窗體用戶控制事件,需要在頁面加載後添加 (Web Form User Control Event, needs to be added after page loads)







留言討論