Class DataRegionMetricsSnapshot
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsSnapshot
-
- All Implemented Interfaces:
DataRegionMetrics
public class DataRegionMetricsSnapshot extends Object implements DataRegionMetrics
-
-
Constructor Summary
Constructors Constructor Description DataRegionMetricsSnapshot(DataRegionMetrics metrics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetAllocationRate()Gets pages allocation rate of a memory region.longgetCheckpointBufferSize()Gets checkpoint buffer size in bytes.longgetDirtyPages()Gets the number of dirty pages (pages which contents is different from the current persistent storage state).floatgetEvictionRate()Gets eviction rate of a given memory region.floatgetLargeEntriesPagesPercentage()Gets percentage of pages that are fully occupied by large entries that go beyond page size.StringgetName()A name of a memory region the metrics are collected for.longgetOffHeapSize()Total offheap size in bytes.longgetOffheapUsedSize()Total used offheap size in bytes.floatgetPagesFillFactor()Returns the ratio of space occupied by user and system data to the size of all pages that contain this data.intgetPageSize()Gets memory page size.longgetPagesRead()The number of read pages from last restart.floatgetPagesReplaceAge()Gets average age (in milliseconds) for the pages being replaced from the disk storage.longgetPagesReplaced()The number of replaced pages from last restart .floatgetPagesReplaceRate()Gets rate (pages per second) at which pages get replaced with other pages from persistent storage.longgetPagesWritten()The number of written pages from last restart.longgetPhysicalMemoryPages()Gets total number of pages currently loaded to the RAM.longgetPhysicalMemorySize()Gets total size of pages loaded to the RAM.longgetTotalAllocatedPages()Gets a total number of allocated pages related to the data region.longgetTotalAllocatedSize()Gets a total size of memory allocated in the data region.longgetTotalUsedPages()Gets a total number of pages used for storing the data.longgetTotalUsedSize()Returns the total amount of bytes occupied by the non-empty pages.longgetUsedCheckpointBufferPages()Gets used checkpoint buffer size in pages.longgetUsedCheckpointBufferSize()Gets used checkpoint buffer size in bytes.
-
-
-
Constructor Detail
-
DataRegionMetricsSnapshot
public DataRegionMetricsSnapshot(DataRegionMetrics metrics)
- Parameters:
metrics- Metrics instance to take a copy.
-
-
Method Detail
-
getName
public String getName()
A name of a memory region the metrics are collected for.- Specified by:
getNamein interfaceDataRegionMetrics- Returns:
- Name of the memory region.
-
getTotalAllocatedPages
public long getTotalAllocatedPages()
Gets a total number of allocated pages related to the data region. When persistence is disabled, this metric shows the total number of pages in memory. When persistence is enabled, this metric shows the total number of pages in memory and on disk.- Specified by:
getTotalAllocatedPagesin interfaceDataRegionMetrics- Returns:
- Total number of allocated pages.
-
getTotalAllocatedSize
public long getTotalAllocatedSize()
Gets a total size of memory allocated in the data region. When persistence is disabled, this metric shows the total size of pages in memory. When persistence is enabled, this metric shows the total size of pages in memory and on disk.- Specified by:
getTotalAllocatedSizein interfaceDataRegionMetrics- Returns:
- Total size of memory allocated, in bytes.
-
getTotalUsedPages
public long getTotalUsedPages()
Gets a total number of pages used for storing the data. It includes allocated pages except of empty pages that are not used yet or pages that can be reused.E. g. data region contains 1000 allocated pages, and 200 pages are used to store some data, this metric shows 200 used pages. Then the data was partially deleted and 50 pages were totally freed, hence this metric should show 150 used pages.
- Specified by:
getTotalUsedPagesin interfaceDataRegionMetrics- Returns:
- Total number of used pages.
-
getTotalUsedSize
public long getTotalUsedSize()
Returns the total amount of bytes occupied by the non-empty pages. This value is directly tied to theDataRegionMetrics.getTotalUsedPages()and does not take page fragmentation into account (i.e. if some data is removed from a page, but it is not completely empty, it will still show the whole page bytes as being occupied).- Specified by:
getTotalUsedSizein interfaceDataRegionMetrics- Returns:
- Total amount of bytes occupied by the non-empty pages
-
getAllocationRate
public float getAllocationRate()
Gets pages allocation rate of a memory region.- Specified by:
getAllocationRatein interfaceDataRegionMetrics- Returns:
- Number of allocated pages per second.
-
getEvictionRate
public float getEvictionRate()
Gets eviction rate of a given memory region.- Specified by:
getEvictionRatein interfaceDataRegionMetrics- Returns:
- Number of evicted pages per second.
-
getLargeEntriesPagesPercentage
public float getLargeEntriesPagesPercentage()
Gets percentage of pages that are fully occupied by large entries that go beyond page size. The large entities are split into fragments in a way so that each fragment can fit into a single page.- Specified by:
getLargeEntriesPagesPercentagein interfaceDataRegionMetrics- Returns:
- Percentage of pages fully occupied by large entities.
-
getPagesFillFactor
public float getPagesFillFactor()
Returns the ratio of space occupied by user and system data to the size of all pages that contain this data.This metric can help to determine how much space of a data page is occupied on average. Low fill factor can indicate that data pages are very fragmented (i.e. there is a lot of empty space across all data pages).
- Specified by:
getPagesFillFactorin interfaceDataRegionMetrics- Returns:
- Ratio of space occupied by user and system data to the size of all pages that contain ant data.
-
getDirtyPages
public long getDirtyPages()
Gets the number of dirty pages (pages which contents is different from the current persistent storage state). This metric is enabled only for Ignite nodes with enabled persistence.- Specified by:
getDirtyPagesin interfaceDataRegionMetrics- Returns:
- Current number of dirty pages.
-
getPagesReplaceRate
public float getPagesReplaceRate()
Gets rate (pages per second) at which pages get replaced with other pages from persistent storage. The rate effectively represents the rate at which pages get 'evicted' in favor of newly needed pages. This metric is enabled only for Ignite nodes with enabled persistence.- Specified by:
getPagesReplaceRatein interfaceDataRegionMetrics- Returns:
- Pages per second replace rate.
-
getPagesReplaceAge
public float getPagesReplaceAge()
Gets average age (in milliseconds) for the pages being replaced from the disk storage. This number effectively represents the average time between the moment when a page is read from the disk and the time when the page is evicted. Note that if a page is never evicted, it does not contribute to this metric. This metric is enabled only for Ignite nodes with enabled persistence.- Specified by:
getPagesReplaceAgein interfaceDataRegionMetrics- Returns:
- Replaced pages age in milliseconds.
-
getPhysicalMemoryPages
public long getPhysicalMemoryPages()
Gets total number of pages currently loaded to the RAM. When persistence is disabled, this metric is equal toDataRegionMetrics.getTotalAllocatedPages().- Specified by:
getPhysicalMemoryPagesin interfaceDataRegionMetrics- Returns:
- Total number of pages loaded to RAM.
-
getPhysicalMemorySize
public long getPhysicalMemorySize()
Gets total size of pages loaded to the RAM. When persistence is disabled, this metric is equal toDataRegionMetrics.getTotalAllocatedSize().- Specified by:
getPhysicalMemorySizein interfaceDataRegionMetrics- Returns:
- Total size of pages loaded to RAM in bytes.
-
getUsedCheckpointBufferPages
public long getUsedCheckpointBufferPages()
Gets used checkpoint buffer size in pages.- Specified by:
getUsedCheckpointBufferPagesin interfaceDataRegionMetrics- Returns:
- Checkpoint buffer size in pages.
-
getUsedCheckpointBufferSize
public long getUsedCheckpointBufferSize()
Gets used checkpoint buffer size in bytes.- Specified by:
getUsedCheckpointBufferSizein interfaceDataRegionMetrics- Returns:
- Checkpoint buffer size in bytes.
-
getCheckpointBufferSize
public long getCheckpointBufferSize()
Gets checkpoint buffer size in bytes.- Specified by:
getCheckpointBufferSizein interfaceDataRegionMetrics- Returns:
- Checkpoint buffer size in bytes.
-
getPageSize
public int getPageSize()
Gets memory page size.- Specified by:
getPageSizein interfaceDataRegionMetrics- Returns:
- Page size in bytes.
-
getPagesRead
public long getPagesRead()
The number of read pages from last restart.- Specified by:
getPagesReadin interfaceDataRegionMetrics- Returns:
- The number of read pages from last restart.
-
getPagesWritten
public long getPagesWritten()
The number of written pages from last restart.- Specified by:
getPagesWrittenin interfaceDataRegionMetrics- Returns:
- The number of written pages from last restart.
-
getPagesReplaced
public long getPagesReplaced()
The number of replaced pages from last restart .- Specified by:
getPagesReplacedin interfaceDataRegionMetrics- Returns:
- The number of replaced pages from last restart .
-
getOffHeapSize
public long getOffHeapSize()
Total offheap size in bytes.- Specified by:
getOffHeapSizein interfaceDataRegionMetrics- Returns:
- Total offheap size in bytes.
-
getOffheapUsedSize
public long getOffheapUsedSize()
Total used offheap size in bytes.- Specified by:
getOffheapUsedSizein interfaceDataRegionMetrics- Returns:
- Total used offheap size in bytes.
-
-