This section lists the information you need and the tools you can use to gather information in order to analyze and optimize the MDEX Engine performance.
Use the following sources of information:
Sometimes poor application performance is the symptom of an operational problem (with the hardware, network, connections, or the application server). At other times, it may require you to review and revise the application coding, the Dgraph settings that were chosen previously and may need to be adjusted, or interactions between different features.
The first step in performance tuning is to find out what is causing the application to run more slowly than expected.
As you gather information about system performance, Oracle recommends that you note what steps you take and any changes you make to your environment, to ensure that you can analyze them or revert to your previous settings if needed.
When testing performance, make sure that the types of operations used to produce a load against the Dgraph are representative of an actual application usage scenario.
The first clues to identifying the source of a performance problem are found in the system state. The following characteristics are easy to extract and may immediately indicate a direction in which to concentrate further investigation.
Information about changes in the configuration. This includes:
CPU utilization, disk I/O activity, and internal resource use. This includes:
Physical number of CPUs available and the number of cores per CPU
The number of threads the Dgraph has been started with, and the total number of Dgraphs started on one machine
CPU utilization statistics from the Dgraph host (especially when the performance problem is exhibited, if it is transient)
CPU utilization statistics from the front-end application host
disk I/O activity: processes other than the Dgraphs running on the machine that are not standard daemons or services (for example, a periodic backup process may interfere with disk access)
Storage capacity and configuration. This includes:
Whether network-attached storage is used (SAN with Fibre Channel is recommended) versus local storage
Whether RAID configuration is used (the simultaneous use of two or more hard disk drives to achieve greater levels of performance)
If RAID is used, the configuration of the read-ahead policy for RAID. If the policy you have allows read-ahead, this lets the disk controller read additional data into the disk cache, which in turn increases the Dgraph performance.
This information defines the basic parameters for the performance problem. Typically, you base initial hypotheses on these findings, and confirm them with the next steps of the investigation.
Note
It is likely that you already have many of the tools you need to assess system state.
You can use the following performance tools.
The following sections describe these tools in detail.
The MDEX Engine request log captures per-query metrics from a running Dgraph.
You can sort, filter, or otherwise manipulate the Dgraph request log to collect performance information. For example, you can sort the Dgraph request log based on query processing time to get the list of most expensive queries, or sort it on response duration to track latency trends.
The MDEX Engine Statistics page (also called the Dgraph Stats page) provides aggregated metrics since startup, and creates a detailed breakdown of what a running Dgraph is doing.
If performance is an issue, this page can help you to figure out which features are at fault.
Typically the feature in the Hot-spot Analysis section with the highest total is the best place to start your investigation. You can use the figures in the Dgraph Stats page to calculate useful metrics.
For example, to determine your application’s network usage, you can multiply the number of ops/second by the average result page size.
The MDEX Engine Auditing page lets you view the aggregate MDEX Engine metrics over time and provides output of XML reports that track ongoing usage statistics.
These statistics persist through process restarts. This data can be used to verify compliance with licensing terms, and is also useful for tracking product usage. Each Dgraph in an implementation is audited separately.
Use the Request Log Analyzer for processing request logs to analyze query load metrics for the MDEX Engine. The Request Log Analyzer reports actual performance, not the expected performance.
Use the Request Log Analyzer utility together with Eneperf to investigate whether you have performance under load.
Here are some of the ways you can use this utility:
Isolate requests within a specific time range with the
--timelower
and--timeupper
flags.Focus your attention on user-generated requests, by excluding admin, invalid, empty and error requests with the
--ignore
flag.Ensure that all statistics are logged. Request metrics in log reports do not correspond directly to query load metrics for the MDEX Engine. Differences in request metrics can arise from pages that issue multiple queries and from caching. For example, run the Request Log Analyzer with
--showAll
flag to ensure all statistics are logged:reqloganalyzer --showAllGraph1.log > Graph1.stats
Determine whether the performance bottleneck is caused by the Dgraph by comparing the statistics for “Engine-Only Processing Time” with “Round-Trip Response Time”.
Show statistics based on threading with the
--showthreading
flag. This is useful when tuning your Dgraph threading configuration to increase the number of query threads.