Interactive graphical thread and scheduling analysis tool using eBPF.
The goal of feeze is to provide an easy-to-use interactive tool to analyze performance related to scheduling of threads. The focus is on real-time behavior, i.e., finding reasons for performance outliers and fixing these, but it is also a goal to help to improve general throughput.
A picture says more than a thousand words, so let's start with a screenshot of a trace taken while a graphical Java application is running using wayland:
What we see on the left is a list of all threads group by users (fridi is the
user name here), processes and threads. The top shows the time axis in µsec
resolution. Threads that are running are shown as thick green bars, threads
that are waking up or ready to run are thinner and blue while blocked threads
are shown as thin gray lines.
Threads that are waking up blocked threads have a blue arrow from the waking thread pointing to the woken up thread.
Threads that are not active in or around the displayed time interval are collapsed to thin lines such to it is easier to focus on the active threads.
Still experimenting with logos, here are the current drafts
The name was chosen for its Scots meaning to untwist; to unravel, as the end of a thread or rope, which is what the tool is supposed to do with the threads running on your system.
Definition of feeze by wiktionary
From Scots feeze, from Old Scots fize (“screw”, noun), from Dutch vijs (“screw”), from Middle Dutch vise (“screw, windlass, winch”), from Old French vis, viz (“vise, vice”), from Latin vītis (“vine”). Doublet of vice, vise and withe.
feeze (third-person singular simple present feezes, present participle feezing, simple past and past participle feezed) (Scotland)
- (transitive, also with off, on, up) To twist or turn with a screw-like motion; to screw. [from 1806]
- (figurative, by extension) To insinuate. [from 1813]
- (transitive, intransitive) To untwist; to unravel, as the end of a thread or rope.
- (obsolete, transitive, figurative, with at or up) To rub hard; to do a piece of work with passion.
A nice looking cake shop in Japan: フィーゼ.
To clone the repository, do not forget to provide --recurse-submodules:
> git clone --recurse-submodules https://github.com/tokiwa-software/feeze
NYI: Documentation mostly missing
Currently, there is no main control window, but two command line tools that can be started as follows:
> make run
will start the graphical interface that will display the last recorded data. If not data is found, this will wait until some data was recorded via
> make run_recorder
which will record scheduling data using sudo, so you will need sudo rights and enter your password. To see some fine-grain activity, this will start two threads that play high-frequency pthread_cond_signal/wait ping-pong.
Scheduling data will be passed to the graphical tool via shared memory mapped from file /tmp/feeze_events_recorder_data. To record new data, first delete this file using
> rm /tmp/feeze_events_recorder_data
Threads are grouped by their processes.
Each thread is displayed as a horizontal line with the following properties
- thin Gray for inactive threads in and around the displayed area
- thin blue for ready or blocked threads
- think green for running threads
- thick dark green for threads that switch between running/ready/blocked at a time scale below the displayed resolution
Depending on the displayed area and time compression, inactive threads might get collapsed into thin lines.
You have several options to scroll through the display:
- buttons
🠈🠊/🠊🠈to compress or expand the time axis - buttons
+zoom/-zoomto zoom in or out (zoom both axes)
- left / middle mouse button to uncompress / expand the time axis, hold to auto-repeat
- shift and left / middle mouse to zoom in / out, hold to auto-repeat
- left mouse button and move to drag displayed area
- up/down/left/right arrow keys to move the displayed area
