locked
Increase the number of ETW session buffers and size RRS feed

  • Question

  • Hello!

    Playing with Event Flow Debugger here. I have created an .etl file for a query execution that consumed ~7000 events. When loading the .etl file into Event Flow Debugger, I get a little warning that tells me I've lost some ETW events, and suggests increasing the number of ETW buffers and their size.

    First question: Where do I do this? i suspect this is a system-level property
    Second Question: Is there a way to guesstimate number and sizes?

    Thanks,
    RJFM
    Thursday, January 7, 2010 6:47 PM

Answers

  • Hello,

    You can use different tools to create an ETW session and store the events in an etl file. Two such tools are Performance Monitor and logman.exe. The trace.cmd batch file that comes with the StreamInsight installation uses logman.exe and you can open it with a text editor and see the command line.

    You can use the following commands to start and stop the trace collection:

    logman start cep -nb 64 512 -bs 1024 -p {9982d99a-23e7-4ff0-bc52-a7ca038e8318} 0x50 -o myfile.etl -ets

    logman stop cep -ets


    The two numbers after “-nb” specify the minimum and maximum number of buffers. The number after “-bs” specifies the buffers’ size in KB.

    You can find a complete command-line reference for logman.exe here:
    http://technet.microsoft.com/en-us/library/bb490956.aspx

    The Performance Monitor GUI tool comes with all Windows installations. You can use it to start a new “Data Collector Set” under “Event Trace Sessions”. If you open the properties of the new Data Collector Set you can find the buffers’ settings on the “Trace Buffers” tab.

    There is no good way to estimate the ideal numbers for ETW buffers’ count and size.


    Regards,
    Tiho
    MS StreamInsight Team

    Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights
    • Marked as answer by Rafael.F Thursday, January 21, 2010 4:59 AM
    Thursday, January 21, 2010 3:27 AM

All replies

  • Hello,

    You can use different tools to create an ETW session and store the events in an etl file. Two such tools are Performance Monitor and logman.exe. The trace.cmd batch file that comes with the StreamInsight installation uses logman.exe and you can open it with a text editor and see the command line.

    You can use the following commands to start and stop the trace collection:

    logman start cep -nb 64 512 -bs 1024 -p {9982d99a-23e7-4ff0-bc52-a7ca038e8318} 0x50 -o myfile.etl -ets

    logman stop cep -ets


    The two numbers after “-nb” specify the minimum and maximum number of buffers. The number after “-bs” specifies the buffers’ size in KB.

    You can find a complete command-line reference for logman.exe here:
    http://technet.microsoft.com/en-us/library/bb490956.aspx

    The Performance Monitor GUI tool comes with all Windows installations. You can use it to start a new “Data Collector Set” under “Event Trace Sessions”. If you open the properties of the new Data Collector Set you can find the buffers’ settings on the “Trace Buffers” tab.

    There is no good way to estimate the ideal numbers for ETW buffers’ count and size.


    Regards,
    Tiho
    MS StreamInsight Team

    Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights
    • Marked as answer by Rafael.F Thursday, January 21, 2010 4:59 AM
    Thursday, January 21, 2010 3:27 AM
  • Thanks Tiho!
    Thursday, January 21, 2010 4:59 AM
  • Hello,

    You can use different tools to create an ETW session and store the events in an etl file. Two such tools are Performance Monitor and logman.exe. The trace.cmd batch file that comes with the StreamInsight installation uses logman.exe and you can open it with a text editor and see the command line.

    You can use the following commands to start and stop the trace collection:

    logman start cep -nb 64 512 -bs 1024 -p {9982d99a-23e7-4ff0-bc52-a7ca038e8318} 0x50 -o myfile.etl -ets

    logman stop cep -ets


    The two numbers after “-nb” specify the minimum and maximum number of buffers. The number after “-bs” specifies the buffers’ size in KB.

    You can find a complete command-line reference for logman.exe here:
    http://technet.microsoft.com/en-us/library/bb490956.aspx

    The Performance Monitor GUI tool comes with all Windows installations. You can use it to start a new “Data Collector Set” under “Event Trace Sessions”. If you open the properties of the new Data Collector Set you can find the buffers’ settings on the “Trace Buffers” tab.

    There is no good way to estimate the ideal numbers for ETW buffers’ count and size.


    Regards,
    Tiho
    MS StreamInsight Team

    Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights

    I think to use the command line is more convenient and fast. You really give a detailed and useful introduction on the parameters. Thanks.
    Saturday, June 26, 2010 2:29 PM