Windows 內存分析之路
How to use Resource Monitor
人之所以區別於動物就在於使用工具,同樣,在某種程度上說,在正確的時候使用正確的工具,確實可以提高程序員的生產率。最近在網上看到一篇Resource Monitor的使用的文章,覺得對大家可能會有用處,於是把重點的部分翻譯出來,和大家分享,不足的地方歡迎指正。
Resource Monitor - Memory tab (Click the image to enlarge.)
Let’s see what metrics are available with regard to memory on this Windows server.
Processes section
The Memory tab’s Processes section displays key metrics related to how the system’s processes use memory. Here’s information about the metrics:
•Image. Process executable file name. This is the name of the process that is actively using the disk.
進程可執行文件名,正使用內存的進程名。
•PID. Process ID. This is the ID number associated with the process; it is useful if you want to use other utilities to manage processes, or if you want to easily match up processes with Task Manager.
進程ID。和這個進程關聯的進程ID;這個非常有用,如果你想要使用其他工具管理進程,或者需要方便的和task manager 一起使用。
•Hard Faults/sec. A hard fault doesn’t necessarily indicate a critical error condition, though it may indicate that the server is in need of more RAM. A hard fault occurs every time the system uses the swap file on the disk. This is important because disk storage is much, much slower than RAM, so each time the system uses disk-based virtual RAM, there is a significant performance penalty. If you see hard faults on a regular basis (especially if the numbers are large), you should consider adding more RAM to the server. Hard faults are sometimes referred to as Page Faults.
Hard Faults/sec. hard fault並不一定是嚴重的錯誤,但是他可能說明服務器需要內存。每次系統使用硬盤交換文件的時候產生hard fault,這很重要,因為硬盤比內存慢很多,所以當系統使用基於硬盤的虛擬內存的時候,就會有明顯的性能損失。如果你總看到規律的hard fault 你應該考慮給服務器加內存了,hard fault 有時被稱為Page Faults。
•Commit (KB). This is the total amount of physical and virtual memory (page file) that is committed to this specific process.
每個進程提交的虛擬內存總量。
•Working Set (KB). This is the amount of physical memory that is committed to this particular process. This number should be the total of the next two metrics, which are its components.
每個進程提交的物理內存總量。= Shareable+ Private。
•Shareable (KB). This is the total amount of physical memory that is committed to this particular process but that can also be shared with another process.
每個進程提交的物理內存總量,可以和其他進程共享的部分。
•Private (KB). This is the total amount of physical memory that is committed to this particular process but cannot be shared with another process.
每個進程提交的物理內存總量,不可以和其他進程共享的部分。
Physical Memory
Below the Processes section, you’ll see a section called Physical Memory that contains this information:
•In Use. The amount of memory that is in use right now.
正使用的內存總量。
•Available. Of the total physical memory in the system, this is how much is still available for allocation.
剩余的物理內存總量。
•Hardware Reserved. This identifies the amount of memory that various hardware devices have set aside for their dedicated use. Almost any device in the server can add to this metric. This Exchange Server clocks in at 1MB.
硬件保留的物理內存。
•Modified. As information is written into memory pages, it stays there while other processing goes on behind the scenes. As information is updated on these memory pages, those pages are marked as having been modified. After a period of time, in order to ensure that the system makes the best use of available memory resources, modified pages that have not been accessed in a while might be moved to the standby category.
由於信息被寫入內存頁,當其他處理進行的時候他就在那。由於那些內存頁的信息被更新了,那些頁面被標記為已更新。過一段時間,為了使系統最好的使用可用內存資源,如果被更新的頁面在一段時間不被訪問,可能被移動到standby目錄中。
•Standby. This memory contains cached data and code that is not actively in use but that may be called into action at some point. Windows manages this class of RAM by prioritizing each page that comes in. As other processes need RAM, low priority pages from this pool are reallocated to other needs.
這些內存包含緩存數據和代碼,雖然現在沒有被使用,但是在將來的某個時刻可能會被使用。Windows管理這些內存,在他們進入的時候就標記上優先級。當其它進程需要內存的時候,這個池中的低優先級的頁被分配做他用。
•Free. This value is how much RAM is currently available above and beyond what is in use. You might think that having such a small amount of RAM marked as free in this 16 GB system might identify a major problem, but that’s the case. With many of Microsoft’s newer products, it’s better to use as much RAM as possible than to leave it idle. Products such as Exchange use RAM to its fullest extent and cache portions of the product for faster access.
空閑內存。
One common mistake it to use the “In Use” and “Available” metrics as the sole indicators for overall system health and to get concerned when particular processes appear to be eating too much RAM. This is why you need to understand how the application is supposed to behave.
For example, Exchange 2010 often uses as much memory as you can throw at it; this is by design. The thinking is that Exchange will use RAM to cache as much information as possible in order to improve overall performance. So it’s important to look at other metrics, such as Hard Faults, to determine if there is a really a RAM-related performance issue on an Exchange 2010 machine. If a service shouldn’t be using a lot of RAM and it is, you need to do more troubleshooting; this is the point at which you might fire up Performance Monitor to gather more specific details.
Conclusion
Throughout this four-part series on Resource Monitor, I hope you learned new ways to monitor your Windows Server systems using a free, easy to use tool that Microsoft built to help administrators solve performance-related issues.
原文地址:
http://www.techrepublic.com/blog/datacenter/use-resource-monitor-for-memory-monitoring/4927