public class DataStorageMetricsImpl extends Object implements DataStorageMetricsMXBean
Modifier and Type | Field and Description |
---|---|
static String |
DATASTORAGE_METRIC_PREFIX
Prefix for all data storage metrics.
|
Constructor and Description |
---|
DataStorageMetricsImpl(GridMetricManager mmgr,
boolean metricsEnabled,
long rateTimeInterval,
int subInts) |
Modifier and Type | Method and Description |
---|---|
void |
disableMetrics()
Disables persistence metrics collection on an Apache Ignite node.
|
void |
enableMetrics()
Enables persistence metrics collection on an Apache Ignite node.
|
long |
getCheckpointBufferSize()
Checkpoint buffer size in bytes.
|
long |
getCheckpointTotalTime()
Total checkpoint time from last restart.
|
long |
getDirtyPages()
Total dirty pages for the next checkpoint.
|
long |
getLastCheckpointCopiedOnWritePagesNumber()
Gets the number of pages copied to a temporary checkpoint buffer during the last checkpoint.
|
long |
getLastCheckpointDataPagesNumber()
Gets the number of data pages written during the last checkpoint.
|
long |
getLastCheckpointDuration()
Gets the duration of the last checkpoint in milliseconds.
|
long |
getLastCheckpointFsyncDuration()
Gets the duration of the sync phase of the last checkpoint in milliseconds.
|
long |
getLastCheckpointLockWaitDuration()
Gets the duration of last checkpoint lock wait in milliseconds.
|
long |
getLastCheckpointMarkDuration()
Gets the duration of last checkpoint mark phase in milliseconds.
|
long |
getLastCheckpointPagesWriteDuration()
Gets the duration of last checkpoint pages write phase in milliseconds.
|
long |
getLastCheckpointStarted()
Returns time when the last checkpoint was started.
|
long |
getLastCheckpointTotalPagesNumber()
Gets the total number of pages written during the last checkpoint.
|
long |
getOffHeapSize()
Total offheap size in bytes.
|
long |
getOffheapUsedSize()
Total used offheap size in bytes.
|
long |
getPagesRead()
The number of read pages from last restart.
|
long |
getPagesReplaced()
The number of replaced pages from last restart.
|
long |
getPagesWritten()
The number of written pages from last restart.
|
long |
getSparseStorageSize()
Storage space allocated adjusted for possible sparsity in bytes.
|
long |
getStorageSize()
Storage space allocated in bytes.
|
long |
getTotalAllocatedSize()
Total size of memory allocated in bytes.
|
long |
getUsedCheckpointBufferPages()
Gets used checkpoint buffer size in pages.
|
long |
getUsedCheckpointBufferSize()
Gets used checkpoint buffer size in bytes.
|
int |
getWalArchiveSegments()
Gets the current number of WAL segments in the WAL archive.
|
long |
getWalBuffPollSpinsRate()
Returns WAL buffer poll spins number over the last time interval.
|
float |
getWalFsyncTimeAverage()
Gets the average WAL fsync duration in microseconds over the last time interval.
|
long |
getWalLastRollOverTime()
Time of the last WAL segment rollover.
|
float |
getWalLoggingRate()
Gets the average number of WAL records per second written during the last time interval.
|
long |
getWalTotalSize()
Total size in bytes for storage wal files.
|
float |
getWalWritingRate()
Gets the average number of bytes per second written during the last time interval.
|
boolean |
metricsEnabled() |
void |
onBuffPollSpin(int num) |
void |
onCheckpoint(long beforeLockDuration,
long lockWaitDuration,
long listenersExecuteDuration,
long markDuration,
long lockHoldDuration,
long pagesWriteDuration,
long fsyncDuration,
long walRecordFsyncDuration,
long writeEntryDuration,
long splitAndSortPagesDuration,
long duration,
long start,
long totalPages,
long dataPages,
long cowPages) |
void |
onFsync(long nanoTime) |
void |
onStorageSizeChanged(long storageSize,
long sparseStorageSize) |
void |
onWalBytesWritten(int size) |
void |
onWallRollOver() |
void |
onWalRecordLogged() |
void |
rateTimeInterval(long rateTimeInterval)
Sets time interval for rate-based metrics.
|
void |
regionMetrics(Collection<DataRegionMetrics> regionMetrics) |
void |
setWalSizeProvider(IgniteOutClosure<Long> walSizeProvider) |
void |
subIntervals(int subInts)
Sets a number of sub-intervals the whole
DataStorageMetricsMXBean.rateTimeInterval(long) will be split into to calculate
rate-based metrics. |
void |
wal(IgniteWriteAheadLogManager wal) |
public static final String DATASTORAGE_METRIC_PREFIX
public DataStorageMetricsImpl(GridMetricManager mmgr, boolean metricsEnabled, long rateTimeInterval, int subInts)
mmgr
- Metrics manager.metricsEnabled
- Metrics enabled flag.rateTimeInterval
- Rate time interval.subInts
- Number of sub-intervals.public float getWalLoggingRate()
The length of time interval is configured via DataStorageConfiguration.setMetricsRateTimeInterval(long)
configuration property.
The number of subintervals is configured via DataStorageConfiguration.setMetricsSubIntervalCount(int)
configuration property.
getWalLoggingRate
in interface DataStorageMetrics
getWalLoggingRate
in interface DataStorageMetricsMXBean
public float getWalWritingRate()
DataStorageConfiguration.setMetricsRateTimeInterval(long)
configuration property.
The number of subintervals is configured via DataStorageConfiguration.setMetricsSubIntervalCount(int)
configuration property.getWalWritingRate
in interface DataStorageMetrics
getWalWritingRate
in interface DataStorageMetricsMXBean
public int getWalArchiveSegments()
getWalArchiveSegments
in interface DataStorageMetrics
getWalArchiveSegments
in interface DataStorageMetricsMXBean
public float getWalFsyncTimeAverage()
The length of time interval is configured via DataStorageConfiguration.setMetricsRateTimeInterval(long)
configuration property.
The number of subintervals is configured via DataStorageConfiguration.setMetricsSubIntervalCount(int)
configuration property.
getWalFsyncTimeAverage
in interface DataStorageMetrics
getWalFsyncTimeAverage
in interface DataStorageMetricsMXBean
public long getWalBuffPollSpinsRate()
The length of time interval is configured via DataStorageConfiguration.setMetricsRateTimeInterval(long)
configuration property.
The number of subintervals is configured via DataStorageConfiguration.setMetricsSubIntervalCount(int)
configuration property.
getWalBuffPollSpinsRate
in interface DataStorageMetrics
getWalBuffPollSpinsRate
in interface DataStorageMetricsMXBean
public long getLastCheckpointDuration()
getLastCheckpointDuration
in interface DataStorageMetrics
getLastCheckpointDuration
in interface DataStorageMetricsMXBean
public long getLastCheckpointStarted()
getLastCheckpointStarted
in interface DataStorageMetrics
getLastCheckpointStarted
in interface DataStorageMetricsMXBean
public long getLastCheckpointLockWaitDuration()
getLastCheckpointLockWaitDuration
in interface DataStorageMetrics
getLastCheckpointLockWaitDuration
in interface DataStorageMetricsMXBean
public long getLastCheckpointMarkDuration()
getLastCheckpointMarkDuration
in interface DataStorageMetrics
getLastCheckpointMarkDuration
in interface DataStorageMetricsMXBean
public long getLastCheckpointPagesWriteDuration()
getLastCheckpointPagesWriteDuration
in interface DataStorageMetrics
getLastCheckpointPagesWriteDuration
in interface DataStorageMetricsMXBean
public long getLastCheckpointFsyncDuration()
getLastCheckpointFsyncDuration
in interface DataStorageMetrics
getLastCheckpointFsyncDuration
in interface DataStorageMetricsMXBean
public long getLastCheckpointTotalPagesNumber()
getLastCheckpointTotalPagesNumber
in interface DataStorageMetrics
getLastCheckpointTotalPagesNumber
in interface DataStorageMetricsMXBean
public long getLastCheckpointDataPagesNumber()
getLastCheckpointDataPagesNumber
in interface DataStorageMetrics
getLastCheckpointDataPagesNumber
in interface DataStorageMetricsMXBean
public long getLastCheckpointCopiedOnWritePagesNumber()
getLastCheckpointCopiedOnWritePagesNumber
in interface DataStorageMetrics
getLastCheckpointCopiedOnWritePagesNumber
in interface DataStorageMetricsMXBean
public void enableMetrics()
enableMetrics
in interface DataStorageMetricsMXBean
public void disableMetrics()
disableMetrics
in interface DataStorageMetricsMXBean
public void rateTimeInterval(long rateTimeInterval)
DataStorageConfiguration.setMetricsRateTimeInterval(long)
configuration property.rateTimeInterval
in interface DataStorageMetricsMXBean
rateTimeInterval
- Time interval (in milliseconds) used for allocation and eviction rates calculations.public void subIntervals(int subInts)
DataStorageMetricsMXBean.rateTimeInterval(long)
will be split into to calculate
rate-based metrics. Identical to setting DataStorageConfiguration.setMetricsSubIntervalCount(int)
configuration
property.subIntervals
in interface DataStorageMetricsMXBean
subInts
- A number of sub-intervals.public long getWalTotalSize()
getWalTotalSize
in interface DataStorageMetrics
getWalTotalSize
in interface DataStorageMetricsMXBean
public long getWalLastRollOverTime()
getWalLastRollOverTime
in interface DataStorageMetrics
getWalLastRollOverTime
in interface DataStorageMetricsMXBean
public long getCheckpointTotalTime()
getCheckpointTotalTime
in interface DataStorageMetrics
getCheckpointTotalTime
in interface DataStorageMetricsMXBean
public long getDirtyPages()
getDirtyPages
in interface DataStorageMetrics
getDirtyPages
in interface DataStorageMetricsMXBean
public long getPagesRead()
getPagesRead
in interface DataStorageMetrics
getPagesRead
in interface DataStorageMetricsMXBean
public long getPagesWritten()
getPagesWritten
in interface DataStorageMetrics
getPagesWritten
in interface DataStorageMetricsMXBean
public long getPagesReplaced()
getPagesReplaced
in interface DataStorageMetrics
getPagesReplaced
in interface DataStorageMetricsMXBean
public long getOffHeapSize()
getOffHeapSize
in interface DataStorageMetrics
getOffHeapSize
in interface DataStorageMetricsMXBean
public long getOffheapUsedSize()
getOffheapUsedSize
in interface DataStorageMetrics
getOffheapUsedSize
in interface DataStorageMetricsMXBean
public long getTotalAllocatedSize()
getTotalAllocatedSize
in interface DataStorageMetrics
getTotalAllocatedSize
in interface DataStorageMetricsMXBean
public long getUsedCheckpointBufferPages()
getUsedCheckpointBufferPages
in interface DataStorageMetrics
getUsedCheckpointBufferPages
in interface DataStorageMetricsMXBean
public long getUsedCheckpointBufferSize()
getUsedCheckpointBufferSize
in interface DataStorageMetrics
getUsedCheckpointBufferSize
in interface DataStorageMetricsMXBean
public long getCheckpointBufferSize()
getCheckpointBufferSize
in interface DataStorageMetrics
getCheckpointBufferSize
in interface DataStorageMetricsMXBean
public void wal(IgniteWriteAheadLogManager wal)
wal
- Write-ahead log manager.public void setWalSizeProvider(IgniteOutClosure<Long> walSizeProvider)
walSizeProvider
- Wal size provider.public void onWallRollOver()
public void regionMetrics(Collection<DataRegionMetrics> regionMetrics)
public boolean metricsEnabled()
public long getStorageSize()
getStorageSize
in interface DataStorageMetrics
getStorageSize
in interface DataStorageMetricsMXBean
public long getSparseStorageSize()
getSparseStorageSize
in interface DataStorageMetrics
getSparseStorageSize
in interface DataStorageMetricsMXBean
public void onCheckpoint(long beforeLockDuration, long lockWaitDuration, long listenersExecuteDuration, long markDuration, long lockHoldDuration, long pagesWriteDuration, long fsyncDuration, long walRecordFsyncDuration, long writeEntryDuration, long splitAndSortPagesDuration, long duration, long start, long totalPages, long dataPages, long cowPages)
beforeLockDuration
- Checkpoint action before taken write lock duration.lockWaitDuration
- Lock wait duration.listenersExecuteDuration
- Execution listeners under write lock duration.markDuration
- Mark duration.lockHoldDuration
- Lock hold duration.pagesWriteDuration
- Pages write duration.fsyncDuration
- Total checkpoint fsync duration.walRecordFsyncDuration
- Duration of WAL fsync after logging CheckpointRecord
on checkpoint begin.writeEntryDuration
- Duration of checkpoint entry buffer writing to file.splitAndSortPagesDuration
- Duration of splitting and sorting checkpoint pages.duration
- Total checkpoint duration.start
- Checkpoint start time.totalPages
- Total number of all pages in checkpoint.dataPages
- Total number of data pages in checkpoint.cowPages
- Total number of COW-ed pages in checkpoint.public void onStorageSizeChanged(long storageSize, long sparseStorageSize)
sparseStorageSize
- Sparse storage size.storageSize
- Storage size.public void onWalRecordLogged()
public void onWalBytesWritten(int size)
size
- Size written.public void onFsync(long nanoTime)
nanoTime
- Fsync nano time.public void onBuffPollSpin(int num)
num
- Number.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021