缓存和内存管理器改进Cache and Memory Manager Improvements

本主题介绍 Windows Server 2012 和2016中的缓存管理器和内存管理器改进。This topic describes Cache Manager and Memory Manager improvements in Windows Server 2012 and 2016.

Windows Server 2016 中的缓存管理器改进Cache Manager improvements in Windows Server 2016

缓存管理器还添加了对真正异步缓存读取的支持。Cache Manager also added support for true Asynchronous Cached Reads. 如果应用程序严重依赖于异步缓存读取,则这可能会提高应用程序的性能。This could potentially improve the performance of an application if it relies heavily on asynchronous cached reads.尽管大多数内置文件系统都支持异步缓存读取一段时间,但通常会由于与处理线程池和文件系统的内部工作队列相关的各种设计选择而导致性能的限制。  While most in-box filesystems have supported async-cached reads for a while, there were often performance limitations due to various design choices related to handling of thread-pools and filesystems' internal work queues.由于支持内核正确,因此缓存管理器现在可以隐藏文件系统中的所有线程池和工作队列管理复杂性,使其更高效地处理异步缓存读取。对于每个 (系统,缓存管理器有一组控件 datastructures,支持最大) VHD 嵌套级别以最大程度地提高并行度。  With support from kernel-proper, Cache Manager now hides all the thread-pool and work queue management complexities from filesystems making it more efficient at handling asynchronous cached reads.Cache Manager has one set of control datastructures for each of (system supported maximum) VHD-nesting levels to maximize parallelism.

Windows Server 2012 中的缓存管理器改进Cache Manager improvements in Windows Server 2012

除了缓存管理器增强功能以读取顺序工作负载的提前逻辑外,还添加了一个新的 API CcSetReadAheadGranularityEx ,以使文件系统驱动程序(如 SMB)更改其预读参数。In addition to Cache Manager enhancements to read ahead logic for sequential workloads, a new API CcSetReadAheadGranularityEx was added to let file system drivers, such as SMB, change their read ahead parameters. 它通过发送多个小型读取请求,而不是发送单个较大的提前请求,为远程文件方案提供更好的吞吐量。It allows better throughput for remote file scenarios by sending multiple small-sized read ahead requests instead of sending a single large read ahead request. 只有内核组件(如文件系统驱动程序)才能以编程方式在每个文件上配置这些值。Only kernel components, such as file system drivers, can programmatically configure these values on a per-file basis.

Windows Server 2012 中的内存管理器改进Memory Manager improvements in Windows Server 2012

启用页面组合可能会减少服务器上的内存使用率,这些页面具有的内容完全相同。Enabling page combining may reduce memory usage on servers which have a lot of private, pageable pages with identical contents. 例如,运行同一内存密集型应用程序的多个实例的服务器或使用高重复数据的单个应用程序,可能是尝试进行页面组合的最佳候选项。For example, servers running multiple instances of the same memory-intensive app, or a single app that works with highly repetitive data, might be good candidates to try page combining. 启用页面合并的缺点是增加了 CPU 使用率。The downside of enabling page combining is increased CPU usage.

下面是一些服务器角色的示例,其中的页面合并不太可能提供很多好处:Here are some examples of server roles where page combining is unlikely to give much benefit:

  • 文件服务器 (大部分内存由不是私有的,因此不可组合的文件页面使用) File servers (most of the memory is consumed by file pages which are not private and therefore not combinable)

  • 配置为使用 AWE 或大型页面 (大多数内存的 Microsoft SQL Server 是专用的但不可分页的) Microsoft SQL Servers that are configured to use AWE or large pages (most of the memory is private but non-pageable)

默认情况下,页面组合处于禁用状态,但可以使用 Mmagent.ps1 Windows PowerShell cmdlet 启用。Page combining is disabled by default but can be enabled by using the Enable-MMAgent Windows PowerShell cmdlet. Windows Server 2012 中添加了页面组合。Page combining was added in Windows Server 2012.