Report and reset maximum numbers of processes concurrently accessing a database region
Final Release Note
$$^%PEEKBYNAME("node_local.max_procs",<region>) returns a string consisting of two comma separated integers. The first is a count of the maximum number of processes that concurrently accessed that database region, and the second is the number of seconds since January 1, 1970 00:00:00 UTC (i.e., the value of $ZUT) at which that number of processes was recorded. The output of the DSE DUMP FILEHEADER command includes the field Max Concurrent processes
that reports the maximum number of concurrent processes, and the field Max conc proc time
which reports the time at which that value was recorded. The -reset_max_procs
option of the DSE CHANGE FILEHEADER command sets the maximum number of concurrent processes to zero, and the time to the time that the DSE CHANGE FILEHEADER command was run. [#758 (closed)]
Description
YottaDB users monitoring system load do not have a good way to determine the maximum number of processes accessing a database. But this is information that YottaDB can easily store in the database file header and make available on request.
In the database file header are three fields, each consisting of a process count and a time stamp, all initialized to zero at database creation time. The first field is the count of the maximum number of processes that ever concurrently had that database file open, and the time at which that happened, in seconds from the UNIX epoch. The second field is the next largest number of processes with the time at which that was recorded, and the third field is the third largest number of processes and its time stamp. After a process opens a database file, if the count of processes accessing that database file ($$^%PEEKBYNAME("node_local.ref_cnt",<region>)) exceeds any of the three fields, the process updates the fields.
Draft Release Note
$$^%PEEKBYNAME("node_local.max_proc",<region>) returns a string consisting of three semi-colon (;
) separated pieces. Each piece in turn consists of two comma separated positive integers, the first of which is a number of processes, and the second of which is a number of seconds since January 1, 1970 00:00:00 UTC. The three pieces record the largest, second-largest, and third-largest number of processes that had the database region open concurrently, as well as the timestamps of each of those measurements.