Analyzer ngx-access-log-buffer-size

Name

ngx-access-log-buffer-size - Nginx Access Log Buffer Size Configuration

This analyzer monitors the buffer size configurations of the access_log directive in nginx-based applications such as OpenResty and Kong. It tracks the buffer parameter values across different configuration contexts (http, server, location) and generates a histogram showing the distribution of buffer sizes in use. The data helps administrators identify buffer size patterns and optimize logging performance by balancing memory consumption against disk I/O frequency. Proper buffer sizing reduces the overhead of frequent disk writes while avoiding excessive memory usage for log buffering.

Resource Category

CPU.

Application Type & Technical Stack

  • OpenResty
  • Nginx
  • Kong
  • APISIX

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 ngx-access-log-buffer-size -p PID

# trace a shell command directly
orxray analyzer run ngx-access-log-buffer-size -c SHELL_CMD

# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run ngx-access-log-buffer-size -p -PGID

# trace any processes started from the specified executable path.
orxray analyzer run ngx-access-log-buffer-size --exe /path/to/exe/file

Tracing Multiple Processes

Supported.

Output Formats

  • Histogram Bar Charts
  • Plain Texts

Output Example

[{
  "title": "Access Log Buffer Size",
  "subtitle": "174 calls (min: 0, avg: 0, max: 0)",
  "type": "dist-bar",
  "ver": 1,
  "series": {
    "data": {"0": 174, "32768": 12, "65536": 8},
    "categoryTitle": "Buffer Size (bytes)",
    "name": "Number of Configurations",
    "categoryUnit": ""
  },
  "kind": "ngx-access-log-buffer-size"
}]

Author

The OpenResty Inc. Team.

Copyright (C) by OpenResty Inc. All rights reserved.