Share via


Pool 누수가 발생할 때 자료 수집

?????. ??????? ???? ??????.

??? Windows Server 2008 R2 ???? Kernel Memory ? ??? Pool Leak? ??? ? ?? ???? ??? ???????.

??? Xperf? ???? Windows Performance Toolkit? ???? ?? ??? ?? ? Xperf Command? ???? ?? ????.

?? 64bit machine(Windows Server 2008 R2? 2012? ?? ??)??? ????? ? ??? Paging out ?? ?? ?? ?? ?? ?? ??? ?????.

1. wpr –disablepagingexecutive on

2. ?? ?? ???? ?????.

WPT UI by using General Profile

1. Windows Performance Recorder? ?????.

2. Profile ??? Pool usage? ?????.

????? WPR(Windows Performance Recorder)? Memory? ?? ??? ?? ???. ??? ?? ??? ?? ??? ?? ?? ??? ?? ??? ??? ??? ?? ?? ????.

Logging Mode? "File"? ???? ?? Sequential ??? ???? ??? ? ?? Busy? ????? ?? ?? ?? ?? ? ??? ???? ???.

??? ??? ?? ??? ? ? ??? ???? ?? ????.

3. Start ??? ???? Trace? ?????.

4. ??? ???? ?? Save ??? ???? ETL ??? ???? ???? Cancel ??? ???? ??? ?????.

?? ?? Pool usage Profile? ???? ???? ?? ?? Pool Tag? ??? ??? ???? ???, ?? ?? Pool Tag? Leak? ??????

??? ?? Profile? ???? ?? Pool Tag? ???? ??? ????? ? ?? ????.

WPT UI by using Customized Profile

1. ?? ?? ??? PoolTagLeak.wprp ? WPT? ??? ??? ?????.

(?? ??? PoolTag? Leak? ?????. PoolTag? ?? ??? ?????.)

<?xml version="1.0" encoding="utf-8"?>

<WindowsPerformanceRecorder Version="1.0" Author="NTDebugging Blog" Copyright="Microsoft Corporation" Company="Microsoft Corporation">

<Profiles>

<SystemCollector Id="SystemCollector" Name="NT Kernel Logger">

<BufferSize Value="1024" />

<Buffers Value="1024" />

</SystemCollector>

<SystemProvider Id="SystemProvider">

<Keywords>

<Keyword Value="Pool" />

</Keywords>

<Stacks>

<Stack Value="PoolAllocation" />

<Stack Value="PoolAllocationSession" />

</Stacks>

<PoolTags>

<PoolTag Value="Leak"/>

</PoolTags>

</SystemProvider>

<Profile Id="PoolUsage.Verbose.File" Name="PoolUsage" Description="Pool usage Tag 'Leak' " LoggingMode="File" DetailLevel="Verbose">

<Collectors>

<SystemCollectorId Value="SystemCollector">

<SystemProviderId Value="SystemProvider" />

</SystemCollectorId>

</Collectors>

</Profile>

<Profile Id="PoolUsage.Verbose.Memory" Name="PoolUsage" Description="Pool usage Tag 'Leak'" Base="PoolUsage.Verbose.File" LoggingMode="Memory" DetailLevel="Verbose" />

</Profiles>

</WindowsPerformanceRecorder>

2. Windows Performance Toolkit? ??? ? "Add Profile"??? ????? ??? ??? ??? ? ?? ??? ?? ?? Profile? ?????.

????? WPR(Windows Performance Recorder)? Memory? ?? ??? ?? ???. ??? ?? ??? ?? ??? ?? ?? ??? ?? ??? ??? ??? ?? ?? ????.

Logging Mode? "File"? ???? ?? Sequential ??? ???? ??? ? ?? Busy? ????? ?? ?? ?? ?? ? ??? ???? ???.

??? ??? ?? ??? ? ? ??? ???? ?? ????.

3. Start ??? ???? Trace? ?????.

4. ??? ???? ?? Save ??? ???? ETL ??? ???? ???? Cancel ??? ???? ??? ?????.

WPT Command by using General Profile

1. ?? ????? ??? ???? ???? C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\ ??? ?????.

2. General Profile? ???? ??? ???? ??? ?? ??? ?????.

C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\> wpr -start GeneralProfile -start Pool

3. ??? ???? ?? ETL ??? ?????.

C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\> wpr -stop pool.etl "Pool Leak"

4. ??? ???? ? ? Trace? ?????.

C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\> wpr -cancel

WPT Command by using Customized Profile

1. ?? ????? ??? ???? ???? C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\ ??? ?????.

2. ??? Profile? ???? ??? ???? ??? ?? ??? ?????.

C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\> wpr -start PoolTagLeak.wprp

3. ??? ???? ?? ETL ??? ?????.

C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\> wpr -stop pool.etl "Pool Leak"

4. ??? ???? ? ? Trace? ?????.

C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\> wpr -cancel

Xperf Command

1. ?? ????? ??? ???? ???? C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\ ??? ?????.

2. ??? ???? ??? ?? ??? ?????.

(?? ????? Pool Tag? Leak? ?? ???. ?? 1? ??? PoolTag? ????? ????, Proc+Thre ?? + ??? ??? ? ????.)

C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\>

xperf -on Base+CSwitch+POOL -stackwalk PoolAlloc+PoolAllocSession -PoolTag Leak -BufferSize 1024 -MaxBuffers 1024 -MaxFile 1024 -FileMode Circular

3. ??? ???? ?? ETL ??? ???? ?????.

C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\> xperf -d pool.etl

?? ??? ??? ETL ??? ??? ExAllocatePool ??? ???? ?? ???? ????? ????? ?????.

?????.