A Zoomable Interactive Python Thread Visualization

David M Beazley (http://www.dabeaz.com)

A CPU-bound thread and an I/O bound thread competing (OS-X)

The following visualizations show thread scheduling when an I/O-bound thread must compete with a CPU-bound thread. In this test, the I/O bound thread receives and echos a series of infrequently sent UDP packets. Zoom into the green spikes to see how the interpreter switches from the CPU-bound thread to the I/O handler. It's not obvious from the initial picture, but you will see a big difference on multiple cores as you zoom in. You can also view a Linux version of this page.

OS-X, 1 I/O-Thread, 1 CPU-Thread, 1 CPU [ code ]

+ -

Acquired and running Busy Retry

OS-X, 1 I/O-Thread, 1 CPU-Thread, 4 CPUs

+ -

Acquired and running Busy Retry

Test Details

Tests were conducted on the following system:

Take Me To More Visualizations!