Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vyta/dcbbeb3431db2d2670580426bd2eaa15 to your computer and use it in GitHub Desktop.
Save vyta/dcbbeb3431db2d2670580426bd2eaa15 to your computer and use it in GitHub Desktop.
Troubleshooting Performance on Windows w/ Containers

Observation

Approximately 10% increase in CPU usage when running containerized application vs running the application directly on the host

Troubleshooting

Tools & Setup:

  • Windows Performance Recorder: built-in tool to troubleshoot performance related issues on Windows.
  • Application with some CPU consumption (.exe)
  • Same application containerized
  • 2 Windows VM w/ same specs

What I Did

  • Gathered perf data from running app directly on host:

    1. Start trace on host: wpr -start cpu -filemode
    2. Start application (.exe)
    3. Wait 10 seconds before stopping the recorder: wpr -stop trace.etl
  • Gathered perf data from running containerized application:

    1. Start trace on host: wpr -start cpu -filemode
    2. Start application (docker run)
    3. Wait 10 seconds before stopping the recorder: wpr -stop trace.etl

Result:

Double click trace.etl to dig into source of increased CPU usage:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment