MDEX Engine request logs can be very large and difficult to read. You might find it useful to sort them on fields you are interested in, such as Processing Time or Total Request Duration. You can then look for a pattern or feature in the most time-consuming queries that might be the origin of the performance issue.

Here are two approaches to extract information from request logs:

The Request Log Analyzer reads one or more MDEX Engine logs and reports on the nature and performance of the queries recorded in those logs. This report provides information on what actually happened in the past, instead of reporting on potential performance or capacity planning for the future. This script can be run manually in order to debug performance problems, and should also be run on a regular basis to continually monitor performance and call out trends in Dgraph traffic load, latency, throughput, and application behavior.

If you write Perl to extract, manipulate, and analyze the information in a request log, you may find the following setting useful in Perl scripts:

perl -nae

where:

This script shows how many queries took more than five seconds. It splits the line on whitespace into an array called F. The sixth element in the array ([5]) corresponds to the Total Request Time and represents the amount of time the query took.

perl -nae 'print if $F[5] > 5000' logfile

If you are tracking system trends by time, you may find it useful to correlate the epochal time that the log displays with human-readable time. This script is used to convert the time stamps into a more readable form.

perl -nae 'print scalar localtime $F[0]," $_"'


Copyright © Legal Notices