java.io.Serializablepublic class EnvironmentStats
extends java.lang.Object
implements java.io.Serializable
Each statistic has a name and a getter method in this class. For example,
the cacheTotalBytes stat is returned by the getCacheTotalBytes() method. Statistics are categorized into several
groups, for example, cacheTotalBytes is in the Cache
group. Each stat and group has a name and a description.
Viewing the statistics through toString() shows the stat names
and values organized by group. Viewing the stats with toStringVerbose() additionally shows the description of each stat and
group.
Statistics are periodically output in CSV format to the je.stat.csv file
(see EnvironmentConfig.STATS_COLLECT). The column header in the .csv
file has group:stat format, where 'group' is the group name and
'stat' is the stat name. In Oracle NoSQL DB, in the addition to the .csv
file, JE stats are output in the .stat files.
Stat values may also be obtained via JMX using the JEMonitor mbean.
In Oracle NoSQL DB, JE stats are obtained via a different JMX interface in
JSON format. The JSON format uses property names of the form
group_stat where 'group' is the group name and 'stat' is the stat name.
The stat groups are listed below. Each group name links to a summary of the statistics in the group.
| Group Name | Description |
|---|---|
| "Cache" | "The main cache resides in the Java heap and holds data, keys, Btree internal nodes, locks and JE metadata." |
| "OffHeap" | "The optional off-heap cache resides outside the Java heap and serves as an overflow area for the main cache." |
| "Cleaning" | "Log cleaning involves garbage collection of data files in the append-only storage system." |
| "I/O" | "The file I/O component of the append-only storage system includes data file access, buffering and group commit." |
| "Node Compression" | "Deleted records are removed from Btree internal nodes asynchronously and nodes are deleted when they become empty." |
| "Checkpoints" | "Dirty Btree internal nodes are written to the data log periodically to bound recovery time." |
| "Locks" | "Record locking is used to provide transactional capabilities." |
| "Op" | "Throughput statistics for JE calls." |
| "BtreeOp" | "Btree internal operation statistics." |
| "Environment" | "Miscellaneous environment wide statistics." |
The following sections describe each group of stats along with some common strategies for using them for monitoring and performance tuning.
Group Name: "Cache"
Description: "The main cache resides in the Java heap and holds data, keys, Btree internal nodes, locks and JE metadata."
Group Name: "OffHeap"
Description: "The optional off-heap cache resides outside the Java heap and serves as an overflow area for the main cache."
The JE cache consists of the main (in-heap) cache and and optional off-heap cache. The vast majority of the cache is occupied by Btree nodes, including internal nodes (INs) and leaf nodes (LNs). INs contain record keys while each LN contain a single record's key and data.
Each IN refers to a configured maximum number of child nodes (EnvironmentConfig.NODE_MAX_ENTRIES). The INs form a Btree of at least 2
levels. With a large data set the Btree will normally have 4 or 5 levels.
The top level is a single node, the root IN. Levels are numbered from the
bottom up, starting with level 1 for bottom level INs (BINs). Levels are
added at the top when the root IN splits.
When an off-heap cache is configured, it serves as an overflow for the
main cache. See EnvironmentConfig.MAX_OFF_HEAP_MEMORY.
Operation performance is often directly proportional to how much of the
active data set is cached. BINs and LNs form the vast majority of the cache.
Caching of BINs and LNs has different performance impacts, and behavior
varies depending on whether an off-heap cache is configured and which CacheMode is used.
Main cache current usage is indicated by the following stats. Note that there is currently no stat for the number of LNs in the main cache.
getCacheTotalBytes() |
"Total amount of JE main cache in use, in bytes." |
getNCachedBINs() |
"Number of BINs (bottom internal nodes) and BIN-deltas in main cache." |
getNCachedBINDeltas() |
"Number of BIN-deltas (partial BINs) in main cache. This is a subset of the nCachedBINs value." |
getNCachedUpperINs() |
"Number of upper INs (non-bottom internal nodes) in main cache." |
Off-heap cache current usage is indicated by:
getOffHeapTotalBytes() |
"offHeapTotalBytes" |
getOffHeapCachedLNs() |
"Number of LNs residing in the off-heap cache." |
getOffHeapCachedBINs() |
"Number of BINs (full BINs and BIN-deltas) residing in the off-heap cache." |
getOffHeapCachedBINDeltas() |
"Number of BIN-deltas residing in the off-heap cache." |
A cache miss is considered a miss only when the object is not found in either cache. Misses often result in file I/O and are a primary indicator of cache performance. Fetches (access requests) and misses are indicated by:
getNLNsFetch() |
"Number of LNs (data records) requested by btree operations." |
getNLNsFetchMiss() |
"Number of LNs (data records) requested by btree operations that were not in main cache." |
getNBINsFetch() |
"Number of BINs (bottom internal nodes) and BIN-deltas requested by btree operations." |
getNBINsFetchMiss() |
"Number of full BINs (bottom internal nodes) and BIN-deltas fetched to satisfy btree operations that were not in main cache." |
getNBINDeltasFetchMiss() |
"Number of BIN-deltas (partial BINs) fetched to satisfy btree operations that were not in main cache." |
getNFullBINsMiss() |
"Number of times a BIN-delta had to be mutated to a full BIN (and as a result a full BIN had to be read in from the log)." |
getNUpperINsFetch() |
"Number of Upper INs (non-bottom internal nodes) requested by btree operations." |
getNUpperINsFetchMiss() |
"Number of Upper INs (non-bottom internal nodes) requested by btree operations that were not in main cache." |
When the number of LN misses (nLNsFetchMiss) or the number of
BIN misses (nBINsFetchMiss + nFullBINsMiss) are significant, the
JE cache may be undersized, as discussed below. But note that it is not
practical to correlate the number of fetches and misses directly to
application operations, because LNs are sometimes
embedded, BINs are sometimes
accessed multiple times per operation, and internal Btree accesses are
included in the stat values.
Ideally, all BINs and LNs for the active data set should fit in cache so
that operations do not result in fetch misses, which often perform random
read I/O. When this is not practical, which is often the case for large
data sets, the next best thing is to ensure that all BINs fit in cache,
so that an operation will perform at most one random read I/O to fetch
the LN. The DbCacheSize javadoc describes how to size the cache
to ensure that all BINs and/or LNs fit in cache.
Normally EnvironmentConfig.MAX_MEMORY_PERCENT determines the JE
cache size as a value relative to the JVM heap size, i.e., the heap size
determines the cache size.
For configuring cache size and behavior, see:
EnvironmentConfig.MAX_MEMORY_PERCENTEnvironmentConfig.MAX_MEMORYEnvironmentConfig.MAX_OFF_HEAP_MEMORYEnvironmentMutableConfig.setCacheMode(CacheMode)CacheModeDbCacheSizeWhen using Oracle NoSQL DB, a sizing exercise and DbCacheSize are
used to determine the cache size needed to hold all BINs in memory. The
memory available to each node is divided between a 32 GB heap for the JVM
process (so that CompressedOops may be used) and the off-heap cache (when
more than 32 GB of memory is available).
It is also important not to configured the cache size too large, relative
to the JVM heap size. If there is not enough free space in the heap, Java
GC pauses may become a problem. Increasing the default value for
MAX_MEMORY_PERCENT, or setting MAX_MEMORY (which overrides
MAX_MEMORY_PERCENT), should be done carefully.
Java GC performance may also be improved by using CacheMode.EVICT_LN. Record data sizes should also be kept below 1 MB to
avoid "humongous objects" (see Java GC documentation).
When using Oracle NoSQL DB, by default, MAX_MEMORY_PERCENT is
set to 70% and CacheMode.EVICT_LN is used. The LOB (large object)
API is implemented using multiple JE records per LOB where the data size of
each record is 1 MB or less.
When a shared cache is configured, the main and off-heap cache may be shared by multiple JE Environments in a single JVM process. See:
When using Oracle NoSQL DB, the JE shared cache feature is not used because each node only uses a single JE Environment.
Since a large portion of an IN consists of record keys, JE uses
key prefix compression.
Ideally, key suffixes are small enough to be stored using the compact key format. The
following stat indicates the number of INs using this compact format:
getNINCompactKeyIN() |
"Number of INs that use a compact key representation to minimize the key object representation overhead." |
Configuration params impacting key prefixing and the compact key format are:
Enabling key prefixing for all databases is strongly recommended. When using Oracle NoSQL DB, key prefixing is always enabled.
Another configuration param impacting BIN cache size is
TREE_MAX_EMBEDDED_LN. There is currently no stat indicating the number of
embedded LNs. See:
Although the Btree normally occupies the vast majority of the cache, it is possible that record locks occupy unexpected amounts of cache when large transactions are used, or when cursors or transactions are left open due to application bugs. The following stat indicates the amount of cache used by record locks:
getLockBytes() |
"Number of bytes of JE cache used for holding locks and transactions, in bytes." |
To reduce the amount of memory used for record locks:
LockMode.READ_COMMITTED isolation or use a null Transaction (which
implies ReadCommitted). With ReadCommitted isolation, locks are
released after each read operation. Using LockMode.READ_UNCOMMITTED will also avoid record locks, but does not
provide any transactional guarantees.Note that the above guidelines are also important for reducing contention when records are accessed concurrently from multiple threads and transactions. When using Oracle NoSQL DB, the application should avoid performing a large number of write operations in a single request. For read operations, NoSQL DB uses ReadCommitted isolation to avoid accumulation of locks.
Another unexpected use of cache is possible when using a DiskOrderedCursor or when calling Database.count(). The amount of
cache used by these operations is indicated by:
getDOSBytes() |
"Amount of JE main cache consumed by disk-ordered cursor and Database.count operations, in bytes." |
DiskOrderedCursor and Database.count should normally be
explicitly constrained to use a maximum amount of cache memory. See:
Oracle NoSQL DB does not currently use DiskOrderedCursor or
Database.count.
Eviction is removal of Btree node from the cache in order to make room
for newly added nodes. See CacheMode for a description of
eviction.
Normally eviction is performed via background threads in the eviction thread pools. Disabling the eviction pool threads is not recommended.
Eviction stats are important indicator of cache efficiency and provide a deeper understanding of cache behavior. Main cache eviction is indicated by:
getNLNsEvicted() |
"Number of LNs evicted as a result of LRU-based eviction (but not CacheMode.EVICT_LN)." |
getNNodesMutated() |
"Number of target BINs mutated to BIN-deltas." |
getNNodesEvicted() |
"Number of target nodes (INs) evicted from the main cache." |
getNDirtyNodesEvicted() |
"Number of dirty target nodes logged and evicted." |
Note that objects evicted from the main cache are moved to the off-heap cache whenever possible.
Off-heap cache eviction is indicated by:
getOffHeapLNsEvicted() |
"Number of LNs evicted from the off-heap cache as a result of BIN stripping." |
getOffHeapNodesMutated() |
"Number of off-heap target BINs mutated to BIN-deltas." |
getOffHeapNodesEvicted() |
"Number of target BINs (including BIN-deltas) evicted from the off-heap cache." |
getOffHeapDirtyNodesEvicted() |
"Number of target BINs evicted from the off-heap cache that were dirty and therefore were logged." |
When analyzing Java GC performance, the most relevant stats are
NLNsEvicted, NNodesMutated and NNodesEvicted, which all
indicate eviction from the main cache based on LRU. Large values for these
stats indicate that many old generation Java objects are being GC'd, which
is often a cause of GC pauses.
Note that CacheMode.EVICT_LN is used or when LNs are embedded, NLNsEvicted will
be close to zero because LNs are not evicted based on LRU. And if an
off-heap cache is configured, NNodesMutated will be close to zero
because BIN mutation takes place in the off-heap cache. If any of the three
values are large, this points to a potential GC performance problem. The GC
logs should be consulted to confirm this.
Large values for NDirtyNodesEvicted or
OffHeapDirtyNodesEvicted indicate that the cache is severely undersized and
there is a risk of using all available disk space and severe performance
problems. Dirty nodes are evicted last (after evicting all non-dirty nodes)
because they must be written to disk. This causes excessive writing and JE
log cleaning may be unproductive.
Note that when an off-heap cache is configured,
NDirtyNodesEvicted will be zero because dirty nodes in the main cache are
moved to the off-heap cache if they don't fit in the main cache, and are
evicted completely and written to disk only when they don't fit in the
off-heap cache.
Another type of eviction tuning for the main cache involves changing the number of bytes evicted each time an evictor thread is awoken:
If the number of bytes is too large, it may cause a noticeable spike in eviction activity, reducing resources available to other threads. If the number of bytes is too small, the overhead of waking the evictor threads more often may be noticeable. The default values for this parameter is generally a good compromise. This parameter also impacts critical eviction, which is described next.
Note that the corresponding parameter for the off-heap cache, EnvironmentConfig.OFFHEAP_EVICT_BYTES, works differently and is described
in the next section.
The following stats indicate that critical eviction is occurring:
getNBytesEvictedCritical() |
"Number of bytes evicted in the application thread because the cache is over budget." |
getNBytesEvictedCacheMode() |
"Number of bytes evicted by operations for which CacheMode.EVICT_BIN is specified." |
getNBytesEvictedDeamon() |
"Number of bytes evicted by JE deamon threads." |
getNBytesEvictedEvictorThread() |
"Number of bytes evicted by evictor pool threads." |
getNBytesEvictedManual() |
"Number of bytes evicted by the Environment.evictMemory or during Environment startup." |
getOffHeapCriticalNodesTargeted() |
"Number of nodes targeted in \'critical eviction\' mode." |
getOffHeapNodesTargeted() |
"Number of BINs selected as off-heap eviction targets." |
Eviction is performed by eviction pool threads, calls to Environment.evictMemory() in application background threads, or via CacheMode.EVICT_LN or CacheMode.EVICT_BIN. If these mechanisms are
not sufficient to evict memory from cache as quickly as CRUD operations are
adding memory to cache, then critical eviction comes into play. Critical
eviction is performed in-line in the thread performing the CRUD operation,
which is very undesirable since it increases operation latency.
Critical eviction in the main cache is indicated by large values for
NBytesEvictedCritical, as compared to the other
NBytesEvictedXXX stats. Critical eviction in the off-heap cache is
indicated by large values for OffHeapCriticalNodesTargeted compared
to OffHeapNodesTargeted.
Additional stats indicating that background eviction threads may be insufficient are:
getNThreadUnavailable() |
"Number of eviction tasks that were submitted to the background evictor pool, but were refused because all eviction threads were busy." |
getOffHeapThreadUnavailable() |
"Number of eviction tasks that were submitted to the background off-heap evictor pool, but were refused because all eviction threads were busy." |
Critical eviction can sometimes be reduced by changing EnvironmentConfig.EVICTOR_CRITICAL_PERCENTAGE or modifying the eviction
thread pool parameters.
EnvironmentConfig.EVICTOR_CRITICAL_PERCENTAGEEnvironmentConfig.EVICTOR_CORE_THREADSEnvironmentConfig.EVICTOR_MAX_THREADSEnvironmentConfig.EVICTOR_KEEP_ALIVEEnvironmentConfig.OFFHEAP_CORE_THREADSEnvironmentConfig.OFFHEAP_MAX_THREADSEnvironmentConfig.OFFHEAP_KEEP_ALIVEWhen using Oracle NoSQL DB, EVICTOR_CRITICAL_PERCENTAGE is set to
20% rather than using the JE default of 0%.
In the main cache, critical eviction uses the same parameter as background eviction for determining how many bytes to evict at one time:
Be careful when increasing this value, since this will cause longer operation latencies when critical eviction is occurring in the main cache.
The corresponding parameter for the off-heap cache,
OFFHEAP_EVICT_BYTES, works differently:
Unlike in the main cache, OFFHEAP_EVICT_BYTES defines the goal
for background eviction to be below MAX_OFF_HEAP_MEMORY. The
background evictor threads for the off-heap cache attempt to maintain the
size of the off-heap cache at MAX_OFF_HEAP_MEMORY -
OFFHEAP_EVICT_BYTES. If the off-heap cache size grows larger than
MAX_OFF_HEAP_MEMORY, critical off-heap eviction will occur. The default
value for OFFHEAP_EVICT_BYTES is fairly large to ensure that
critical eviction does not occur. Be careful when lowering this value.
This approach is intended to prevent the off-heap cache from exceeding
its maximum size. If the maximum is exceeded, there is a danger that the
JVM process will be killed by the OS. See getOffHeapAllocFailures().
Another common tuning issue involves thread contention on the cache LRU lists, although there is no stat to indicate such contention. Since each time a node is accessed it must be moved to the end of the LRU list, a single LRU list would cause contention among threads performing CRUD operations. By default there are 4 LRU lists for each cache. If contention is noticeable on internal Evictor.LRUList or OffHeapCache.LRUList methods, consider increasing the number of LRU lists:
However, note that increasing the number of LRU lists will decrease the accuracy of the LRU.
The following cache stats are unlikely to be needed for monitoring or tuning, but are sometimes useful for debugging and testing.
getDataBytes() |
"Amount of JE main cache used for holding data, keys and internal Btree nodes, in bytes." |
getAdminBytes() |
"Number of bytes of JE main cache used for cleaner and checkpointer metadata, in bytes." |
getNNodesTargeted() |
"Number of nodes (INs) selected as eviction targets." |
getNNodesStripped() |
"Number of target BINs for which space was reclaimed by deleting space for expired LNs or evicting resident LNs." |
getNNodesPutBack() |
"Number of target nodes (INs) moved to the cold end of the LRU list without any action taken on them." |
getNNodesMovedToDirtyLRU() |
"Number of nodes (INs) moved from the mixed/priority-1 to the dirty/priority-2 LRU list." |
getNNodesSkipped() |
"Number of nodes (INs) that did not require any action." |
getNRootNodesEvicted() |
"Number of database root nodes (INs) evicted." |
getNBINsFetchMissRatio() |
"The BIN fetch miss ratio (nBINsFetchMiss / nBINsFetch)" |
getNINSparseTarget() |
"Number of INs that use a compact sparse array representation to point to child nodes in the main cache." |
getNINNoTarget() |
"Number of INs that use a compact representation when none of its child nodes are in the main cache." |
getMixedLRUSize() |
"Number of INs in the mixed/priority-1 LRU " |
getDirtyLRUSize() |
"Number of INs in the dirty/priority-2 LRU " |
getOffHeapAllocFailures() |
"Number of off-heap allocation failures due to lack of system memory." |
getOffHeapAllocOverflows() |
"Number of off-heap allocation attempts that exceeded the cache size." |
getOffHeapNodesStripped() |
"Number of target BINs for which space was reclaimed by deleting space for expired LNs or evicting resident LNs." |
getOffHeapNodesSkipped() |
"Number of off-heap target BINs on which no action was taken." |
getOffHeapLNsLoaded() |
"Number of LNs loaded from the off-heap cache." |
getOffHeapLNsStored() |
"Number of LNs stored into the off-heap cache." |
getOffHeapBINsLoaded() |
"Number of BINs loaded from the off-heap cache." |
getOffHeapBINsStored() |
"Number of BINs stored into the off-heap cache." |
getOffHeapTotalBlocks() |
"Total number of memory blocks in off-heap cache." |
getOffHeapLRUSize() |
"Number of LRU entries used for the off-heap cache." |
Likewise, the following cache configuration params are unlikely to be needed for tuning, but are sometimes useful for debugging and testing.
EnvironmentConfig.ENV_DB_EVICTIONEnvironmentConfig.TREE_MIN_MEMORYEnvironmentConfig.EVICTOR_FORCED_YIELDEnvironmentConfig.EVICTOR_ALLOW_BIN_DELTASEnvironmentConfig.OFFHEAP_CHECKSUMGroup Name: "Cleaning"
Description: "Log cleaning involves garbage collection of data files in the append-only storage system."
The JE cleaner is responsible for "disk garbage collection" within JE's log structured (append only) storage system. Data files (.jdb files), which are also called log files, are cleaned and deleted as their contents become obsolete. See this introduction to JE data files.
By utilization we mean the ratio of utilized size to the total size of
the active data files. The cleaner is run
when overall utilization (for all active files) drops below the target
utilization, which is specified by EnvironmentConfig.CLEANER_MIN_UTILIZATION. The cleaner attempts to
maintain overall utilization at the target level. In addition, a file
will be cleaned if its individual utilization drops below EnvironmentConfig.CLEANER_MIN_FILE_UTILIZATION, irrespective of overall
utilization.
Current (actual) utilization is indicated by the following stats.
getCurrentMinUtilization() |
"Lower bound for current log utilization as a percentage." |
getCurrentMaxUtilization() |
"Upper bound for current log utilization as a percentage." |
If TTL is not used, the minimum and maximum utilization will be the same. If TTL is used, the minimum and maximum define a range that bounds the actual utilization. The current utilization is not known precisely when TTL is used because of the potential overlap between expired data and data that has become obsolete due to updates or deletions. See Cleaning Statistics: TTL and expired data.
If the cleaner is successfully maintaining the target utilization, the current utilization (indicated by the above stats) is normally slightly lower than the target utilization. This is because the cleaner is not activated until current utilization drops below the target utilization and it takes time for the cleaner to free space and raise the current utilization. If the current utilization is significantly lower than the target utilization (e.g., more than five percentage points lower), this typically means the cleaner is unable to maintain the target utilization. (When the minimum and maximum utilization stats are unequal, we recommend using the maximum utilization for this determination.)
When the cleaner is unable to maintain the target utilization, it will clean files continuously in an attempt to reach the target. This will use significant system resources in the best case and will use all available disk space in the worst case, so the source of the problem should be identified and corrected using the guidelines below.
cleaner threads.
For example, the NoSQL DB product uses two cleaner threads.target utilization is one solution. For example, the NoSQL DB product
uses a target utilization of 40%. See the next section for additional
guidelines.The general guidelines for ensuring that the cleaner can maintain the target utilization are:
This remainder of this section is intended to help understand the reasons for these recommendations and to aid in advanced tuning.
A JE data file consists mainly of Btree nodes, which include internal
nodes (INs) and leaf nodes (LNs). Each IN contains the keys of roughly
100 records, while an LN
contains the key and data of a single record. When the cleaner processes
a data file it migrates (copies) active LNs to the end of the log, and
dirties their parent BINs (bottom internal nodes). Active INs are dirtied
but not immediately copied. The next checkpoint will then write the INs
dirtied as a result of cleaning the file:
Finally, now that the persistent form of the Btree contains no references to the cleaned file, the file can be deleted. (In HA environments the file is not deleted immediately as will be discussed.)
When LNs are migrated, logging of their dirtied parent BINs causes the previous version of these BINs to become obsolete. In many cases the previous version may be in a different file than the cleaned file. So although the cleaner reclaims the space for the obsolete data in the cleaned file, it also creates some amount of additional obsolete space.
The ratio of reclaimed space to additional obsolete space determines the maximum utilization that can result from cleaning. If this maximum is less than the target utilization, the cleaner will run continuously in an attempt to reach the target and will consume large amounts of system resources. Several factors influence how much additional obsolete space is created:
DB with duplicate keys. Such
databases are normally SecondaryDatabases.Database), LNs are embedded when the data
size is no larger than
EnvironmentConfig.TREE_MAX_EMBEDDED_LN. Such databases
are normally primary databases, but in rare cases can be
SecondaryDatabases.embedded,
significant amounts of obsolete space may be created by cleaning. This
is because many LNs are migrated per file, and for each of these LNs a
BIN is dirtied. EnvironmentConfig.TREE_MAX_EMBEDDED_LN can be
increased to solve this problem in some cases, but (as described in its
javadoc) increasing this value will increase BIN cache usage and
should be done with caution.checkpoint interval, the more likely it is that migration of two or
more LNs will dirty a single parent BIN (assuming the absence of cache
eviction). This causes less BINs to be logged as a result of migration,
so less obsolete space is created. In other words, increasing the
checkpoint interval increases write absorption. This is true for
ordinary record write operations as well as LN migration.Even when cleaning does not create significant amounts of additional
obsolete space, an undersized cache can still
prevent the cleaner from maintaining the target utilization when eviction
of dirty BINs occurs. When eviction causes logging of dirty BINs, this
reduces or even cancels out the write absorption benefits that normally
occur due to periodic checkpoints. In the worst case, every record write
operation causes a BIN to be written as well, which means that large
amounts of obsolete data will be created at a high rate. The
getNDirtyNodesEvicted() and getOffHeapDirtyNodesEvicted()
cache statistics can help to identify this problem.
Even when cleaning is maintaining the target utilization, it may consume large amounts of system resources in order to do so. The following indicators of cleaning activity can be used to get a rough idea of the level of cleaning activity.
getNCleanerRuns() |
"Number of files processed by the cleaner, including two-pass runs." |
getNCleanerEntriesRead() |
"Number of log entries processed by the cleaner." |
As mentioned earlier, configuring a lower
target utilization is one
way to reduce cleaner resource consumption.
The read IO caused by cleaning is indicated by the following stat:
getNCleanerDiskRead() |
"Number of disk reads by the cleaner." |
The impact of cleaner read IO can sometimes be reduced by increasing the
read buffer size.
The write IO caused by cleaning is due to active LN migration and by logging of INs that were dirtied by the
cleaner. Both of these costs can be reduced by decreasing the
target utilization.
Logging of dirty INs can also be reduced by using smaller key sizes,
especially when the data size is small, yet too large to be embedded in
the BIN.
When a workload involves inserting and deleting large numbers of
records, another way of increasing cleaner efficiency is to remove the
records using TTL or record extinction, rather than performing transactional
record deletions. When records have expired or become extinct, the cleaner
can discard the LNs without a Btree lookup as described in the next
section. Also, because there are no transactional deletions there is less
cleaner metadata and less writing overall.
This section describes details of cleaner file processing. The stats in this section are useful for internal analysis and debugging.
When the cleaner processes a data file, it reads the Btree entries: LNs,
BIN-deltas, BINs and upper INs. The number of entries processed is
getNCleanerEntriesRead(). (There are a small number of additional
non-Btree entries in each file that are always obsolete and are completely
ignored by the cleaner.)
The first step of processing a Btree entry is to determine if it is known-obsolete. A known-obsolete entry is one of the following:
removed or
truncated. Note that DBs are
added to a pending DB queue if the removal or truncation is not yet
complete; this is discussed in the next section.expired. Expired LNs
result from the use of TTL.extinct. Extinct
LNs result from using an ExtinctionFilter along with the
discardExtinctRecords
method.Known-obsolete entries are very inexpensive to process because no
Btree lookup is required to determine that they are obsolete, and they
can simply be discarded. The number of known-obsolete entries is the sum
of the following XxxObsolete stats:
getNLNsObsolete() |
"Number of known-obsolete LNs." |
getNINsObsolete() |
"Number of known-obsolete INs." |
getNBINDeltasObsolete() |
"Number of known-obsolete BIN-deltas." |
Entries that are not known-obsolete must be processed by performing a
Btree lookup to determine whether they're active or obsolete. These are
indicated by the following XxxCleaned stats:
getNLNsCleaned() |
"Number of potentially active LNs." |
getNINsCleaned() |
"Number of potentially active INs." |
getNBINDeltasCleaned() |
"Number of potentially active BIN-deltas." |
The sum of the XxxObsolete and XxxCleaned stats
is the total processed:
CleanerEntriesRead =
(LNsObsolete + INsObsolete + BINDeltasObsolete) +
(LNsCleaned + INsCleaned + BINDeltasCleaned)
The number of expired and extinct LNs are broken out as separate stats. These are a subset of the known-obsolete LNs:
getNLNsExpired() |
"Number of known-obsolete LNs that were expired." |
getNLNsExtinct() |
"Number of known-obsolete LNs that were extinct." |
If the Btree lookup does not find the entry, then it is actually obsolete. This can happen for two reasons:
Such entries are indicated by the XxxDead stats:
getNLNsDead() |
"Number of LNs that were not found in the Btree." |
getNINsDead() |
"Number of INs that were not found in the Btree." |
getNBINDeltasDead() |
"Number of BIN-deltas that were not found in the Btree." |
If the entry is active in the Btree, it must be preserved by the cleaner. Such entries are indicated by the following stats:
getNLNsMigrated() |
"Number of active LNs that were migrated by logging them." |
getNLNsMarked() |
"Number of active LNs in temporary DBs that were migrated by dirtying them." |
getNLNsLocked() |
"Number of potentially active LNs that were added to the pending queue because they were locked." |
getNINsMigrated() |
"Number of active INs that were migrated by dirtying them." |
getNBINDeltasMigrated() |
"Number of active BIN-deltas that were migrated by dirtying them." |
The stats above have the following meanings:
Migrated LNs are logged when they
are processed by the cleaner.Marked LNs are active LNs in
temporary DBs that are marked
dirty. They will be logged only if they are evicted from cache.Locked LNs cannot be processed
immediately and they are added to a pending queue. Pending LNs are
discussed in the next section.Migrated INs are simply marked dirty,
and they will be logged by the next checkpoint.Migrated BIN-deltas are also
simply marked dirty.The stats above provide a break down of cleaned entries as follows:
LNsCleaned = LNsDead + LNsMigrated + LNsMarked +
LNsLockedINsCleaned = INsDead + INsMigratedBINDeltasCleaned = BINDeltasDead + BINDeltasMigratedWhen LNs are processed, a queue is used to reduce Btree lookups. LNs are added to the queue when cleaning is needed (they are not known-obsolete). When the queue fills, the oldest LN in the queue is processed. If the LN is found in the Btree, the other LNs in the queue are checked to see if they have the same parent BIN. If so, these LNs can be processed while the BIN is latched, without an additional Btree lookup. The number of such LNs is indicated by the following stat:
getNLNQueueHits() |
"Number of potentially active LNs that did not require a separate Btree lookup." |
The LN queue is most beneficial when LNs are inserted or updated in
key order. The maximum size of the queue, expressed as its maximum memory
size, can be changed via the
EnvironmentConfig.CLEANER_LOOK_AHEAD_CACHE_SIZE param.
When the cleaner is processing a Btree entry (LN or IN) there are two cases where completion of cleaning (and deletion of the file) must be deferred.
If one of these conditions occurs, the LN or DB is added to a pending queue. The cleaner will periodically process the entries in the queue and attempt to resolve them as follows.
When there are no more pending LNs and DBs for a given file then cleaning of the file will be considered complete and it will become a candidate for deletion after the next checkpoint. If a pending entry causes file deletion to be delayed, because the pending entries cannot be resolved before the next checkpoint, a WARNING level message is logged with more information about the pending entries.
The following stats indicate the size of the pending LN queues, how many LNs in the queue have been processed, and of those processed how many remain unresolved because the record is still write-locked.
getPendingLNQueueSize() |
"Number of LNs pending because they were locked." |
getNPendingLNsProcessed() |
"Number of pending LNs that were re-processed." |
getNPendingLNsLocked() |
"Number of pending LNs that were still locked." |
If pending LNs remain unresolved, this could mean an application or JE bug has prevented a write-lock from being released. This could happen, for example, if the application fails to end a transaction or close a cursor. For such bugs, closing and re-opening the Environment is usually needed to allow file deletion to proceed. If this occurs for multiple files and is not resolved, it can eventually lead to an out-of-disk situation.
The following stats indicate the size of the pending DB queue, how many DBs in the queue have been processed, and of those processed how many remain unresolved because the removal/truncation is still incomplete.
getPendingDBQueueSize() |
"Number of DBs pending because DB removal/truncation was incomplete." |
getNPendingDBsProcessed() |
"Number of pending DBs that were re-processed." |
getNPendingDBsIncomplete() |
"Number of pending DBs for which DB removal/truncation was still incomplete." |
If pending DBs remain unresolved, this may indicate that the asynchronous portion of DB removal/truncation is taking longer than expected. After a DB removal/truncation transaction is committed, JE asynchronously counts the data for the DB obsolete.
When the TTL feature is used, the
obsolete portion of the log includes data that has expired. An expiration
histogram is stored for each file and is used to compute the expired size.
The current minimum and maximum utilization are the lower and upper
bounds of computed utilization. They are different only when the TTL
feature is used, and some data in the file has expired while other data
has become obsolete for other reasons, such as record updates, record
deletions or checkpoints. In this case the strictly obsolete size and the
expired size may overlap because they are maintained separately.
If the two sizes overlap completely then the minimum utilization is correct, while if there is no overlap then the maximum utilization is correct. Both utilization values trigger cleaning, but when there is significant overlap, the cleaner will perform two-pass cleaning. The following stats indicate the use of two-pass cleaning:
getNCleanerTwoPassRuns() |
"Number of cleaner runs that resulted in two-pass runs." |
getNCleanerRevisalRuns() |
"Number of potential cleaner runs that revised expiration info, but did result in any cleaning." |
In the first pass of two-pass cleaning, the file is read to recompute
obsolete and expired sizes, but the file is not cleaned. As a result of
recomputing the expired sizes, the strictly obsolete and expired sizes
will no longer overlap, and the minimum and maximum utilization will be
equal. If the file should still be cleaned, based on the recomputed
utilization, it is cleaned as usual, and in this case the number of
two-pass runs is incremented.
If the file should not be cleaned because its recomputed utilization is
higher than expected, the file will not be cleaned. Instead, its recomputed
expiration histogram, which now has size information that does not overlap
with the strictly obsolete data, is stored for future use. By storing the
revised histogram, the cleaner can select the most appropriate files for
cleaning in the future. In this case the number of revisal runs is incremented, and the number of
total runs is not incremented.
The JE cleaner component is also responsible for checking and enforcing
the EnvironmentConfig.MAX_DISK and EnvironmentConfig.FREE_DISK limits, and for protecting cleaned files from
deletion while they are in use by replication, backups, etc. This
process is described in the EnvironmentConfig.MAX_DISK javadoc. The
stats related to disk space management are:
getActiveLogSize() |
"Bytes used by all active data files: files required for basic JE operation." |
getAvailableLogSize() |
"Bytes available for write operations when unprotected reserved files are deleted: free space + reservedLogSize - protectedLogSize." |
getReservedLogSize() |
"Bytes used by all reserved data files: files that have been cleaned and can be deleted if they are not protected." |
getProtectedLogSize() |
"Bytes used by all protected data files: the subset of reserved files that are temporarily protected and cannot be deleted." |
getProtectedLogSizeMap() |
"A breakdown of protectedLogSize as a map of protecting entity name to protected size in bytes." |
getTotalLogSize() |
"Total bytes used by data files on disk: activeLogSize + reservedLogSize." |
getNCleanerDeletions() |
"Number of cleaner file deletions." |
The space taken by all data files, totalLogSize, is divided into
categories according to these stats as illustrated below.
/--------------------------------------------------\
| |
| Active files -- have not been cleaned |
| and cannot be deleted |
| |
| Utilization = |
| (utilized size) / (total active size) |
| |
|--------------------------------------------------|
| |
| Reserved files -- have been cleaned and |
| can be deleted |
| |
| /----------------------------------------------\ |
| | | |
| | Protected files -- temporarily in use by | |
| | replication, backups, etc.| |
| | | |
| \----------------------------------------------/ |
| |
\--------------------------------------------------/
A key point is that reserved data files will be deleted by JE automatically to prevent violation of a disk limit, as long as the files are not protected. This has two important implications:
current utilization stats
are calculated based only on the active data files. Reserved files are
ignored in this calculation.availableLogSize stat includes
the size of the reserved files that are not protected. These files
will be deleted automatically, if this is necessary to allow write
operations.We strongly recommend using availableLogSize to monitor disk
usage and take corrective action well before this value reaches zero.
Monitoring the file system free space is not a substitute for this, since
the data files include reserved files that will be deleted by JE
automatically.
Applications should normally define a threshold for
availableLogSize and raise an alert of some kind when the threshold is
reached. When this happens applications may wish to free space (by
deleting records, for example) or expand storage capacity. If JE write
operations are needed as part of this procedure, corrective action
must be taken while there is still enough space available to perform the
write operations.
For example, to free space by deleting records requires enough space to log the deletions, and enough temporary space for the cleaner to reclaim space for the deleted records. As described in the sections above, the cleaner uses more disk space temporarily in order to migrate LNs, and a checkpoint must be performed before deleting the cleaned files.
How much available space is needed is application specific and testing
may be required to determine the application's availableLogSize
threshold. Note that the default EnvironmentConfig.FREE_DISK
value, five GB, may or may not be large enough to perform the application's
recovery procedure. The default FREE_DISK limit is intended to
reserve space for recovery when application monitoring of
availableLogSize fails and emergency measures must be taken.
If availableLogSize is unexpectedly low, it is possible that
protected files are preventing space from being reclaimed. This could be
due to replication, backups, etc. See getReservedLogSize() and
getProtectedLogSizeMap() for more information.
It is also possible that data files cannot be deleted due to read-only
processes. When one process opens a JE environment in read-write mode and
one or more additional processes open the environment in read-only mode, the read-only
processes will prevent the read-write process from deleting data files.
For this reason, long running read-only processes are strongly
discouraged in a production environment. When data file deletion is
prevented for this reason, a SEVERE level message is logged with more
information.
Group Name: "I/O"
Description: "The file I/O component of the append-only storage system includes data file access, buffering and group commit."
JE accesses data files (.jdb files) via Java's standard file system APIs. Because opening a file is relatively expensive, an LRU-based cache of open file handles is maintained. The stats below indicate how many cached file handles are currently open and how many open file operations have taken place.
getNOpenFiles() |
"Number of files currently open in the file cache." |
getNFileOpens() |
"Number of times a log file has been opened." |
To prevent expensive file open operations during record read operations,
set EnvironmentConfig.LOG_FILE_CACHE_SIZE to the maximum number of
data files expected in the Environment.
Note that JE may open the same file more than once. If a read operation
in one thread is accessing a file via its cached handle and another thread
attempts to read from the same file, a temporary handle is opened just for
the duration of the read. The getNFileOpens() stat includes open
operations for both cached file handles and temporary file handles.
Therefore, this stat cannot be used to determine whether the file cache
is too small.
When a file read is performed, it is always possible for the read buffer size to be smaller than the log entry being read. This is because JE's append-only log contains variable sized entries rather than pages. If the read buffer is too small to contain the entire entry, a repeat read with a larger buffer must be performed. These additional reads can be reduced by monitoring the following two stats and increasing the read buffer size as described below.
When Btree nodes are read at known file locations (by user API operations, for example), the following stat indicates the number of repeat reads:
getNRepeatFaultReads() |
"Number of times a log entry size exceeded the log fault read size." |
When the number of getNRepeatFaultReads() is significant,
consider increasing EnvironmentConfig.LOG_FAULT_READ_SIZE.
When data files are read sequentially (by the cleaner, for example) the following stat indicates the number of repeat reads:
getNRepeatIteratorReads() |
"Number of times a log entry size exceeded the log iterator max size." |
When the number of getNRepeatIteratorReads() is significant,
consider increasing EnvironmentConfig.LOG_ITERATOR_MAX_SIZE.
The two groups of stats below indicate JE file system reads and writes as number of operations and number of bytes. These stats are roughly divided into random and sequential operations by assuming that storage devices can optimize for sequential access if two consecutive operations are performed one MB or less apart in the same file. This categorization is approximate and may differ from the actual number depending on the type of disks and file system, disk geometry, and file system cache size.
The JE file read and write stats can sometimes be useful for debugging
or for getting a rough idea of I/O characteristics. However, monitoring
of system level I/O stats (e.g., using iostat) gives a more
accurate picture of actual I/O since access via the buffer cache is
not included. In addition the JE stats are not broken out by operation
type and therefore don't add a lot of useful information to the system
level I/O stats, other than the rough division of random and sequential
I/O.
The JE file read stats are:
getNRandomReads() |
"Number of disk reads which required a seek of more than 1MB from the previous file position or were read from a different file." |
getNRandomReadBytes() |
"Number of bytes read which required a seek of more than 1MB from the previous file position or were read from a different file." |
getNSequentialReads() |
"Number of disk reads which did not require a seek of more than 1MB from the previous file position and were read from the same file." |
getNSequentialReadBytes() |
"Number of bytes read which did not require a seek of more than 1MB from the previous file position and were read from the same file." |
JE file read stats include file access resulting from the following operations. Because internal operations are included, it is not practical to correlate these stats directly to user operations.
Database.get and
Cursor.get.Btree verification.getNRepeatFaultReads() or
getNRepeatIteratorReads() are consistently non-zero.log
verification does perform read I/O, this I/O is not included
in the JE file read stats. The same is true for a
NetworkRestore in a replicated
environment: the read I/O on the source node is not counted in the JE
file read stats.The JE file write stats are:
getNRandomWrites() |
"Number of disk writes which required a seek of more than 1MB from the previous file position or were read from a different file." |
getNRandomWriteBytes() |
"Number of bytes written which required a seek of more than 1MB from the previous file position or were read from a different file." |
getNSequentialWrites() |
"Number of disk writes which did not require a seek of more than 1MB from the previous file position and were read from the same file." |
getNSequentialWriteBytes() |
"Number of bytes written which did not require a seek of more than 1MB from the previous file position and were read from the same file." |
JE file write stats include file access resulting from the following operations. As with the read stats, because internal operations are included it is not practical to correlate the write stats directly to user operations.
Database.put and
Cursor.put.NetworkRestore does
perform write I/O, this I/O is not included in the JE file
write stats.JE uses an append-only storage system where each log entry is assigned an LSN (log sequence number). The LSN is a 64-bit integer consisting of two 32-bit parts: the file number is the high order 32-bits and the file offset is the low order 32-bits.
LSNs are used in the Btree to reference child nodes from their parent node. Therefore a node's LSN is assigned when the node is written, including the case where the write is buffered. The next LSN to be assigned is indicated by the following stat:
getEndOfLog() |
"The LSN of the next entry to be written to the log." |
LSN assignment and assignment of log buffer space must be performed serially, and therefore these operations occur in a logging critical section. In general JE strives to do as little additional work as possible in the logging critical section. However, in certain cases additional operations are performed in the critical section and these generally impact performance negatively. These special cases will be noted in the sections that follow.
A set of JE log buffers is used to buffer writes. When write operations
use Durability.SyncPolicy.NO_SYNC, a file write is not performed until a log
buffer is filled. This positively impacts performance by reducing the
number of file writes. Note that checkpoint writes use NO_SYNC, so
this benefits performance even when user operations do not use
NO_SYNC.
(When Durability.SyncPolicy.SYNC or Durability.SyncPolicy.WRITE_NO_SYNC
is used, the required file write and fsync are performed using a group
commit mechanism, which is described further
below.)
The size and number of log buffers is configured using
EnvironmentConfig.LOG_BUFFER_SIZE,
EnvironmentConfig.LOG_NUM_BUFFERS and
EnvironmentConfig.LOG_TOTAL_BUFFER_BYTES. The resulting total size
and number of buffers is indicated by the following stats:
getBufferBytes() |
"Total memory currently consumed by all log buffers, in bytes." |
getNLogBuffers() |
"Number of log buffers." |
The default buffer size (one MB) is expected to be optimal for most applications. In NoSQL DB, the default buffer size is used. However, if an individual entry (e.g., a BIN or LN) is larger than the buffer size, the log buffer mechanism is bypassed and this can negatively impact performance. When writing such an entry, the write occurs in the critical section using a temporary buffer, and any dirty log buffers all also written in the critical section. When this occurs it is indicated by the following stat:
getNTempBufferWrites() |
"Number of writes for entries larger than the log buffer size, forcing a write in the critical section." |
When getNTempBufferWrites() is consistently non-zero, consider
increasing the log buffer size.
The number of buffers also impacts write performance when many threads are performing write operations. The use of multiple buffers allows one writing thread to flush the completed dirty buffers while other writing threads add entries to "clean" buffers (that have already been written).
If many threads are adding to clean buffers while the completed dirty buffers are being written, it is possible that no more clean buffers will be available for adding entries. When this happens, the dirty buffers are flushed in the critical section, which can negatively impact performance. This is indicated by the following stat:
getNNoFreeBuffer() |
"Number of writes that could not obtain a free buffer, forcing a write in the critical section." |
When getNNoFreeBuffer() is consistently non-zero, consider
increasing the number of log buffers.
The number of log buffers also impacts read performance. JE read operations use the log buffers to read entries that were recently written. This occurs infrequently in the case of user read operations via the JE APIs, since recently written data is infrequently read and is often resident in the cache. However, it does occur frequently and is an important factor in the following cases:
Because of the last point above involving replication, in NoSQL DB the number of log buffers is set to 16. In general we recommend configuring 16 buffers or more for a replicated environment.
The following stats indicate the number of requests to read log entries by LSN, and the number that were not found in the log buffers.
getNNotResident() |
"Number of requests to read log entries by LSN." |
getNCacheMiss() |
"Number of requests to read log entries by LSN that were not present in the log buffers." |
In general these two stats are used only for internal JE debugging and
are not useful to the application. This is because
getNNotResident() is roughly the sum of the
VLSNIndex nMisses replication stat and the cache fetch miss stats:
getNLNsFetchMiss(), getNBINsFetchMiss(),
getNFullBINsMiss() and getNUpperINsFetchMiss().
JE performs special locking to prevent an fsync and a file write from executing concurrently. TODO: Why is this disallowed for all file systems?.
The write queue is a single, low-level buffer that reduces blocking due
to a concurrent fsync and file write request.
When a write of a dirty log buffer is needed to free a log buffer for a
Durability.SyncPolicy.NO_SYNC operation (i.e., durability is not required),
the write queue is used to hold the data temporarily and allow a log
buffer to be freed.
Use of the write queue is strongly recommended since there is no known
drawback to using it. It is enabled by default and in NoSQL DB. However,
it can be disabled if desired by setting
EnvironmentConfig.LOG_USE_WRITE_QUEUE to false.
The following stats indicate use of the write queue for satisfying file write and read requests. Note that when the write queue is enabled, all file read requests must check the write queue to avoid returning stale data.
getNWritesFromWriteQueue() |
"Number of file write operations executed from the pending write queue." |
getNBytesWrittenFromWriteQueue() |
"Number of bytes written from the pending write queue." |
getNReadsFromWriteQueue() |
"Number of file read operations which were fulfilled by reading out of the pending write queue." |
getNBytesReadFromWriteQueue() |
"Number of bytes read to fulfill file read operations by reading out of the pending write queue." |
The default size of the write queue (one MB) is expected to be adequate for most applications. Note that the write queue size should never be smaller than the log buffer size (which is also one MB by default). In NoSQL DB, the default sizes for the write queue and the log buffer are used.
However, when many NO_SYNC writes are requested during an fsync,
some write requests may have to block until the fsync is complete. This
is indicated by the following stats:
getNWriteQueueOverflow() |
"Number of write operations which would overflow the write queue." |
getNWriteQueueOverflowFailures() |
"Number of write operations which would overflow the write queue and could not be queued." |
When a NO_SYNC write request occurs during an fsync and the
size of the write request's data is larger than the free space in the
write queue, the getNWriteQueueOverflow() stat is incremented.
When this stat is consistently non-zero, consider the following possible
reasons and remedies:
EnvironmentConfig.LOG_WRITE_QUEUE_SIZE is at least as
large as the EnvironmentConfig.LOG_BUFFER_SIZE.getNTempBufferWrites()
stat. Consider increasing LOG_WRITE_QUEUE_SIZE and/or
LOG_BUFFER_SIZE such that getNTempBufferWrites() is
consistently zero.NO_SYNC write requests
during a single fync, the write queue may not be large enough to
prevent overflows. After the two causes above have been ruled out,
consider increasing the LOG_WRITE_QUEUE_SIZE.When such a write queue overflow occurs, JE will wait for the fsync to
complete, empty the write queue by writing it to the file, and attempt
again to add the data to the write queue. If this fails again because
there is still not enough free space in the write queue, then the
getNWriteQueueOverflowFailures() stat is incremented. In this
case the data is written to the file rather than adding it to the write
queue, even though this may require waiting for an fsync to complete.
If getNWriteQueueOverflowFailures() is consistently non-zero,
the possible causes are the same as those listed above, and the remedies
described above should be applied.
When Durability.SyncPolicy.SYNC or Durability.SyncPolicy.WRITE_NO_SYNC is
used for transactional write operations, the required file write and fsync
are performed using a group commit mechanism. In the presence of
concurrent transactions, this mechanism often allows performing a single
write and fsync for multiple transactions, while still ensuring that the
write and fsync are performed before the transaction commit()
method (or the put() or delete() operation method in this
case of auto-commit) returns successfully.
First note that not all file write and fsync operations are due to user transaction commits, and not all fsyncs use the group commit mechanism.
SYNC or WRITE_NO_SYNC durability. In these cases
the group commit mechanism is used.Environment.flushLog(boolean) is called by the application,
a file write is performed and, if the fsync parameter is true,
an fsync is also performed. A file write and fsync are also performed
after an interval of no write activity, as determined by
EnvironmentConfig.LOG_FLUSH_NO_SYNC_INTERVAL and
EnvironmentConfig.LOG_FLUSH_SYNC_INTERVAL. In these cases the
group commit mechanism is not used.The following stats describe all fsyncs performed by JE, whether or not the group commit mechanism is used.
getNLogFSyncs() |
"Number of fsyncs of the JE log." |
getFSyncAvgMs() |
"Average number of milliseconds used to perform fsyncs." |
getFSync95Ms() |
"95th percentile of milliseconds used to perform fsyncs." |
getFSync99Ms() |
"99th percentile of milliseconds used to perform fsyncs." |
getFSyncMaxMs() |
"Maximum number of milliseconds used to perform a single fsync." |
Long fsync times often result in long transaction latencies. When this
is indicated by the above stats, be sure to ensure that the linux page
cache has been tuned to permit the OS to write asynchronously to disk
whenever possible. For the NoSQL DB product this is described under
Linux
Page Cache Tuning. To aid in diagnosing long fsyncs, a WARNING level
message is logged when the maximum fsync time exceeds
EnvironmentConfig.LOG_FSYNC_TIME_LIMIT
The following stats indicate when group commit is requested for a write
operation. Group commit requests include all user transactions with
SYNC or WRITE_NO_SYNC durability, as well as the internal JE write
operations that use group commit.
getNGroupCommitRequests() |
"Number of group commit requests." |
getNFSyncRequests() |
"Number of group commit requests that include an fsync request." |
All group commit requests result in a group commit operation that
flushes all dirty log buffers and the write queue using a file write.
In addition, requests using SYNC durability will cause the group
commit operation to include an fsync.
Because group commit operations are performed serially, while a group commit is executing in one thread, one or more other threads may be waiting to perform a group commit. The group commit mechanism works by forming a group containing the waiting threads. When the prior group commit is finished, a single group commit is performed on behalf of the new group in one of this group's threads, which is called the leader. The other threads in the group are called waiters and they proceed only after the leader has finished the group commit.
If a waiter thread waits longer than
EnvironmentConfig.LOG_FSYNC_TIMEOUT for the leader to finish the
group commit operation, the waiter will remove itself from the group and
perform a group commit operation independently. The number of such
timeouts is indicated by the following stat:
getNFSyncTimeouts() |
"Number of group commit waiter threads that timed out." |
The timeout is intended to prevent waiter threads from waiting
indefinitely due to an unexpected problem. If getNFSyncTimeouts()
is consistently non-zero and the application is performing normally in
other respects, consider increasing
EnvironmentConfig.LOG_FSYNC_TIMEOUT.
The following stat indicates the number of group commit operations that included an fsync. There is currently no stat available indicating the number of group commit operations that did not include an fsync.
getNFSyncs() |
"Number of group commit fsyncs completed." |
Note that getNFSyncs() is a subset of the
getNLogFSyncs() total that is described further above.
Group Name: "Node Compression"
Description: "Deleted records are removed from Btree internal nodes asynchronously and nodes are deleted when they become empty."
The following statistics are available. More information will be provided in a future release.
getSplitBins() |
"Number of BINs encountered by the INCompressor that were split between the time they were put on the compressor queue and when the compressor ran." |
getDbClosedBins() |
"Number of BINs encountered by the INCompressor that had their database closed between the time they were put on the compressor queue and when the compressor ran." |
getCursorsBins() |
"Number of BINs encountered by the INCompressor that had cursors referring to them when the compressor ran." |
getNonEmptyBins() |
"Number of BINs encountered by the INCompressor that were not actually empty when the compressor ran." |
getProcessedBins() |
"Number of BINs that were successfully processed by the INCompressor." |
getInCompQueueSize() |
"Number of entries in the INCompressor queue." |
Group Name: "Checkpoints"
Description: "Dirty Btree internal nodes are written to the data log periodically to bound recovery time."
The following statistics are available. More information will be provided in a future release.
getNCheckpoints() |
"Number of checkpoints performed." |
getLastCheckpointInterval() |
"Byte length from last checkpoint start to the previous checkpoint start." |
getNFullINFlush() |
"Number of full INs flushed to the log." |
getNFullBINFlush() |
"Number of full BINs flushed to the log." |
getNDeltaINFlush() |
"Number of BIN-deltas flushed to the log." |
getLastCheckpointId() |
"Id of the last checkpoint." |
getLastCheckpointStart() |
"Location in the log of the last checkpoint start." |
getLastCheckpointEnd() |
"Location in the log of the last checkpoint end." |
Group Name: "Locks"
Description: "Record locking is used to provide transactional capabilities."
The following statistics are available. More information will be provided in a future release.
getNReadLocks() |
"Number of read locks currently held." |
getNWriteLocks() |
"Number of write locks currently held." |
getNOwners() |
"Number of lock owners in lock table." |
getNRequests() |
"Number of times a lock request was made." |
getNTotalLocks() |
"Number of locks currently held." |
getNWaits() |
"Number of times a lock request blocked." |
getNWaiters() |
"Number of threads waiting for a lock." |
Group Name: "Op"
Description: "Throughput statistics for JE calls."
The following statistics are available. More information will be provided in a future release.
getPriSearchOps() |
"Number of successful primary DB key search operations." |
getPriSearchFailOps() |
"Number of failed primary DB key search operations." |
getSecSearchOps() |
"Number of successful secondary DB key search operations." |
getSecSearchFailOps() |
"Number of failed secondary DB key search operations." |
getPriPositionOps() |
"Number of successful primary DB position operations." |
getSecPositionOps() |
"Number of successful secondary DB position operations." |
getPriInsertOps() |
"Number of successful primary DB insertion operations." |
getPriInsertFailOps() |
"Number of failed primary DB insertion operations." |
getSecInsertOps() |
"Number of successful secondary DB insertion operations." |
getPriUpdateOps() |
"Number of successful primary DB update operations." |
getSecUpdateOps() |
"Number of successful secondary DB update operations." |
getPriDeleteOps() |
"Number of successful primary DB deletion operations." |
getPriDeleteFailOps() |
"Number of failed primary DB deletion operations." |
getSecDeleteOps() |
"Number of successful secondary DB deletion operations." |
Group Name: "BtreeOp"
Description: "Btree internal operation statistics."
The following statistics are available. More information will be provided in a future release.
getRelatchesRequired() |
"Number of btree latch upgrades required while operating on this Environment. A measurement of contention." |
getRootSplits() |
"Number of times a database btree root was split." |
getNBinDeltaGetOps() |
"Number of gets performed in BIN-deltas" |
getNBinDeltaInsertOps() |
"Number of insertions performed in BIN-deltas" |
getNBinDeltaUpdateOps() |
"Number of updates performed in BIN-deltas" |
getNBinDeltaDeleteOps() |
"Number of deletions performed in BIN-deltas" |
Group Name: "Environment"
Description: "Miscellaneous environment wide statistics."
The following statistics are available. More information will be provided in a future release.
getEnvironmentCreationTime() |
"System time when the Environment was opened. " |
| Modifier and Type | Method | Description |
|---|---|---|
long |
getActiveLogSize() |
"Bytes used by all active data files: files required for basic JE operation."
|
long |
getAdminBytes() |
"Number of bytes of JE main cache used for cleaner and checkpointer metadata, in bytes."
|
long |
getAvailableLogSize() |
"Bytes available for write operations when unprotected reserved files are deleted: free space + reservedLogSize - protectedLogSize."
|
long |
getAvgBatchCacheMode() |
Deprecated.
This statistic has been removed.
|
long |
getAvgBatchCritical() |
Deprecated.
This statistic has been removed.
|
long |
getAvgBatchDaemon() |
Deprecated.
This statistic has been removed.
|
long |
getAvgBatchEvictorThread() |
Deprecated.
This statistic has been removed.
|
long |
getAvgBatchManual() |
Deprecated.
This statistic has been removed.
|
long |
getBufferBytes() |
"Total memory currently consumed by all log buffers, in bytes."
|
long |
getCacheDataBytes() |
Deprecated.
Please use
getDataBytes() to get the amount of cache
used for data and use getAdminBytes(), getLockBytes() and
getBufferBytes() to get other components of the total cache usage
(getCacheTotalBytes()). |
long |
getCacheTotalBytes() |
"Total amount of JE main cache in use, in bytes."
|
int |
getCleanerBacklog() |
Deprecated.
in 7.0, always returns zero.
|
float |
getCorrectedAvgLNSize() |
Deprecated.
in JE 5.0.56.
|
int |
getCurrentMaxUtilization() |
"Upper bound for current log utilization as a percentage."
|
int |
getCurrentMinUtilization() |
"Lower bound for current log utilization as a percentage."
|
long |
getCursorsBins() |
"Number of BINs encountered by the INCompressor that had cursors referring to them when the compressor ran."
|
long |
getDataAdminBytes() |
Deprecated.
as of JE 18.1, always returns zero.
|
long |
getDataBytes() |
"Amount of JE main cache used for holding data, keys and internal Btree nodes, in bytes."
|
long |
getDbClosedBins() |
"Number of BINs encountered by the INCompressor that had their database closed between the time they were put on the compressor queue and when the compressor ran."
|
long |
getDirtyLRUSize() |
"Number of INs in the dirty/priority-2 LRU "
|
long |
getDOSBytes() |
"Amount of JE main cache consumed by disk-ordered cursor and Database.count operations, in bytes."
|
long |
getEndOfLog() |
"The LSN of the next entry to be written to the log."
|
long |
getEnvironmentCreationTime() |
"System time when the Environment was opened. "
|
float |
getEstimatedAvgLNSize() |
Deprecated.
in JE 5.0.56.
|
int |
getFileDeletionBacklog() |
Deprecated.
in 7.5, always returns zero.
|
long |
getFSync95Ms() |
"95th percentile of milliseconds used to perform fsyncs."
|
long |
getFSync99Ms() |
"99th percentile of milliseconds used to perform fsyncs."
|
long |
getFSyncAvgMs() |
"Average number of milliseconds used to perform fsyncs."
|
long |
getFSyncMaxMs() |
"Maximum number of milliseconds used to perform a single fsync."
|
long |
getFSyncMaxTime() |
Deprecated.
in 18.3, always 0.
|
long |
getFSyncTime() |
Deprecated.
in 18.3, always 0.
|
long |
getInCompQueueSize() |
"Number of entries in the INCompressor queue."
|
long |
getLastCheckpointEnd() |
"Location in the log of the last checkpoint end."
|
long |
getLastCheckpointId() |
"Id of the last checkpoint."
|
long |
getLastCheckpointInterval() |
"Byte length from last checkpoint start to the previous checkpoint start."
|
long |
getLastCheckpointStart() |
"Location in the log of the last checkpoint start."
|
int |
getLastKnownUtilization() |
Deprecated.
in JE 6.5, use
getCurrentMinUtilization() or
getCurrentMaxUtilization() instead. |
float |
getLNSizeCorrectionFactor() |
Deprecated.
in JE 6.3.
|
long |
getLockBytes() |
"Number of bytes of JE cache used for holding locks and transactions, in bytes."
|
long |
getMixedLRUSize() |
"Number of INs in the mixed/priority-1 LRU "
|
int |
getNAcquiresNoWaiters() |
Deprecated.
Always returns zero.
|
int |
getNAcquiresNoWaitSuccessful() |
Deprecated.
Always returns zero.
|
int |
getNAcquiresNoWaitUnSuccessful() |
Deprecated.
Always returns zero.
|
int |
getNAcquiresSelfOwned() |
Deprecated.
Always returns zero.
|
int |
getNAcquiresWithContention() |
Deprecated.
Always returns zero.
|
long |
getNBatchesCacheMode() |
Deprecated.
This statistic has been removed.
|
long |
getNBatchesCritical() |
Deprecated.
This statistic has been removed.
|
long |
getNBatchesDaemon() |
Deprecated.
This statistic has been removed.
|
long |
getNBatchesEvictorThread() |
Deprecated.
This statistic has been removed.
|
long |
getNBatchesManual() |
Deprecated.
This statistic has been removed.
|
long |
getNBINDeltaBlindOps() |
"The number of operations performed blindly in BIN deltas"
|
long |
getNBinDeltaDeleteOps() |
"Number of deletions performed in BIN-deltas"
|
long |
getNBinDeltaGetOps() |
"Number of gets performed in BIN-deltas"
|
long |
getNBinDeltaInsertOps() |
"Number of insertions performed in BIN-deltas"
|
long |
getNBINDeltasCleaned() |
"Number of potentially active BIN-deltas."
|
long |
getNBINDeltasDead() |
"Number of BIN-deltas that were not found in the Btree."
|
long |
getNBINDeltasFetchMiss() |
"Number of BIN-deltas (partial BINs) fetched to satisfy btree operations that were not in main cache."
|
long |
getNBINDeltasMigrated() |
"Number of active BIN-deltas that were migrated by dirtying them."
|
long |
getNBINDeltasObsolete() |
"Number of known-obsolete BIN-deltas."
|
long |
getNBinDeltaUpdateOps() |
"Number of updates performed in BIN-deltas"
|
long |
getNBINsEvictedCacheMode() |
Deprecated.
This statistic has been removed.
|
long |
getNBINsEvictedCritical() |
Deprecated.
This statistic has been removed.
|
long |
getNBINsEvictedDaemon() |
Deprecated.
This statistic has been removed.
|
long |
getNBINsEvictedEvictorThread() |
Deprecated.
This statistic has been removed.
|
long |
getNBINsEvictedManual() |
Deprecated.
This statistic has been removed.
|
long |
getNBINsFetch() |
"Number of BINs (bottom internal nodes) and BIN-deltas requested by btree operations."
|
long |
getNBINsFetchMiss() |
"Number of full BINs (bottom internal nodes) and BIN-deltas fetched to satisfy btree operations that were not in main cache."
|
float |
getNBINsFetchMissRatio() |
"The BIN fetch miss ratio (nBINsFetchMiss / nBINsFetch)"
|
long |
getNBINsMutated() |
Deprecated.
Use
getNNodesMutated() instead. |
long |
getNBINsStripped() |
Deprecated.
Use
getNNodesStripped() instead. |
long |
getNBytesEvictedCacheMode() |
"Number of bytes evicted by operations for which CacheMode.EVICT_BIN is specified."
|
long |
getNBytesEvictedCritical() |
"Number of bytes evicted in the application thread because the cache is over budget."
|
long |
getNBytesEvictedDeamon() |
"Number of bytes evicted by JE deamon threads."
|
long |
getNBytesEvictedEvictorThread() |
"Number of bytes evicted by evictor pool threads."
|
long |
getNBytesEvictedManual() |
"Number of bytes evicted by the Environment.evictMemory or during Environment startup."
|
long |
getNBytesReadFromWriteQueue() |
"Number of bytes read to fulfill file read operations by reading out of the pending write queue."
|
long |
getNBytesWrittenFromWriteQueue() |
"Number of bytes written from the pending write queue."
|
long |
getNCachedBINDeltas() |
"Number of BIN-deltas (partial BINs) in main cache. This is a subset of the nCachedBINs value."
|
long |
getNCachedBINs() |
"Number of BINs (bottom internal nodes) and BIN-deltas in main cache."
|
long |
getNCachedUpperINs() |
"Number of upper INs (non-bottom internal nodes) in main cache."
|
long |
getNCacheMiss() |
"Number of requests to read log entries by LSN that were not present in the log buffers."
|
long |
getNCheckpoints() |
"Number of checkpoints performed."
|
long |
getNCleanerDeletions() |
"Number of cleaner file deletions."
|
long |
getNCleanerDiskRead() |
"Number of disk reads by the cleaner."
|
long |
getNCleanerEntriesRead() |
"Number of log entries processed by the cleaner."
|
long |
getNCleanerProbeRuns() |
Deprecated.
in JE 6.3, always returns zero.
|
long |
getNCleanerRevisalRuns() |
"Number of potential cleaner runs that revised expiration info, but did result in any cleaning."
|
long |
getNCleanerRuns() |
"Number of files processed by the cleaner, including two-pass runs."
|
long |
getNCleanerTwoPassRuns() |
"Number of cleaner runs that resulted in two-pass runs."
|
long |
getNClusterLNsProcessed() |
Deprecated.
always returns zero.
|
long |
getNDeltaINFlush() |
"Number of BIN-deltas flushed to the log."
|
long |
getNDirtyNodesEvicted() |
"Number of dirty target nodes logged and evicted."
|
long |
getNEvictionRuns() |
"Number of times the background eviction thread is awoken."
|
long |
getNEvictPasses() |
Deprecated.
Use
getNEvictionRuns() instead. |
int |
getNFileOpens() |
"Number of times a log file has been opened."
|
long |
getNFSyncRequests() |
"Number of group commit requests that include an fsync request."
|
long |
getNFSyncs() |
"Number of group commit fsyncs completed."
|
long |
getNFSyncTimeouts() |
"Number of group commit waiter threads that timed out."
|
long |
getNFullBINFlush() |
"Number of full BINs flushed to the log."
|
long |
getNFullBINsMiss() |
"Number of times a BIN-delta had to be mutated to a full BIN (and as a result a full BIN had to be read in from the log)."
|
long |
getNFullINFlush() |
"Number of full INs flushed to the log."
|
long |
getNGroupCommitRequests() |
"Number of group commit requests."
|
long |
getNINCompactKeyIN() |
"Number of INs that use a compact key representation to minimize the key object representation overhead."
|
long |
getNINNoTarget() |
"Number of INs that use a compact representation when none of its child nodes are in the main cache."
|
long |
getNINsCleaned() |
"Number of potentially active INs."
|
long |
getNINsDead() |
"Number of INs that were not found in the Btree."
|
long |
getNINsMigrated() |
"Number of active INs that were migrated by dirtying them."
|
long |
getNINsObsolete() |
"Number of known-obsolete INs."
|
long |
getNINSparseTarget() |
"Number of INs that use a compact sparse array representation to point to child nodes in the main cache."
|
long |
getNLNQueueHits() |
"Number of potentially active LNs that did not require a separate Btree lookup."
|
long |
getNLNsCleaned() |
"Number of potentially active LNs."
|
long |
getNLNsDead() |
"Number of LNs that were not found in the Btree."
|
long |
getNLNsEvicted() |
"Number of LNs evicted as a result of LRU-based eviction (but not CacheMode.EVICT_LN)."
|
long |
getNLNsExpired() |
"Number of known-obsolete LNs that were expired."
|
long |
getNLNsExtinct() |
"Number of known-obsolete LNs that were extinct."
|
long |
getNLNsFetch() |
"Number of LNs (data records) requested by btree operations."
|
long |
getNLNsFetchMiss() |
"Number of LNs (data records) requested by btree operations that were not in main cache."
|
long |
getNLNsLocked() |
"Number of potentially active LNs that were added to the pending queue because they were locked."
|
long |
getNLNsMarked() |
"Number of active LNs in temporary DBs that were migrated by dirtying them."
|
long |
getNLNsMigrated() |
"Number of active LNs that were migrated by logging them."
|
long |
getNLNsObsolete() |
"Number of known-obsolete LNs."
|
int |
getNLogBuffers() |
"Number of log buffers."
|
long |
getNLogFSyncs() |
"Number of fsyncs of the JE log."
|
long |
getNMarkedLNsProcessed() |
Deprecated.
always returns zero.
|
long |
getNNodesEvicted() |
"Number of target nodes (INs) evicted from the main cache."
|
long |
getNNodesExplicitlyEvicted() |
Deprecated.
Use
getNNodesEvicted() instead. |
long |
getNNodesMovedToDirtyLRU() |
"Number of nodes (INs) moved from the mixed/priority-1 to the dirty/priority-2 LRU list."
|
long |
getNNodesMutated() |
"Number of target BINs mutated to BIN-deltas."
|
long |
getNNodesPutBack() |
"Number of target nodes (INs) moved to the cold end of the LRU list without any action taken on them."
|
long |
getNNodesScanned() |
Deprecated.
This statistic has no meaning after the implementation
of the new evictor in JE 6.0.
|
long |
getNNodesSelected() |
Deprecated.
use
getNNodesTargeted() instead. |
long |
getNNodesSkipped() |
"Number of nodes (INs) that did not require any action."
|
long |
getNNodesStripped() |
"Number of target BINs for which space was reclaimed by deleting space for expired LNs or evicting resident LNs."
|
long |
getNNodesTargeted() |
"Number of nodes (INs) selected as eviction targets."
|
long |
getNNoFreeBuffer() |
"Number of writes that could not obtain a free buffer, forcing a write in the critical section."
|
long |
getNNotResident() |
"Number of requests to read log entries by LSN."
|
long |
getNonEmptyBins() |
"Number of BINs encountered by the INCompressor that were not actually empty when the compressor ran."
|
int |
getNOpenFiles() |
"Number of files currently open in the file cache."
|
int |
getNOwners() |
"Number of lock owners in lock table."
|
long |
getNPendingDBsIncomplete() |
"Number of pending DBs for which DB removal/truncation was still incomplete."
|
long |
getNPendingDBsProcessed() |
"Number of pending DBs that were re-processed."
|
long |
getNPendingLNsLocked() |
"Number of pending LNs that were still locked."
|
long |
getNPendingLNsProcessed() |
"Number of pending LNs that were re-processed."
|
long |
getNRandomReadBytes() |
"Number of bytes read which required a seek of more than 1MB from the previous file position or were read from a different file."
|
long |
getNRandomReads() |
"Number of disk reads which required a seek of more than 1MB from the previous file position or were read from a different file."
|
long |
getNRandomWriteBytes() |
"Number of bytes written which required a seek of more than 1MB from the previous file position or were read from a different file."
|
long |
getNRandomWrites() |
"Number of disk writes which required a seek of more than 1MB from the previous file position or were read from a different file."
|
int |
getNReadLocks() |
"Number of read locks currently held."
|
long |
getNReadsFromWriteQueue() |
"Number of file read operations which were fulfilled by reading out of the pending write queue."
|
int |
getNReleases() |
Deprecated.
Always returns zero.
|
long |
getNRepeatFaultReads() |
"Number of times a log entry size exceeded the log fault read size."
|
long |
getNRepeatIteratorReads() |
"Number of times a log entry size exceeded the log iterator max size."
|
long |
getNRequests() |
"Number of times a lock request was made."
|
long |
getNRootNodesEvicted() |
"Number of database root nodes (INs) evicted."
|
long |
getNSequentialReadBytes() |
"Number of bytes read which did not require a seek of more than 1MB from the previous file position and were read from the same file."
|
long |
getNSequentialReads() |
"Number of disk reads which did not require a seek of more than 1MB from the previous file position and were read from the same file."
|
long |
getNSequentialWriteBytes() |
"Number of bytes written which did not require a seek of more than 1MB from the previous file position and were read from the same file."
|
long |
getNSequentialWrites() |
"Number of disk writes which did not require a seek of more than 1MB from the previous file position and were read from the same file."
|
int |
getNSharedCacheEnvironments() |
"Number of Environments sharing the main cache."
|
long |
getNTempBufferWrites() |
"Number of writes for entries larger than the log buffer size, forcing a write in the critical section."
|
long |
getNThreadUnavailable() |
"Number of eviction tasks that were submitted to the background evictor pool, but were refused because all eviction threads were busy."
|
long |
getNToBeCleanedLNsProcessed() |
Deprecated.
always returns zero.
|
int |
getNTotalLocks() |
"Number of locks currently held."
|
long |
getNUpperINsEvictedCacheMode() |
Deprecated.
This statistic has been removed.
|
long |
getNUpperINsEvictedCritical() |
Deprecated.
This statistic has been removed.
|
long |
getNUpperINsEvictedDaemon() |
Deprecated.
This statistic has been removed.
|
long |
getNUpperINsEvictedEvictorThread() |
Deprecated.
This statistic has been removed.
|
long |
getNUpperINsEvictedManual() |
Deprecated.
This statistic has been removed.
|
long |
getNUpperINsFetch() |
"Number of Upper INs (non-bottom internal nodes) requested by btree operations."
|
long |
getNUpperINsFetchMiss() |
"Number of Upper INs (non-bottom internal nodes) requested by btree operations that were not in main cache."
|
int |
getNWaiters() |
"Number of threads waiting for a lock."
|
long |
getNWaits() |
"Number of times a lock request blocked."
|
int |
getNWriteLocks() |
"Number of write locks currently held."
|
long |
getNWriteQueueOverflow() |
"Number of write operations which would overflow the write queue."
|
long |
getNWriteQueueOverflowFailures() |
"Number of write operations which would overflow the write queue and could not be queued."
|
long |
getNWritesFromWriteQueue() |
"Number of file write operations executed from the pending write queue."
|
long |
getOffHeapAllocFailures() |
"Number of off-heap allocation failures due to lack of system memory."
|
long |
getOffHeapAllocOverflows() |
"Number of off-heap allocation attempts that exceeded the cache size."
|
long |
getOffHeapBINsLoaded() |
"Number of BINs loaded from the off-heap cache."
|
long |
getOffHeapBINsStored() |
"Number of BINs stored into the off-heap cache."
|
int |
getOffHeapCachedBINDeltas() |
"Number of BIN-deltas residing in the off-heap cache."
|
int |
getOffHeapCachedBINs() |
"Number of BINs (full BINs and BIN-deltas) residing in the off-heap cache."
|
int |
getOffHeapCachedLNs() |
"Number of LNs residing in the off-heap cache."
|
long |
getOffHeapCriticalNodesTargeted() |
"Number of nodes targeted in \'critical eviction\' mode."
|
long |
getOffHeapDirtyNodesEvicted() |
"Number of target BINs evicted from the off-heap cache that were dirty and therefore were logged."
|
long |
getOffHeapLNsEvicted() |
"Number of LNs evicted from the off-heap cache as a result of BIN stripping."
|
long |
getOffHeapLNsLoaded() |
"Number of LNs loaded from the off-heap cache."
|
long |
getOffHeapLNsStored() |
"Number of LNs stored into the off-heap cache."
|
long |
getOffHeapLRUSize() |
"Number of LRU entries used for the off-heap cache."
|
long |
getOffHeapNodesEvicted() |
"Number of target BINs (including BIN-deltas) evicted from the off-heap cache."
|
long |
getOffHeapNodesMutated() |
"Number of off-heap target BINs mutated to BIN-deltas."
|
long |
getOffHeapNodesSkipped() |
"Number of off-heap target BINs on which no action was taken."
|
long |
getOffHeapNodesStripped() |
"Number of target BINs for which space was reclaimed by deleting space for expired LNs or evicting resident LNs."
|
long |
getOffHeapNodesTargeted() |
"Number of BINs selected as off-heap eviction targets."
|
long |
getOffHeapThreadUnavailable() |
"Number of eviction tasks that were submitted to the background off-heap evictor pool, but were refused because all eviction threads were busy."
|
long |
getOffHeapTotalBlocks() |
"Total number of memory blocks in off-heap cache."
|
long |
getOffHeapTotalBytes() |
"Total number of estimated bytes in off-heap cache."
|
int |
getPendingDBQueueSize() |
"Number of DBs pending because DB removal/truncation was incomplete."
|
int |
getPendingLNQueueSize() |
"Number of LNs pending because they were locked."
|
int |
getPredictedMaxUtilization() |
"Upper bound for predicted log utilization as a percentage."
|
int |
getPredictedMinUtilization() |
"Lower bound for predicted log utilization as a percentage."
|
long |
getPriDeleteFailOps() |
"Number of failed primary DB deletion operations."
|
long |
getPriDeleteOps() |
"Number of successful primary DB deletion operations."
|
long |
getPriInsertFailOps() |
"Number of failed primary DB insertion operations."
|
long |
getPriInsertOps() |
"Number of successful primary DB insertion operations."
|
long |
getPriPositionOps() |
"Number of successful primary DB position operations."
|
long |
getPriSearchFailOps() |
"Number of failed primary DB key search operations."
|
long |
getPriSearchOps() |
"Number of successful primary DB key search operations."
|
long |
getPriUpdateOps() |
"Number of successful primary DB update operations."
|
long |
getProcessedBins() |
"Number of BINs that were successfully processed by the INCompressor."
|
long |
getProtectedLogSize() |
"Bytes used by all protected data files: the subset of reserved files that are temporarily protected and cannot be deleted."
|
java.util.SortedMap<java.lang.String,java.lang.Long> |
getProtectedLogSizeMap() |
"A breakdown of protectedLogSize as a map of protecting entity name to protected size in bytes."
|
long |
getRelatchesRequired() |
"Number of btree latch upgrades required while operating on this Environment. A measurement of contention."
|
long |
getRequiredEvictBytes() |
Deprecated.
The method returns 0 always.
|
long |
getReservedLogSize() |
"Bytes used by all reserved data files: files that have been cleaned and can be deleted if they are not protected."
|
long |
getRootSplits() |
"Number of times a database btree root was split."
|
long |
getSecDeleteOps() |
"Number of successful secondary DB deletion operations."
|
long |
getSecInsertOps() |
"Number of successful secondary DB insertion operations."
|
long |
getSecPositionOps() |
"Number of successful secondary DB position operations."
|
long |
getSecSearchFailOps() |
"Number of failed secondary DB key search operations."
|
long |
getSecSearchOps() |
"Number of successful secondary DB key search operations."
|
long |
getSecUpdateOps() |
"Number of successful secondary DB update operations."
|
long |
getSharedCacheTotalBytes() |
"Total amount of the shared JE main cache in use, in bytes."
|
long |
getSplitBins() |
"Number of BINs encountered by the INCompressor that were split between the time they were put on the compressor queue and when the compressor ran."
|
long |
getTotalLogSize() |
"Total bytes used by data files on disk: activeLogSize + reservedLogSize."
|
java.lang.String |
toString() |
Returns a String representation of the stats in the form of
<stat>=<value>
|
java.lang.String |
toStringVerbose() |
Returns a String representation of the stats which includes stats
descriptions in addition to <stat>=<value>
|
public long getEnvironmentCreationTime()
"System time when the Environment was opened. "
Group: "Environment"
Name: "environmentCreationTime"
public long getCursorsBins()
"Number of BINs encountered by the INCompressor that had cursors referring to them when the compressor ran."
Group: "Node Compression"
Name: "cursorsBins"
public long getDbClosedBins()
"Number of BINs encountered by the INCompressor that had their database closed between the time they were put on the compressor queue and when the compressor ran."
Group: "Node Compression"
Name: "dbClosedBins"
public long getInCompQueueSize()
"Number of entries in the INCompressor queue."
Group: "Node Compression"
Name: "inCompQueueSize"
public long getNonEmptyBins()
"Number of BINs encountered by the INCompressor that were not actually empty when the compressor ran."
Group: "Node Compression"
Name: "nonEmptyBins"
public long getProcessedBins()
"Number of BINs that were successfully processed by the INCompressor."
Group: "Node Compression"
Name: "processedBins"
public long getSplitBins()
"Number of BINs encountered by the INCompressor that were split between the time they were put on the compressor queue and when the compressor ran."
Group: "Node Compression"
Name: "splitBins"
public long getLastCheckpointId()
"Id of the last checkpoint."
Group: "Checkpoints"
Name: "lastCheckpointId"
public long getNCheckpoints()
"Number of checkpoints performed."
Group: "Checkpoints"
Name: "nCheckpoints"
public long getNFullINFlush()
"Number of full INs flushed to the log."
Group: "Checkpoints"
Name: "nFullINFlush"
public long getNFullBINFlush()
"Number of full BINs flushed to the log."
Group: "Checkpoints"
Name: "nFullBINFlush"
public long getNDeltaINFlush()
"Number of BIN-deltas flushed to the log."
Group: "Checkpoints"
Name: "nDeltaINFlush"
public long getLastCheckpointInterval()
"Byte length from last checkpoint start to the previous checkpoint start."
Group: "Checkpoints"
Name: "lastCheckpointInterval"
public long getLastCheckpointStart()
"Location in the log of the last checkpoint start."
Group: "Checkpoints"
Name: "lastCheckpointStart"
public long getLastCheckpointEnd()
"Location in the log of the last checkpoint end."
Group: "Checkpoints"
Name: "lastCheckpointEnd"
public int getCleanerBacklog()
getCurrentMinUtilization() and getCurrentMaxUtilization() to
monitor cleaner behavior.public int getFileDeletionBacklog()
getProtectedLogSize() getProtectedLogSizeMap() to monitor
file protection.public int getCurrentMinUtilization()
"Lower bound for current log utilization as a percentage."
Group: "Cleaning"
Name: "minUtilization"
public int getCurrentMaxUtilization()
"Upper bound for current log utilization as a percentage."
Group: "Cleaning"
Name: "maxUtilization"
public int getPredictedMinUtilization()
"Lower bound for predicted log utilization as a percentage."
Group: "Cleaning"
Name: "minPredictedUtilization"
public int getPredictedMaxUtilization()
"Upper bound for predicted log utilization as a percentage."
Group: "Cleaning"
Name: "maxPredictedUtilization"
public int getLastKnownUtilization()
getCurrentMinUtilization() or
getCurrentMaxUtilization() instead.public float getLNSizeCorrectionFactor()
public float getCorrectedAvgLNSize()
public float getEstimatedAvgLNSize()
public long getNCleanerRuns()
"Number of files processed by the cleaner, including two-pass runs."
Group: "Cleaning"
Name: "nCleanerRuns"
two-pass runs but not
revisal runs.public long getNCleanerTwoPassRuns()
"Number of cleaner runs that resulted in two-pass runs."
Group: "Cleaning"
Name: "nTwoPassRuns"
public long getNCleanerRevisalRuns()
"Number of potential cleaner runs that revised expiration info, but did result in any cleaning."
Group: "Cleaning"
Name: "nRevisalRuns"
public long getNCleanerProbeRuns()
public long getNCleanerDeletions()
"Number of cleaner file deletions."
Group: "Cleaning"
Name: "nCleanerDeletions"
public int getPendingLNQueueSize()
"Number of LNs pending because they were locked."
Group: "Cleaning"
Name: "pendingLNQueueSize"
public int getPendingDBQueueSize()
"Number of DBs pending because DB removal/truncation was incomplete."
Group: "Cleaning"
Name: "pendingDBQueueSize"
public long getNCleanerDiskRead()
"Number of disk reads by the cleaner."
Group: "Cleaning"
Name: "nCleanerDisksReads"
public long getNCleanerEntriesRead()
"Number of log entries processed by the cleaner."
Group: "Cleaning"
Name: "nCleanerEntriesRead"
public long getNINsObsolete()
"Number of known-obsolete INs."
Group: "Cleaning"
Name: "nINsObsolete"
public long getNINsCleaned()
"Number of potentially active INs."
Group: "Cleaning"
Name: "nINsCleaned"
public long getNINsDead()
"Number of INs that were not found in the Btree."
Group: "Cleaning"
Name: "nINsDead"
public long getNINsMigrated()
"Number of active INs that were migrated by dirtying them."
Group: "Cleaning"
Name: "nINsMigrated"
public long getNBINDeltasObsolete()
"Number of known-obsolete BIN-deltas."
Group: "Cleaning"
Name: "nBINDeltasObsolete"
public long getNBINDeltasCleaned()
"Number of potentially active BIN-deltas."
Group: "Cleaning"
Name: "nBINDeltasCleaned"
public long getNBINDeltasDead()
"Number of BIN-deltas that were not found in the Btree."
Group: "Cleaning"
Name: "nBINDeltasDead"
public long getNBINDeltasMigrated()
"Number of active BIN-deltas that were migrated by dirtying them."
Group: "Cleaning"
Name: "nBINDeltasMigrated"
public long getNLNsObsolete()
"Number of known-obsolete LNs."
Group: "Cleaning"
Name: "nLNsObsolete"
public long getNLNsExpired()
"Number of known-obsolete LNs that were expired."
Group: "Cleaning"
Name: "nLNsExpired"
public long getNLNsExtinct()
"Number of known-obsolete LNs that were extinct."
Group: "Cleaning"
Name: "nLNsExtinct"
public long getNLNsCleaned()
"Number of potentially active LNs."
Group: "Cleaning"
Name: "nLNsCleaned"
public long getNLNsDead()
"Number of LNs that were not found in the Btree."
Group: "Cleaning"
Name: "nLNsDead"
public long getNLNsLocked()
"Number of potentially active LNs that were added to the pending queue because they were locked."
Group: "Cleaning"
Name: "nLNsLocked"
public long getNLNsMigrated()
"Number of active LNs that were migrated by logging them."
Group: "Cleaning"
Name: "nLNsMigrated"
public long getNLNsMarked()
"Number of active LNs in temporary DBs that were migrated by dirtying them."
Group: "Cleaning"
Name: "nLNsMarked"
public long getNLNQueueHits()
"Number of potentially active LNs that did not require a separate Btree lookup."
Group: "Cleaning"
Name: "nLNQueueHits"
public long getNPendingLNsProcessed()
"Number of pending LNs that were re-processed."
Group: "Cleaning"
Name: "nPendingLNsProcessed"
public long getNPendingLNsLocked()
"Number of pending LNs that were still locked."
Group: "Cleaning"
Name: "nPendingLNsLocked"
public long getNPendingDBsProcessed()
"Number of pending DBs that were re-processed."
Group: "Cleaning"
Name: "nPendingDBsProcessed"
public long getNPendingDBsIncomplete()
"Number of pending DBs for which DB removal/truncation was still incomplete."
Group: "Cleaning"
Name: "nPendingDBsIncomplete"
public long getNMarkedLNsProcessed()
public long getNToBeCleanedLNsProcessed()
public long getNClusterLNsProcessed()
public long getActiveLogSize()
"Bytes used by all active data files: files required for basic JE operation."
Group: "Cleaning"
Name: "activeLogSize"
The log utilization is the
percentage of activeLogSize that is currently referenced or active.
public long getReservedLogSize()
"Bytes used by all reserved data files: files that have been cleaned and can be deleted if they are not protected."
Group: "Cleaning"
Name: "reservedLogSize"
Deletion of reserved files may be postponed for several reasons.
This occurs if an active file is protected (by a backup, for example),
and then the file is cleaned and becomes a reserved file. See
getProtectedLogSizeMap() for more information. In a
standalone JE environment, reserved files are normally deleted very
soon after being cleaned.
In an HA environment, reserved files are retained because they might
be used for replication to electable nodes that have been offline
for the ReplicationConfig.FEEDER_TIMEOUT
interval or longer, or to offline secondary nodes. The replication
stream position of these nodes is unknown, so whether these files could
be used to avoid a network restore, when bringing these nodes online,
is also unknown. The files are retained just in case they can be used
for such replication. Files are reserved for replication on both master
and replicas, since a replica may become a master at a future time.
Such files will be deleted (oldest file first) to make room for a
write operation, if the write operation would have caused a disk limit
to be violated.
In NoSQL DB, this retention of reserved files has the additional benefit of supplying the replication stream to subscribers of the Stream API, when such subscribers need to replay the stream from an earlier point in time.
public long getProtectedLogSize()
"Bytes used by all protected data files: the subset of reserved files that are temporarily protected and cannot be deleted."
Group: "Cleaning"
Name: "protectedLogSize"
Reserved files are protected for reasons described by getProtectedLogSizeMap().
public java.util.SortedMap<java.lang.String,java.lang.Long> getProtectedLogSizeMap()
"A breakdown of protectedLogSize as a map of protecting entity name to protected size in bytes."
Group: "Cleaning"
Name: "protectedLogSizeMap"
Reserved data files are temporarily
protected for a number of reasons. The
keys in the protected log size map are the names of the protecting
entities, and the values are the number of bytes protected by each
entity. The type and format of the entity names are as follows:
Backup-N
DatabaseCount-N
DiskOrderedCursor-N
Syncup-N
Feeder-N
NetworkRestore-N
Where:
Backup-N represents a DbBackup in progress,
i.e., for which DbBackup.startBackup() has been called
and DbBackup.endBackup() has not yet been called. All
active files are initially protected by the backup, but these
are not reserved files ond only appear in the map if they are
cleaned and become reserved after the backup starts. Files
are not protected if they have been copied and
DbBackup.removeFileProtection(String) has been called.
N is a sequentially assigned integer.
DatabaseCount-N represents an outstanding call to
Database.count().
All active files are initially protected by this method, but
these are not reserved files ond only appear in the map if
they are cleaned and become reserved during the execution of
Database.count.
N is a sequentially assigned integer.
DiskOrderedCursor-N represents a
DiskOrderedCursor that has not yet been closed by
DiskOrderedCursor.close().
All active files are initially protected when the cursor is
opened, but these are not reserved files ond only appear in
the map if they are cleaned and become reserved while the
cursor is open.
N is a sequentially assigned integer.
Syncup-N represents an in-progress negotiation between
a master and replica node in an HA replication group to
establish a replication stream. This is a normally a very short
negotiation and occurs when a replica joins the group or after
an election is held. During syncup, all reserved files are
protected.
N is the node name of the other node involved in the
syncup, i.e, if this node is a master then it is the name of
the replica, and vice versa.
Feeder-N represents an HA master node that is supplying
the replication stream to a replica. Normally data in active
files is being supplied and this data is not in the reserved
or protected categories. But if the replica is lagging, data
from reserved files may be supplied, and in that case will be
protected and appear in the map.
N is the node name of the replica receiving the
replication stream.
NetworkRestore-N represents an HA replica or master
node that is supplying files to a node that is performing a
NetworkRestore. The files supplied
are all active files plus the two most recently written
reserved files. The two reserved files will appear in the map,
as well as any of the active files that were cleaned and became
reserved during the network restore. Files that have already
been copied by the network restore are not protected.
N is the name of the node performing the
NetworkRestore.
When more than one entity is included in the map, in general the
largest value points to the entity primarily responsible for
preventing reclamation of disk space. Note that the values normally
sum to more than getProtectedLogSize(), since protection often
overlaps.
The string format of this stat consists of name=size pairs
separated by semicolons, where name is the entity name described
above and size is the number of protected bytes.
public long getAvailableLogSize()
"Bytes available for write operations when unprotected reserved files are deleted: free space + reservedLogSize - protectedLogSize."
Group: "Cleaning"
Name: "availableLogSize"
This is the amount that can be logged by write operations, and
other JE activity such as checkpointing, without violating a disk
limit. The files making up reservedLogSize can be deleted to
make room for these write operations, so availableLogSize is
the sum of the current disk free space and the reserved size that is not
protected (reservedLogSize - protectedLogSize). The
current disk free space is calculated using the disk volume's free
space, EnvironmentConfig.MAX_DISK and EnvironmentConfig.FREE_DISK.
Note that when a record is written, the number of bytes includes JE overheads for the record. Also, this causes Btree metadata to be written during checkpoints, and other metadata is also written by JE. So the space occupied on disk by a given set of records cannot be calculated by simply summing the key/data sizes.
Also note that availableLogSize will be negative when a disk
limit has been violated, representing the amount that needs to be freed
before write operations are allowed.
EnvironmentConfig.MAX_DISK,
EnvironmentConfig.FREE_DISKpublic long getTotalLogSize()
"Total bytes used by data files on disk: activeLogSize + reservedLogSize."
Group: "Cleaning"
Name: "totalLogSize"
public long getNCacheMiss()
"Number of requests to read log entries by LSN that were not present in the log buffers."
Group: "I/O"
Name: "nCacheMiss"
public long getEndOfLog()
"The LSN of the next entry to be written to the log."
Group: "I/O"
Name: "endOfLog"
Note that the log entries prior to this position may not yet have been flushed to disk. Flushing can be forced using a Sync or WriteNoSync commit, or a checkpoint.
public long getNFSyncs()
"Number of group commit fsyncs completed."
Group: "I/O"
Name: "nFSyncs"
public long getNFSyncRequests()
"Number of group commit requests that include an fsync request."
Group: "I/O"
Name: "nFSyncRequests"
public long getNFSyncTimeouts()
"Number of group commit waiter threads that timed out."
Group: "I/O"
Name: "nGrpCommitTimeouts"
public long getFSyncTime()
getFSyncAvgMs() to get an
estimate of fsync times.public long getFSyncMaxTime()
getFSyncMaxMs() instead.public long getFSyncAvgMs()
"Average number of milliseconds used to perform fsyncs."
Group: "I/O"
Name: "fSyncAvgMs"
public long getFSync95Ms()
"95th percentile of milliseconds used to perform fsyncs."
Group: "I/O"
Name: "fSync95Ms"
public long getFSync99Ms()
"99th percentile of milliseconds used to perform fsyncs."
Group: "I/O"
Name: "fSync99Ms"
public long getFSyncMaxMs()
"Maximum number of milliseconds used to perform a single fsync."
Group: "I/O"
Name: "fSyncMaxMs"
public long getNGroupCommitRequests()
"Number of group commit requests."
Group: "I/O"
Name: "nGroupCommitRequests"
toString() and
appeared in the je.stat.csv file in earlier versions.public long getNLogFSyncs()
"Number of fsyncs of the JE log."
Group: "I/O"
Name: "nLogFSyncs"
public int getNLogBuffers()
"Number of log buffers."
Group: "I/O"
Name: "nLogBuffers"
public long getNRandomReads()
"Number of disk reads which required a seek of more than 1MB from the previous file position or were read from a different file."
Group: "I/O"
Name: "nRandomReads"
public long getNRandomReadBytes()
"Number of bytes read which required a seek of more than 1MB from the previous file position or were read from a different file."
Group: "I/O"
Name: "nRandomReadBytes"
public long getNRandomWrites()
"Number of disk writes which required a seek of more than 1MB from the previous file position or were read from a different file."
Group: "I/O"
Name: "nRandomWrites"
public long getNRandomWriteBytes()
"Number of bytes written which required a seek of more than 1MB from the previous file position or were read from a different file."
Group: "I/O"
Name: "nRandomWriteBytes"
public long getNSequentialReads()
"Number of disk reads which did not require a seek of more than 1MB from the previous file position and were read from the same file."
Group: "I/O"
Name: "nSequentialReads"
public long getNSequentialReadBytes()
"Number of bytes read which did not require a seek of more than 1MB from the previous file position and were read from the same file."
Group: "I/O"
Name: "nSequentialReadBytes"
public long getNSequentialWrites()
"Number of disk writes which did not require a seek of more than 1MB from the previous file position and were read from the same file."
Group: "I/O"
Name: "nSequentialWrites"
public long getNSequentialWriteBytes()
"Number of bytes written which did not require a seek of more than 1MB from the previous file position and were read from the same file."
Group: "I/O"
Name: "nSequentialWriteBytes"
public long getNBytesReadFromWriteQueue()
"Number of bytes read to fulfill file read operations by reading out of the pending write queue."
Group: "I/O"
Name: "nBytesReadFromWriteQueue"
public long getNBytesWrittenFromWriteQueue()
"Number of bytes written from the pending write queue."
Group: "I/O"
Name: "nBytesWrittenFromWriteQueue"
public long getNReadsFromWriteQueue()
"Number of file read operations which were fulfilled by reading out of the pending write queue."
Group: "I/O"
Name: "nReadsFromWriteQueue"
public long getNWritesFromWriteQueue()
"Number of file write operations executed from the pending write queue."
Group: "I/O"
Name: "nWritesFromWriteQueue"
public long getNWriteQueueOverflow()
"Number of write operations which would overflow the write queue."
Group: "I/O"
Name: "nWriteQueueOverflow"
public long getNWriteQueueOverflowFailures()
"Number of write operations which would overflow the write queue and could not be queued."
Group: "I/O"
Name: "nWriteQueueOverflowFailures"
public long getBufferBytes()
"Total memory currently consumed by all log buffers, in bytes."
Group: "I/O"
Name: "bufferBytes"
If this environment uses the shared cache, this method returns only the amount used by this environment.
public long getNNotResident()
"Number of requests to read log entries by LSN."
Group: "I/O"
Name: "nNotResident"
public long getNRepeatFaultReads()
"Number of times a log entry size exceeded the log fault read size."
Group: "I/O"
Name: "nRepeatFaultReads"
public long getNRepeatIteratorReads()
"Number of times a log entry size exceeded the log iterator max size."
Group: "I/O"
Name: "nRepeatIteratorReads"
This happens during scans of the log during activities like
environment open (recovery) or log cleaning. The repeat iterator reads}
can be reduced by increasing
EnvironmentConfig.LOG_ITERATOR_MAX_SIZE.
public long getNTempBufferWrites()
"Number of writes for entries larger than the log buffer size, forcing a write in the critical section."
Group: "I/O"
Name: "nTempBufferWrites"
public long getNNoFreeBuffer()
"Number of writes that could not obtain a free buffer, forcing a write in the critical section."
Group: "I/O"
Name: "nNoFreeBuffer"
toString() and
appeared in the je.stat.csv file in earlier versions.public int getNFileOpens()
"Number of times a log file has been opened."
Group: "I/O"
Name: "nFileOpens"
public int getNOpenFiles()
"Number of files currently open in the file cache."
Group: "I/O"
Name: "nOpenFiles"
public long getRequiredEvictBytes()
public long getNNodesScanned()
public long getNEvictPasses()
getNEvictionRuns() instead.public long getNNodesSelected()
getNNodesTargeted() instead.public long getNNodesExplicitlyEvicted()
getNNodesEvicted() instead.public long getNBINsStripped()
getNNodesStripped() instead.public long getNBINsMutated()
getNNodesMutated() instead.public long getNEvictionRuns()
"Number of times the background eviction thread is awoken."
Group: "Cache"
Name: "nEvictionRuns"
When an evictor thread is awoken it performs eviction until
getCacheTotalBytes() is at least
EnvironmentConfig.EVICTOR_EVICT_BYTES less than the
total cache size.
See CacheMode for a description of eviction.
public long getNNodesTargeted()
"Number of nodes (INs) selected as eviction targets."
Group: "Cache"
Name: "nNodesTargeted"
An eviction target may actually be evicted, or skipped, or put back
to the LRU, potentially after partial eviction (stripping) or
BIN-delta mutation is done on it.
See CacheMode for a description of eviction.
public long getNNodesEvicted()
"Number of target nodes (INs) evicted from the main cache."
Group: "Cache"
Name: "nNodesEvicted"
Does not include LN eviction or
BIN-delta mutation.
Includes eviction of dirty nodes and
root nodes.
See CacheMode for a description of eviction.
public long getNRootNodesEvicted()
"Number of database root nodes (INs) evicted."
Group: "Cache"
Name: "nRootNodesEvicted"
The root node of a Database is only evicted after all other nodes in
the Database, so this implies that the entire Database has fallen out of
cache and is probably closed.
See CacheMode for a description of eviction.
public long getNDirtyNodesEvicted()
"Number of dirty target nodes logged and evicted."
Group: "Cache"
Name: "nDirtyNodesEvicted"
When a dirty IN is evicted from main cache and no off-heap cache is
configured, the IN must be logged. When an off-heap cache is configured,
dirty INs can be moved from main cache to off-heap cache based on LRU,
but INs are only logged when they are evicted from off-heap cache.
Therefore, this stat is always zero when an off-heap cache is configured.
See CacheMode for a description of eviction.
public long getNLNsEvicted()
"Number of LNs evicted as a result of LRU-based eviction (but not CacheMode.EVICT_LN)."
Group: "Cache"
Name: "nLNsEvicted"
When a BIN is considered for eviction based on LRU, if the BIN
contains resident LNs in main cache, it is stripped of the LNs rather
than being evicted. This stat reflects LNs evicted in this manner, but
not LNs evicted as a result of using CacheMode.EVICT_LN. Also
note that embedded LNs
are evicted immediately and are not reflected in this stat value.
See CacheMode for a description of eviction.
public long getNNodesStripped()
"Number of target BINs for which space was reclaimed by deleting space for expired LNs or evicting resident LNs."
Group: "Cache"
Name: "nNodesStripped"
If space can be reclaimed by stripping a BIN, this prevents mutating
the BIN to a BIN-delta or evicting the BIN entirely.
See CacheMode for a description of eviction.
public long getNNodesMutated()
"Number of target BINs mutated to BIN-deltas."
Group: "Cache"
Name: "nNodesMutated"
When a BIN is considered for eviction based on LRU, if the BIN
can be mutated to a BIN-delta, it is mutated rather than being evicted.
Note that when an off-heap cache is configured, this stat value will be
zero because BIN mutation will take place only in the off-heap cache;
see getOffHeapNodesMutated().
See CacheMode for a description of eviction.
public long getNNodesPutBack()
"Number of target nodes (INs) moved to the cold end of the LRU list without any action taken on them."
Group: "Cache"
Name: "nNodesPutBack"
Reasons for putting back a target IN are:
EnvironmentConfig.TREE_MIN_MEMORY.See CacheMode for a description of eviction.
public long getNNodesMovedToDirtyLRU()
"Number of nodes (INs) moved from the mixed/priority-1 to the dirty/priority-2 LRU list."
Group: "Cache"
Name: "nNodesMovedToDirtyLRU"
When an off-cache is not configured, dirty nodes are evicted last
from the main cache by moving them to a 2nd priority LRU list. When an
off-cache is configured, level-2 INs that reference off-heap BINs are
evicted last from the main cache, using the same approach.
See CacheMode for a description of eviction.
public long getNNodesSkipped()
"Number of nodes (INs) that did not require any action."
Group: "Cache"
Name: "nNodesSkipped"
Reasons for skipping a target IN are:
See CacheMode for a description of eviction.
public long getNThreadUnavailable()
"Number of eviction tasks that were submitted to the background evictor pool, but were refused because all eviction threads were busy."
Group: "Cache"
Name: "nThreadUnavailable"
public int getNSharedCacheEnvironments()
"Number of Environments sharing the main cache."
Group: "Cache"
Name: "nSharedCacheEnvironments"
This method says nothing about whether this environment is using the shared cache or not.
public long getNLNsFetch()
"Number of LNs (data records) requested by btree operations."
Group: "Cache"
Name: "nLNsFetch"
Note that the number of LN fetches does not necessarily correspond
to the number of records accessed, since some LNs may be
embedded.
public long getNBINsFetch()
"Number of BINs (bottom internal nodes) and BIN-deltas requested by btree operations."
Group: "Cache"
Name: "nBINsFetch"
public long getNUpperINsFetch()
"Number of Upper INs (non-bottom internal nodes) requested by btree operations."
Group: "Cache"
Name: "nUpperINsFetch"
public long getNLNsFetchMiss()
"Number of LNs (data records) requested by btree operations that were not in main cache."
Group: "Cache"
Name: "nLNsFetchMiss"
Note that the number of LN fetches does not necessarily correspond
to the number of records accessed, since some LNs may be
embedded.
public long getNBINsFetchMiss()
"Number of full BINs (bottom internal nodes) and BIN-deltas fetched to satisfy btree operations that were not in main cache."
Group: "Cache"
Name: "nBINsFetchMiss"
This is the portion of getNBINsFetch() that resulted in a
fetch miss. The fetch may be for a full BIN or BIN-delta
(getNBINDeltasFetchMiss()), depending on whether a BIN-delta
currently exists (see EnvironmentConfig.TREE_BIN_DELTA).
However, additional full BIN fetches occur when mutating a BIN-delta to
a full BIN (getNFullBINsMiss()) whenever this is necessary for
completing an operation.
Therefore, the total number of BIN fetch misses (including BIN-deltas) is:
nFullBINsMiss + nBINsFetchMiss
And the total number of full BIN (vs BIN-delta) fetch misses is:
nFullBINsMiss + nBINsFetchMiss -
nBINDeltasFetchMiss
public long getNBINDeltasFetchMiss()
"Number of BIN-deltas (partial BINs) fetched to satisfy btree operations that were not in main cache."
Group: "Cache"
Name: "nBINDeltasFetchMiss"
This represents the portion of nBINsFetchMiss() that fetched
BIN-deltas rather than full BINs. See getNBINsFetchMiss().
public long getNFullBINsMiss()
"Number of times a BIN-delta had to be mutated to a full BIN (and as a result a full BIN had to be read in from the log)."
Group: "Cache"
Name: "nFullBINsMiss"
Note that this stat does not include full BIN misses that are
not due to BIN-delta mutations. See
getNBINsFetchMiss()
public long getNUpperINsFetchMiss()
"Number of Upper INs (non-bottom internal nodes) requested by btree operations that were not in main cache."
Group: "Cache"
Name: "nUpperINsFetchMiss"
public float getNBINsFetchMissRatio()
"The BIN fetch miss ratio (nBINsFetchMiss / nBINsFetch)"
Group: "Cache"
Name: "nBINsFetchMissRatio"
This stat can be misleading because it does not include the number
of full BIN fetch misses resulting from BIN-delta mutations (getNFullBINsMiss(). It may be improved, or perhaps deprecated, in a
future release.
public long getNBINDeltaBlindOps()
"The number of operations performed blindly in BIN deltas"
Group: "Cache"
Name: "nBinDeltaBlindOps"
Note that this stat is misplaced. It should be in the "Environment" group and will probably be moved there in a future release.
public long getNCachedUpperINs()
"Number of upper INs (non-bottom internal nodes) in main cache."
Group: "Cache"
Name: "nCachedUpperINs"
Zero is returned when fast stats
are requested and a shared cache is configured.
public long getNCachedBINs()
"Number of BINs (bottom internal nodes) and BIN-deltas in main cache."
Group: "Cache"
Name: "nCachedBINs"
Zero is returned when fast stats
are requested and a shared cache is configured.
public long getNCachedBINDeltas()
"Number of BIN-deltas (partial BINs) in main cache. This is a subset of the nCachedBINs value."
Group: "Cache"
Name: "nCachedBINDeltas"
Zero is returned when fast stats
are requested and a shared cache is configured.
public long getNINSparseTarget()
"Number of INs that use a compact sparse array representation to point to child nodes in the main cache."
Group: "Cache"
Name: "nINSparseTarget"
Each IN contains an array of references to child INs or LNs. When
there are between one and four children resident, the size of the array
is reduced to four. This saves a significant amount of cache memory for
BINs when CacheMode.EVICT_LN is used, because there are
typically only a small number of LNs resident in main cache.
public long getNINNoTarget()
"Number of INs that use a compact representation when none of its child nodes are in the main cache."
Group: "Cache"
Name: "nINNoTarget"
Each IN contains an array of references to child INs or LNs. When
there are no children resident, no array is allocated. This saves a
significant amount of cache memory for BINs when CacheMode.EVICT_LN is used, because there are typically only a small
number of LNs resident in main cache.
public long getNINCompactKeyIN()
"Number of INs that use a compact key representation to minimize the key object representation overhead."
Group: "Cache"
Name: "nINCompactKey"
public long getDirtyLRUSize()
"Number of INs in the dirty/priority-2 LRU "
Group: "Cache"
Name: "lruDirtySize"
public long getMixedLRUSize()
"Number of INs in the mixed/priority-1 LRU "
Group: "Cache"
Name: "lruMixedSize"
public long getNBINsEvictedEvictorThread()
public long getNBINsEvictedManual()
public long getNBINsEvictedCritical()
public long getNBINsEvictedCacheMode()
public long getNBINsEvictedDaemon()
public long getNUpperINsEvictedEvictorThread()
public long getNUpperINsEvictedManual()
public long getNUpperINsEvictedCritical()
public long getNUpperINsEvictedCacheMode()
public long getNUpperINsEvictedDaemon()
public long getNBatchesEvictorThread()
public long getNBatchesManual()
public long getNBatchesCacheMode()
public long getNBatchesCritical()
public long getNBatchesDaemon()
public long getNBytesEvictedEvictorThread()
"Number of bytes evicted by evictor pool threads."
Group: "Cache"
Name: "nBytesEvictedEVICTORTHREAD"
public long getNBytesEvictedManual()
"Number of bytes evicted by the Environment.evictMemory or during Environment startup."
Group: "Cache"
Name: "nBytesEvictedMANUAL"
public long getNBytesEvictedCacheMode()
"Number of bytes evicted by operations for which CacheMode.EVICT_BIN is specified."
Group: "Cache"
Name: "nBytesEvictedCACHEMODE"
public long getNBytesEvictedCritical()
"Number of bytes evicted in the application thread because the cache is over budget."
Group: "Cache"
Name: "nBytesEvictedCRITICAL"
public long getNBytesEvictedDeamon()
"Number of bytes evicted by JE deamon threads."
Group: "Cache"
Name: "nBytesEvictedDAEMON"
public long getAvgBatchEvictorThread()
public long getAvgBatchManual()
public long getAvgBatchCacheMode()
public long getAvgBatchCritical()
public long getAvgBatchDaemon()
public long getSharedCacheTotalBytes()
"Total amount of the shared JE main cache in use, in bytes."
Group: "Cache"
Name: "sharedCacheTotalBytes"
If this
environment uses the shared cache, this method returns the total size of
the shared cache, i.e., the sum of the getCacheTotalBytes() for
all environments that are sharing the cache. If this environment does
not use the shared cache, this method returns zero.
To get the configured maximum cache size, see EnvironmentMutableConfig.getCacheSize().
public long getCacheTotalBytes()
"Total amount of JE main cache in use, in bytes."
Group: "Cache"
Name: "cacheTotalBytes"
This method returns the sum of getDataBytes(), getAdminBytes(), getLockBytes() and getBufferBytes().
If this environment uses the shared cache, this method returns only the amount used by this environment.
To get the configured maximum cache size, see EnvironmentMutableConfig.getCacheSize().
public long getDataBytes()
"Amount of JE main cache used for holding data, keys and internal Btree nodes, in bytes."
Group: "Cache"
Name: "dataBytes"
If this environment uses the shared cache, this method returns only the amount used by this environment.
public long getDataAdminBytes()
public long getDOSBytes()
"Amount of JE main cache consumed by disk-ordered cursor and Database.count operations, in bytes."
Group: "Cache"
Name: "DOSBytes"
If this environment uses the shared cache, this method returns only the amount used by this environment.
public long getAdminBytes()
"Number of bytes of JE main cache used for cleaner and checkpointer metadata, in bytes."
Group: "Cache"
Name: "adminBytes"
If this environment uses the shared cache, this method returns only the amount used by this environment.
public long getLockBytes()
"Number of bytes of JE cache used for holding locks and transactions, in bytes."
Group: "Cache"
Name: "lockBytes"
If this environment uses the shared cache, this method returns only the amount used by this environment.
public long getCacheDataBytes()
getDataBytes() to get the amount of cache
used for data and use getAdminBytes(), getLockBytes() and
getBufferBytes() to get other components of the total cache usage
(getCacheTotalBytes()).public long getOffHeapAllocFailures()
"Number of off-heap allocation failures due to lack of system memory."
Group: "OffHeap"
Name: "offHeapAllocFailure"
Currently, with the default off-heap allocator, an allocation
failure occurs only when OutOfMemoryError is thrown by
Unsafe.allocateMemory. This might be considered a fatal error, since it
means that no memory is available on the machine or VM. In practice,
we have not seen this occur because Linux will automatically kill
processes that are rapidly allocating memory when available memory is
very low.
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapAllocOverflows()
"Number of off-heap allocation attempts that exceeded the cache size."
Group: "OffHeap"
Name: "offHeapAllocOverflow"
Currently, with the default off-heap allocator, this never happens because the allocator will perform the allocation as long as any memory is available. Even so, the off-heap evictor normally prevents overflowing of the off-heap cache by freeing memory before it is needed.
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapThreadUnavailable()
"Number of eviction tasks that were submitted to the background off-heap evictor pool, but were refused because all eviction threads were busy."
Group: "OffHeap"
Name: "offHeapThreadUnavailable"
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapNodesTargeted()
"Number of BINs selected as off-heap eviction targets."
Group: "OffHeap"
Name: "offHeapNodesTargeted"
Nodes are selected as targets by the evictor based on LRU, always selecting from the cold end of the LRU list. First, non-dirty nodes and nodes referring to off-heap LNs are selected based on LRU. When there are no more such nodes then dirty nodes with no off-heap LNs are selected, based on LRU.
An eviction target may actually be evicted, or skipped, or put back to the LRU, potentially after stripping child LNs or mutation to a BIN-delta.
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapCriticalNodesTargeted()
"Number of nodes targeted in \'critical eviction\' mode."
Group: "OffHeap"
Name: "offHeapCriticalNodesTargeted"
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapNodesEvicted()
"Number of target BINs (including BIN-deltas) evicted from the off-heap cache."
Group: "OffHeap"
Name: "offHeapNodesEvicted"
An evicted BIN is completely removed from the off-heap cache and LRU list. If it is dirty, it must be logged. A BIN is evicted only if it has no off-heap child LNs and it cannot be mutated to a BIN-delta.
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapDirtyNodesEvicted()
"Number of target BINs evicted from the off-heap cache that were dirty and therefore were logged."
Group: "OffHeap"
Name: "offHeapDirtyNodesEvicted"
This stat value is a subset of getOffHeapNodesEvicted().
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapNodesStripped()
"Number of target BINs for which space was reclaimed by deleting space for expired LNs or evicting resident LNs."
Group: "OffHeap"
Name: "offHeapNodesStripped"
If space can be reclaimed by stripping a BIN, this prevents mutating
the BIN to a BIN-delta or evicting the BIN entirely.
See CacheMode for a description of eviction.
When a BIN is stripped, all off-heap LNs that the BIN refers to are
evicted and space is reclaimed for expired records. The getOffHeapLNsEvicted() stat is incremented accordingly.
A stripped BIN could be a BIN in main cache that is stripped of off-heap LNs, or a BIN that is off-heap and also refers to off-heap LNs. When a main cache BIN is stripped, it is removed from the off-heap LRU. When an off-heap BIN is stripped, it is either modified in place to remove the LN references (this is done when a small number of LNs are referenced and the wasted space is small), or is copied to a new, smaller off-heap block with no LN references.
After stripping an off-heap BIN, it is moved to the hot end of the LRU list. Off-heap BINs are only mutated to BIN-deltas or evicted completely when they do not refer to any off-heap LNs. This gives BINs precedence over LNs in the cache.
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapNodesMutated()
"Number of off-heap target BINs mutated to BIN-deltas."
Group: "OffHeap"
Name: "offHeapNodesMutated"
Mutation to a BIN-delta is performed for full BINs that do not
refer to any off-heap LNs and can be represented as BIN-deltas in
cache and on disk (see EnvironmentConfig.TREE_BIN_DELTA).
When a BIN is mutated, it is is copied to a new, smaller off-heap
block. After mutating an off-heap BIN, it is moved to the hot end of
the LRU list.
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapNodesSkipped()
"Number of off-heap target BINs on which no action was taken."
Group: "OffHeap"
Name: "offHeapNodesSkipped"
For example, a node will be skipped if it has been moved to the hot end of the LRU list by another thread, or more rarely, already processed by another evictor thread. This can occur because there is a short period of time where a targeted node has been removed from the LRU by the evictor thread, but not yet latched.
The number of skipped nodes is normally very small, compared to the number of targeted nodes.
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapLNsEvicted()
"Number of LNs evicted from the off-heap cache as a result of BIN stripping."
Group: "OffHeap"
Name: "offHeapLNsEvicted"
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapLNsLoaded()
"Number of LNs loaded from the off-heap cache."
Group: "OffHeap"
Name: "offHeapLNsLoaded"
LNs are loaded when requested by CRUD operations or other internal btree operations.
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapLNsStored()
"Number of LNs stored into the off-heap cache."
Group: "OffHeap"
Name: "offHeapLNsStored"
LNs are stored off-heap when they are evicted from the main cache.
Note that when CacheMode.EVICT_LN is used, the LN resides in
the main cache for a very short period since it is evicted after the
CRUD operation is complete.
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapBINsLoaded()
"Number of BINs loaded from the off-heap cache."
Group: "OffHeap"
Name: "offHeapBINsLoaded"
BINs are loaded when needed by CRUD operations or other internal btree operations.
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapBINsStored()
"Number of BINs stored into the off-heap cache."
Group: "OffHeap"
Name: "offHeapBINsStored"
BINs are stored off-heap when they are evicted from the main cache.
Note that when CacheMode.EVICT_BIN is used, the BIN resides
in the main cache for a very short period since it is evicted after
the CRUD operation is complete.
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public int getOffHeapCachedLNs()
"Number of LNs residing in the off-heap cache."
Group: "OffHeap"
Name: "offHeapCachedLNs"
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public int getOffHeapCachedBINs()
"Number of BINs (full BINs and BIN-deltas) residing in the off-heap cache."
Group: "OffHeap"
Name: "offHeapCachedBINs"
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public int getOffHeapCachedBINDeltas()
"Number of BIN-deltas residing in the off-heap cache."
Group: "OffHeap"
Name: "offHeapCachedBINDeltas"
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapTotalBytes()
"Total number of estimated bytes in off-heap cache."
Group: "OffHeap"
Name: "offHeapTotalBytes"
This includes the estimated overhead for off-heap memory blocks, as well as their contents.
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
To get the configured maximum off-heap cache size, see EnvironmentMutableConfig.getOffHeapCacheSize().
public long getOffHeapTotalBlocks()
"Total number of memory blocks in off-heap cache."
Group: "OffHeap"
Name: "offHeapTotalBlocks"
There is one block for each off-heap BIN and one for each off-heap
LN. So the total number of blocks is the sum of
getOffHeapCachedLNs() and getOffHeapCachedBINs().
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getOffHeapLRUSize()
"Number of LRU entries used for the off-heap cache."
Group: "OffHeap"
Name: "offHeapLruSize"
The off-heap LRU list is stored in the Java heap. Each entry occupies 20 bytes of memory when compressed oops are used, or 24 bytes otherwise. This memory is not considered part of the JE main cache, and is not included in main cache statistics.
There is one LRU entry for each off-heap BIN, and one for each BIN in main cache that refers to one or more off-heap LNs. The latter approach avoids an LRU entry per off-heap LN, which would use excessive amounts of space in the Java heap. Similarly, when an off-heap BIN refers to off-heap LNs, only one LRU entry (for the BIN) is used.
If this environment uses the shared cache, the return value is the total for all environments that are sharing the cache.
public long getRelatchesRequired()
"Number of btree latch upgrades required while operating on this Environment. A measurement of contention."
Group: "BtreeOp"
Name: "relatchesRequired"
public long getRootSplits()
"Number of times a database btree root was split."
Group: "BtreeOp"
Name: "nRootSplits"
public long getNBinDeltaGetOps()
"Number of gets performed in BIN-deltas"
Group: "BtreeOp"
Name: "nBinDeltaGet"
public long getNBinDeltaInsertOps()
"Number of insertions performed in BIN-deltas"
Group: "BtreeOp"
Name: "nBinDeltaInsert"
public long getNBinDeltaUpdateOps()
"Number of updates performed in BIN-deltas"
Group: "BtreeOp"
Name: "nBinDeltaUpdate"
public long getNBinDeltaDeleteOps()
"Number of deletions performed in BIN-deltas"
Group: "BtreeOp"
Name: "nBinDeltaDelete"
public int getNOwners()
"Number of lock owners in lock table."
Group: "Locks"
Name: "nOwners"
Zero is returned when fast stats
are requested.
public int getNTotalLocks()
"Number of locks currently held."
Group: "Locks"
Name: "nTotalLocks"
Zero is returned when fast stats
are requested.
public int getNReadLocks()
"Number of read locks currently held."
Group: "Locks"
Name: "nReadLocks"
Zero is returned when fast stats
are requested.
public int getNWriteLocks()
"Number of write locks currently held."
Group: "Locks"
Name: "nWriteLocks"
Zero is returned when fast stats
are requested.
public int getNWaiters()
"Number of threads waiting for a lock."
Group: "Locks"
Name: "nWaiters"
Zero is returned when fast stats
are requested.
public long getNRequests()
"Number of times a lock request was made."
Group: "Locks"
Name: "nRequests"
public long getNWaits()
"Number of times a lock request blocked."
Group: "Locks"
Name: "nWaits"
public int getNAcquiresNoWaiters()
public int getNAcquiresSelfOwned()
public int getNAcquiresWithContention()
public int getNAcquiresNoWaitSuccessful()
public int getNAcquiresNoWaitUnSuccessful()
public int getNReleases()
public long getPriSearchOps()
"Number of successful primary DB key search operations."
Group: "Op"
Name: "priSearch"
This operation corresponds to one of the following API calls:
Cursor.get or Database.get call with Get.SEARCH, Get.SEARCH_GTE, Get.SEARCH_BOTH, or Get.SEARCH_BOTH_GTE.
SecondaryCursor.get or SecondaryDatabase.get call
when the primary data is requested (via the data param).
This call internally performs a key search operation in the
primary DB in order to return the data.
public long getPriSearchFailOps()
"Number of failed primary DB key search operations."
Group: "Op"
Name: "priSearchFail"
This operation corresponds to a call to Cursor.get or Database.get with Get.SEARCH, Get.SEARCH_GTE, Get.SEARCH_BOTH, or Get.SEARCH_BOTH_GTE, when the specified key is not found in the DB.
public long getSecSearchOps()
"Number of successful secondary DB key search operations."
Group: "Op"
Name: "secSearch"
This operation corresponds to a successful call to SecondaryCursor.get or SecondaryDatabase.get with
Get.SEARCH, Get.SEARCH_GTE, Get.SEARCH_BOTH, or
Get.SEARCH_BOTH_GTE.
Note: Operations are currently counted as secondary DB (rather than primary DB) operations only if the DB has been opened by the application as a secondary DB. In particular the stats may be confusing on an HA replica node if a secondary DB has not been opened by the application on the replica.
public long getSecSearchFailOps()
"Number of failed secondary DB key search operations."
Group: "Op"
Name: "secSearchFail"
This operation corresponds to a call to SecondaryCursor.get or SecondaryDatabase.get with Get.SEARCH, Get.SEARCH_GTE, Get.SEARCH_BOTH, or Get.SEARCH_BOTH_GTE, when the specified key is not found in the DB.
Note: Operations are currently counted as secondary DB (rather than primary DB) operations only if the DB has been opened by the application as a secondary DB. In particular the stats may be confusing on an HA replica node if a secondary DB has not been opened by the application on the replica.
public long getPriPositionOps()
"Number of successful primary DB position operations."
Group: "Op"
Name: "priPosition"
This operation corresponds to a successful call to Cursor.get
or Database.get with Get.FIRST, Get.LAST,
Get.NEXT, Get.NEXT_DUP, Get.NEXT_NO_DUP,
Get.PREV, Get.PREV_DUP or Get.PREV_NO_DUP.
public long getSecPositionOps()
"Number of successful secondary DB position operations."
Group: "Op"
Name: "secPosition"
This operation corresponds to a successful call to SecondaryCursor.get or SecondaryDatabase.get with
Get.FIRST, Get.LAST,
Get.NEXT, Get.NEXT_DUP, Get.NEXT_NO_DUP,
Get.PREV, Get.PREV_DUP or Get.PREV_NO_DUP.
Note: Operations are currently counted as secondary DB (rather than primary DB) operations only if the DB has been opened by the application as a secondary DB. In particular the stats may be confusing on an HA replica node if a secondary DB has not been opened by the application on the replica.
public long getPriInsertOps()
"Number of successful primary DB insertion operations."
Group: "Op"
Name: "priInsert"
This operation corresponds to a successful call to Cursor.put
or Database.put in one of the following cases:
Put.NO_OVERWRITE or Put.NO_DUP_DATA is
specified.
Put.OVERWRITE is specified and the key was inserted
because it previously did not exist in the DB.
public long getPriInsertFailOps()
"Number of failed primary DB insertion operations."
Group: "Op"
Name: "priInsertFail"
This operation corresponds to a call to Cursor.put or Database.put with Put.NO_OVERWRITE or Put.NO_DUP_DATA, when the key could not be inserted because it
previously existed in the DB.
public long getSecInsertOps()
"Number of successful secondary DB insertion operations."
Group: "Op"
Name: "secInsert"
This operation corresponds to a successful call to Cursor.put
or Database.put, for a primary DB with an associated
secondary DB. A secondary record is inserted when inserting a primary
record with a non-null secondary key, or when updating a primary record
and the secondary key is changed to to a non-null value that is
different than the previously existing value.
Note: Operations are currently counted as secondary DB (rather than primary DB) operations only if the DB has been opened by the application as a secondary DB. In particular the stats may be confusing on an HA replica node if a secondary DB has not been opened by the application on the replica.
public long getPriUpdateOps()
"Number of successful primary DB update operations."
Group: "Op"
Name: "priUpdate"
This operation corresponds to a successful call to Cursor.put
or Database.put in one of the following cases:
Put.OVERWRITE is specified and the key previously
existed in the DB.
Cursor.put with Put.CURRENT.
public long getSecUpdateOps()
"Number of successful secondary DB update operations."
Group: "Op"
Name: "secUpdate"
This operation corresponds to a successful call to Cursor.put
or Database.put, when a primary record is updated and its
TTL is changed. The associated secondary records must also be updated to
reflect the change in the TTL.
Note: Operations are currently counted as secondary DB (rather than primary DB) operations only if the DB has been opened by the application as a secondary DB. In particular the stats may be confusing on an HA replica node if a secondary DB has not been opened by the application on the replica.
public long getPriDeleteOps()
"Number of successful primary DB deletion operations."
Group: "Op"
Name: "priDelete"
This operation corresponds to a successful call to Cursor.delete, Database.delete, SecondaryCursor.delete or SecondaryDatabase.delete.
public long getPriDeleteFailOps()
"Number of failed primary DB deletion operations."
Group: "Op"
Name: "priDeleteFail"
This operation corresponds to a call to Database.delete or SecondaryDatabase.delete, when the key could not be deleted because it
did not previously exist in the DB.
public long getSecDeleteOps()
"Number of successful secondary DB deletion operations."
Group: "Op"
Name: "secDelete"
This operation corresponds to one of the following API calls:
Cursor.delete or
Database.delete, that deletes a primary record
containing a non-null secondary key.
SecondaryCursor.delete or SecondaryDatabase.delete.
Cursor.put or Database.put that updates a primary record and
changes its previously non-null secondary key to null.
Note: Operations are currently counted as secondary DB (rather than primary DB) operations only if the DB has been opened by the application as a secondary DB. In particular the stats may be confusing on an HA replica node if a secondary DB has not been opened by the application on the replica.
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringVerbose()
Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.