您的位置:首页 > 其它

Detecting Memory Bottlenecks (检测内存瓶颈)

2014-03-04 11:13 204 查看

Detecting Memory Bottlenecks http://technet.microsoft.com/en-us/library/cc749872.aspx
The Virtual Memory Manager moves pages of code and data between disk and memory in a process calledpaging.

小结:paging是对虚拟内存来说的。

Paging is essential to a virtual memory system, although excessive paging can monopolize processors and disks.

【】过度的移动页面有可能独占处理器和硬盘。

A page fault occurs when a program requests a page of code or data is not in itsworking set (the set of pages visible to the program in physical memory).

A hard page fault occurs when the requested page must be retrieved from disk.

A soft page fault occurs when then the requested page is found elsewhere in physical memory.

Soft page faults can be satisfied quickly and relatively easily by the Virtual Memory Manager, but hard faults cause paging, which can degrade performance.

软页故障可以快速的解决,但是硬故障引起的分页,有可能减低机器性能。

Each page in memory is stored in a page frame. Before a page of code or data can be moved from disk into memory, the Virtual Memory Manager must find or create a free page frame or a frame filled with zeros. (Zero-filled pages are a requirement
of the U.S. Government C2 security standard. Page frames must be filled with zeros to prevent the previous contents from being used by a new process.) To free a page frame, changes to a data page in the frame might need to be written to disk before the frame
is reused. Code pages, which are typically not changed by a program, can be deleted.

内存里的每个页面都是存在一个页框里的。在一个页面的代码或者数据有可能被移到内存之前,虚拟内存管理器必须找到或者创建一个空闲页框或者被置成零的页框(。。。),去腾出一个页框为了其他所有之前,页框里数据页的改变需要先被写到硬盘上。

The paged pool holds objects that canbe paged to disk.

The nonpaged pool holds objects thatnever leave main memory, such as data structures used by interrupt routines orthose which prevent multiprocessor conflicts
within the operating system.

Memory Counter
Description
Page Faults/sec
How often is data not found in a process's working set?

This includes both hard page faults, which require disk I/O and soft page faults where pages are found elsewhere in memory.

If requested code or data is repeatedly not found, the process's working set is probably too small because memory is limited.
Pages Input/sec
How many pages are being retrieved from disk to satisfy page faults?

Compare with Page Faults/sec to see how many faults are satisfied by reading from disk, and how many come from somewhere else.
Pages Output/sec
How many pages are being written to disk to free up space in the working set for faulted pages? Pages must be written if they were changed by the process.

A high rate indicates that most faulting is data pages and that memory is becoming scarce. If memory is available, changed pages are retained in a list in memory and written to disk in batches.
Pages/sec
Sum of Pages Input/sec and Pages Output/sec.
Page Reads/sec
How often is the system reading from disk because of page faults? How much is page faulting affecting the disk?

The primary indicator of a memory shortage. Some page reads are expected, but a sustained rate of 5 pages per second or more indicates a memory shortage.

Counts how often the disk is read, regardless of the number of pages per reads. The number of pages exceeds the number of reads when more than one page is read at a time.

每秒钟有几次读操作(read operation);注意:一次读操作可以读若干个pages
(such as 0.3, 1.3个,3个)
Page Writes/sec
How often is the system writing to disk because of page faults?

Counts how often the disk is written to, regardless of the number of pages written.

The number of pages exceeds the number of writes when more than one page is written at a time.

This counter is another good indicator of the effect of paging on the disk.

每秒钟有几次写操作(write operation);注意:一次写操作可以写若干个pages
(such as 0.3, 1.3个,3个)

若内存是连续的,空间足够,一般是数据在内存中改动了足够多了,再一次性写道硬盘上。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: