blob: 74fdd11dd3280bc4b5bc403fdab9a6871aa95f66 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<link rel="canonical" href="https://ignite.apache.org/releases/2.1.0/javadoc/org/apache/ignite/MemoryMetrics.html" />
<META NAME="ROBOTS" CONTENT="NOINDEX">
<!-- Generated by javadoc (version 1.7.0_80) on Thu Jul 20 19:37:39 UTC 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>MemoryMetrics (Ignite 2.1.0)</title>
<meta name="date" content="2017-07-20">
<link rel="stylesheet" type="text/css" href="../../../javadoc.css" title="Style">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-61232409-1', 'auto');
ga('send', 'pageview');
</script></head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="MemoryMetrics (Ignite 2.1.0)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/MemoryMetrics.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>Ignite - In-Memory Data Fabric</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgnitionListener.html" title="interface in org.apache.ignite"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/apache/ignite/PersistenceMetrics.html" title="interface in org.apache.ignite"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/ignite/MemoryMetrics.html" target="_top">Frames</a></li>
<li><a href="MemoryMetrics.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.ignite</div>
<h2 title="Interface MemoryMetrics" class="title">Interface MemoryMetrics</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><a href="../../../org/apache/ignite/mxbean/MemoryMetricsMXBean.html" title="interface in org.apache.ignite.mxbean">MemoryMetricsMXBean</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">MemoryMetrics</span></pre>
<div class="block">This interface provides page memory related metrics of a specific Apache Ignite node. The overall page memory
architecture is covered in <a href="../../../org/apache/ignite/configuration/MemoryConfiguration.html" title="class in org.apache.ignite.configuration"><code>MemoryConfiguration</code></a>.
<p>
Since there are can be several memory regions configured with <a href="../../../org/apache/ignite/configuration/MemoryPolicyConfiguration.html" title="class in org.apache.ignite.configuration"><code>MemoryPolicyConfiguration</code></a> on an individual
Apache Ignite node, the metrics for every region will be collected and obtained separately.
<p>
There are two ways to get the metrics of an Apache Ignite node.
<ol>
<li>
First, a collection of the metrics can be obtained through <a href="../../../org/apache/ignite/Ignite.html#memoryMetrics()"><code>Ignite.memoryMetrics()</code></a> method. Note that
the method returns memory metrics snapshots rather than just in time memory state.
</li>
<li>
Second, all <a href="../../../org/apache/ignite/MemoryMetrics.html" title="interface in org.apache.ignite"><code>MemoryMetrics</code></a> of a local Apache Ignite node are visible through JMX interface. Refer to
<a href="../../../org/apache/ignite/mxbean/MemoryMetricsMXBean.html" title="interface in org.apache.ignite.mxbean"><code>MemoryMetricsMXBean</code></a> for more details.
</li>
</ol>
</p>
<p>
Memory metrics collection is not a free operation and might affect performance of an application. This is the reason
why the metrics are turned off by default. To enable the collection you can use both
<a href="../../../org/apache/ignite/configuration/MemoryPolicyConfiguration.html#setMetricsEnabled(boolean)"><code>MemoryPolicyConfiguration.setMetricsEnabled(boolean)</code></a> configuration property or
<a href="../../../org/apache/ignite/mxbean/MemoryMetricsMXBean.html#enableMetrics()"><code>MemoryMetricsMXBean.enableMetrics()</code></a> method of a respective JMX bean.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/MemoryMetrics.html#getAllocationRate()">getAllocationRate</a></strong>()</code>
<div class="block">Gets pages allocation rate of a memory region.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/MemoryMetrics.html#getDirtyPages()">getDirtyPages</a></strong>()</code>
<div class="block">Gets the number of dirty pages (pages which contents is different from the current persistent storage state).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/MemoryMetrics.html#getEvictionRate()">getEvictionRate</a></strong>()</code>
<div class="block">Gets eviction rate of a given memory region.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/MemoryMetrics.html#getLargeEntriesPagesPercentage()">getLargeEntriesPagesPercentage</a></strong>()</code>
<div class="block">Gets percentage of pages that are fully occupied by large entries that go beyond page size.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/MemoryMetrics.html#getName()">getName</a></strong>()</code>
<div class="block">A name of a memory region the metrics are collected for.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/MemoryMetrics.html#getPagesFillFactor()">getPagesFillFactor</a></strong>()</code>
<div class="block">Gets the percentage of space that is still free and can be filled in.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/MemoryMetrics.html#getPagesReplaceRate()">getPagesReplaceRate</a></strong>()</code>
<div class="block">Gets rate (pages per second) at which pages get replaced with other pages from persistent storage.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/MemoryMetrics.html#getPhysicalMemoryPages()">getPhysicalMemoryPages</a></strong>()</code>
<div class="block">Gets total number of pages currently loaded to the RAM.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/MemoryMetrics.html#getTotalAllocatedPages()">getTotalAllocatedPages</a></strong>()</code>
<div class="block">Gets a total number of allocated pages related to the memory policy.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</h4>
<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getName()</pre>
<div class="block">A name of a memory region the metrics are collected for.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Name of the memory region.</dd></dl>
</li>
</ul>
<a name="getTotalAllocatedPages()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTotalAllocatedPages</h4>
<pre>long&nbsp;getTotalAllocatedPages()</pre>
<div class="block">Gets a total number of allocated pages related to the memory policy. 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.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Total number of allocated pages.</dd></dl>
</li>
</ul>
<a name="getAllocationRate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAllocationRate</h4>
<pre>float&nbsp;getAllocationRate()</pre>
<div class="block">Gets pages allocation rate of a memory region.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Number of allocated pages per second.</dd></dl>
</li>
</ul>
<a name="getEvictionRate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEvictionRate</h4>
<pre>float&nbsp;getEvictionRate()</pre>
<div class="block">Gets eviction rate of a given memory region.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Number of evicted pages per second.</dd></dl>
</li>
</ul>
<a name="getLargeEntriesPagesPercentage()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLargeEntriesPagesPercentage</h4>
<pre>float&nbsp;getLargeEntriesPagesPercentage()</pre>
<div class="block">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.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Percentage of pages fully occupied by large entities.</dd></dl>
</li>
</ul>
<a name="getPagesFillFactor()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPagesFillFactor</h4>
<pre>float&nbsp;getPagesFillFactor()</pre>
<div class="block">Gets the percentage of space that is still free and can be filled in.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The percentage of space that is still free and can be filled in.</dd></dl>
</li>
</ul>
<a name="getDirtyPages()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDirtyPages</h4>
<pre>long&nbsp;getDirtyPages()</pre>
<div class="block">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.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Current number of dirty pages.</dd></dl>
</li>
</ul>
<a name="getPagesReplaceRate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPagesReplaceRate</h4>
<pre>float&nbsp;getPagesReplaceRate()</pre>
<div class="block">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.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Pages per second replace rate.</dd></dl>
</li>
</ul>
<a name="getPhysicalMemoryPages()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getPhysicalMemoryPages</h4>
<pre>long&nbsp;getPhysicalMemoryPages()</pre>
<div class="block">Gets total number of pages currently loaded to the RAM. When persistence is disabled, this metric is equal
to <a href="../../../org/apache/ignite/MemoryMetrics.html#getTotalAllocatedPages()"><code>getTotalAllocatedPages()</code></a>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Total number of pages loaded to RAM.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/MemoryMetrics.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>Ignite - In-Memory Data Fabric</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgnitionListener.html" title="interface in org.apache.ignite"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/apache/ignite/PersistenceMetrics.html" title="interface in org.apache.ignite"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/ignite/MemoryMetrics.html" target="_top">Frames</a></li>
<li><a href="MemoryMetrics.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><table width="100%" border="0" cellspacing=0 cellpadding=0 style="padding: 5px"> <tr> <td> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <a target=_blank href="https://ignite.apache.org"><nobr>2017 Copyright &#169; Apache Software Foundation</nobr></a> </td> </tr> </tbody> </table> </td> <td width="100%" align="right" valign="center"> <a href="https://twitter.com/ApacheIgnite" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @ApacheIgnite</a> </td> </tr> <tr> <td colspan="2" valign="top" align="left"> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <b>Ignite Fabric</b> </td> <td>:&nbsp;&nbsp; ver. <strong>2.1.0</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>:&nbsp;&nbsp; July 20 2017 </td> </tr> </tbody> </table> </td> </tr> </table></small></p>
</body>
</html>