[转载]LazyWriter(惰性写入器) 进程的作用

 

Q:What Does the LazyWriter Process Do?

The LazyWriter process is a periodic process that checks the status of BPool buffers (committed or not committed)in a cycle and evaluates if it needs to increase or decrease the number of committed buffers according to the memory required by SQL Server and memory available to the OS. This process wakes up every 1 second by default and can also be called by other processes to run more frequently.The LazyWriter is also responsible for updating the SQL Server memory counters in the Performance Monitor.

翻译:LazyWriter 进程是用来循环检测BPool buffers(已提交内存或未提交内存)的状态,在轮询中,依照SQL Server需求的内存与系统的可用内存的情况来评估是否BPool buffers需要增加或减少已提交内存。这个进程默认情况下每隔一秒被执行一次。

Number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers.

翻译:每秒被缓冲区管理器的lazy writer写入的缓冲区数。lazywriter是一个系统进程,其主要任务是成批刷新老化的脏缓冲区(指包含更改的缓冲区,这些更改必须写回磁盘,才能使该缓冲区由其它页重新使用),并使之可由用户进程使用。 惰性写入器消除了为创建可用缓冲区而频繁执行检查点的需要。

当执行 DBCC Memory ,看Buffer Counts项,注意 Target 的值
Target:the target committed count, or how big the buffer pool would like to be. if the target count is greater than
the Committed value, the buffer pool is growing. if the target count is less than the Committed value,the buffer
pool is shrinking. The lazywriter process uses this value to determine whether to grow or to shrink the buffer pool

最后一句很重要,翻译:lazywriter 进程使用target值来决定是否增长或收缩buffer pool(主要指committed中的值)的大小 

posted @ 2014-04-01 09:22  jzb01332  阅读(389)  评论(0编辑  收藏  举报