Class DataRegionMetricsSnapshot

    • 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:
        getName in interface DataRegionMetrics
        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:
        getTotalAllocatedPages in interface DataRegionMetrics
        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:
        getTotalAllocatedSize in interface DataRegionMetrics
        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:
        getTotalUsedPages in interface DataRegionMetrics
        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 the DataRegionMetrics.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:
        getTotalUsedSize in interface DataRegionMetrics
        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:
        getAllocationRate in interface DataRegionMetrics
        Returns:
        Number of allocated pages per second.
      • getEvictionRate

        public float getEvictionRate()
        Gets eviction rate of a given memory region.
        Specified by:
        getEvictionRate in interface DataRegionMetrics
        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:
        getLargeEntriesPagesPercentage in interface DataRegionMetrics
        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:
        getPagesFillFactor in interface DataRegionMetrics
        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:
        getDirtyPages in interface DataRegionMetrics
        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:
        getPagesReplaceRate in interface DataRegionMetrics
        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:
        getPagesReplaceAge in interface DataRegionMetrics
        Returns:
        Replaced pages age in milliseconds.
      • getUsedCheckpointBufferPages

        public long getUsedCheckpointBufferPages()
        Gets used checkpoint buffer size in pages.
        Specified by:
        getUsedCheckpointBufferPages in interface DataRegionMetrics
        Returns:
        Checkpoint buffer size in pages.
      • getUsedCheckpointBufferSize

        public long getUsedCheckpointBufferSize()
        Gets used checkpoint buffer size in bytes.
        Specified by:
        getUsedCheckpointBufferSize in interface DataRegionMetrics
        Returns:
        Checkpoint buffer size in bytes.
      • getCheckpointBufferSize

        public long getCheckpointBufferSize()
        Gets checkpoint buffer size in bytes.
        Specified by:
        getCheckpointBufferSize in interface DataRegionMetrics
        Returns:
        Checkpoint buffer size in bytes.
      • getPageSize

        public int getPageSize()
        Gets memory page size.
        Specified by:
        getPageSize in interface DataRegionMetrics
        Returns:
        Page size in bytes.
      • getPagesRead

        public long getPagesRead()
        The number of read pages from last restart.
        Specified by:
        getPagesRead in interface DataRegionMetrics
        Returns:
        The number of read pages from last restart.
      • getPagesWritten

        public long getPagesWritten()
        The number of written pages from last restart.
        Specified by:
        getPagesWritten in interface DataRegionMetrics
        Returns:
        The number of written pages from last restart.
      • getPagesReplaced

        public long getPagesReplaced()
        The number of replaced pages from last restart .
        Specified by:
        getPagesReplaced in interface DataRegionMetrics
        Returns:
        The number of replaced pages from last restart .
      • getOffHeapSize

        public long getOffHeapSize()
        Total offheap size in bytes.
        Specified by:
        getOffHeapSize in interface DataRegionMetrics
        Returns:
        Total offheap size in bytes.
      • getOffheapUsedSize

        public long getOffheapUsedSize()
        Total used offheap size in bytes.
        Specified by:
        getOffheapUsedSize in interface DataRegionMetrics
        Returns:
        Total used offheap size in bytes.