Analyzer epoll-loop-blocking-distr
Name
epoll-loop-blocking-distr - Epoll Loop Blocking Latency Distribution
This analyzer profiles the blocking latency of epoll system calls (primarily epoll_wait) in event-driven applications. It measures how long each epoll_wait call blocks waiting for I/O events, generating histogram visualizations of the blocking duration distribution. This helps identify whether the application is spending appropriate time waiting for events versus being blocked unexpectedly. High blocking times may indicate insufficient incoming events or configuration issues, while very low blocking times might suggest busy-waiting patterns that waste CPU cycles.
Resource Category
CPU.
Application Type & Technical Stack
- All
Command Line Syntax
The analyzer can be invoked directly on the command-line via the orxray
utility from the openresty-xray-cli software package.
Alternatively, the analyzer can also be invoked manually or automatically on the web console UI of OpenResty XRay (like on the Advanced web page).
# PID is the target process PID.
orxray analyzer run epoll-loop-blocking-distr -p PID
# trace a shell command directly
orxray analyzer run epoll-loop-blocking-distr -c SHELL_CMD
# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run epoll-loop-blocking-distr -p -PGID
# trace any processes started from the specified executable path.
orxray analyzer run epoll-loop-blocking-distr --exe /path/to/exe/file
Tracing Multiple Processes
Supported.
Output Formats
- Histogram Bar Charts
- Plain Texts
Output Example
[{
"title": "Epoll Loop Blocking Latency Distribution",
"subtitle": "1833 Calls (min: 2 us, avg: 159 us, max: 3036 us)",
"type": "dist-bar",
"ver": 1,
"series": {
"data": {
"0": 0, "1": 0, "2": 4, "4": 0, "8": 1, "16": 4,
"32": 213, "64": 648, "128": 867, "256": 49,
"512": 21, "1024": 23, "2048": 3, "4096": 0, "8192": 0
},
"categoryTitle": "Blocking Time",
"name": "Calls",
"categoryUnit": "us"
},
"summary": {"min": 2, "avg": 159, "max": 3036, "cnt": 1833},
"kind": "epoll-loop-blocking-distr"
}]
Author
The OpenResty Inc. Team.
Copyright
Copyright (C) by OpenResty Inc. All rights reserved.