Fine Grain Operation Timing


Overview

This feature is about to control which timing information are logged in the RESULT line (or json record) Allowing to configure any not empty set of the following measures:

Use Cases

A typical use is when troubleshooting performance issue and wondering whether the reason is within the directory server or within the application or the network

Major configuration options and enablement

ds-fine-grain-operation-timing attribute in cn=config accept a set of supported keywords separated by any of: space, tab, newline, comma, plus, or vertical bar

Keyword Starting Point Ending Point Summary Cumuled
wqtime Operation is pushed in worker thread queue Operation is unqueued by a worker thread Work Queue Time Yes
writetime Starting to write data to the network Finished to write data to the network Write I/O time Yes
optime Operation processing is started Operation result is sent Operation time No
etime First byte of operation is received Operation result is sent Elapsed time No
wtime First byte of operation is received Operation processing is started Wait time No

Cumuled means that there may be several measures when handling the operation and that all the times are cumuled.

By default ds-fine-grain-operation-timing is: wqtime+wtime+optime+etime

Design

Struct array added in operation struct: o_fgots contains the following fields per element: - enabled: A boolean telling if the element is meaningfull - s: measure starting time - c: measure cumuled time

An fgot_id_t enum identify the different measures While logging the operation result the o_fgots array is walked and for any enabled slot keyword=value is added to the RESULT line/record

Important functions to compute the measure: - fgot_start(op, fgot_id): set the current time in s if the slot is enabled - fgot_end(op, fgot_id): if the slot is enabled subtract s from current time and add the result in c - fgot_compute(op, fgot_id, t1, t2): if the slot is enabled subtract t2 from t1 and add the result in c

How to add new timing

Future work

Should probably add more timing for

Origin

Author

progier@redhat.com

Last modified on 19 March 2026