Apache Ignite 2.0 中的默认缓存何时存储在堆外
When is the default cache stored off-heap in Apache Ignite 2.0
此配置在 2.0 版本
中无效
<!-- Enable off-heap storage with unlimited size. -->
<property name="offHeapMaxMemory" value="0"/>
错误:
WARNING: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'grid.cfg' defined in URL [file:/home/ignite/sample-cache.xml]: Cannot create inner bean
'org.apache.ignite.configuration.CacheConfiguration#4cc0edeb' of type [org.apache.ignite.configuration.CacheConfiguration] while setting bean
property 'cacheConfiguration' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'org.apache.ignite.configuration.CacheConfiguration#4cc0edeb' defined in URL [file:/home/ignite/sample-cache.xml]: Error setting property
values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'offHeapMaxMemory' of bean class
[org.apache.ignite.configuration.CacheConfiguration]: Bean property 'offHeapMaxMemory' is not writable or has an invalid setter method. Does the
parameter type of the setter match the return type of the getter?
遮阳板快照
Time of the snapshot: 07/07/17, 16:54:35
+===========================================================================================================================+
| Name(@) | Mode | Nodes | Entries (Heap / Off-heap) | Hits | Misses | Reads | Writes |
+===========================================================================================================================+
| txnCache(@c0) | PARTITIONED | 1 | min: 2917681 (2917681 / 0) | min: 0 | min: 0 | min: 0 | min: 0 |
| | | | avg: 2917681.00 (2917681.00 / 0.00) | avg: 0.00 | avg: 0.00 | avg: 0.00 | avg: 0.00 |
| | | | max: 2917681 (2917681 / 0) | max: 0 | max: 0 | max: 0 | max: 0 |
+---------------------------------------------------------------------------------------------------------------------------+
Cache 'txnCache(@c0)':
+--------------------------------------------------------------+
| Name(@) | txnCache(@c0) |
| Nodes | 1 |
| Total size Min/Avg/Max | 2917681 / 2917681.00 / 2917681 |
| Heap size Min/Avg/Max | 2917681 / 2917681.00 / 2917681 |
| Off-heap size Min/Avg/Max | 0 / 0.00 / 0 |
+--------------------------------------------------------------+
Nodes for: txnCache(@c0)
+============================================================================================================+
| Node ID8(@), IP | CPUs | Heap Used | CPU Load | Up Time | Size | Hi/Mi/Rd/Wr |
+============================================================================================================+
| 924C5A56(@n0), 10.0.2.55 | 2 | 8.93 % | 93.83 % | 00:12:31:969 | Total: 2917681 | Hi: 0 |
| | | | | | Heap: 2917681 | Mi: 0 |
| | | | | | Off-Heap: 0 | Rd: 0 |
| | | | | | Off-Heap Memory: 0 | Wr: 0 |
+------------------------------------------------------------------------------------------------------------+
'Hi' - Number of cache hits.
'Mi' - Number of cache misses.
'Rd' - number of cache reads.
'Wr' - Number of cache writes.
Aggregated queries metrics:
Minimum execution time: 00:00:00:000
Maximum execution time: 00:00:00:000
Average execution time: 00:00:00:000
Total number of executions: 0
Total number of failures: 0
Visor 快照显示 Off-Heap/Off-Heap-Memory 为 0。在文档中,它提到默认关闭堆是默认启用的。存储堆外之前是否有任何阈值?我该如何配置?
CacheConfiguration 自 2.0 以来没有 offHeapMaxMemory 属性。
是的,因为 2.0 版默认缓存将数据存储在堆外。
您可以通过以下方式查看:
cache.size(CachePeekMode.OFFHEAP))
而且,遮阳板无法正确计算 "off-heap entries count" 指标,但这已经修复并将在 2.1 版
中提供
此配置在 2.0 版本
中无效<!-- Enable off-heap storage with unlimited size. -->
<property name="offHeapMaxMemory" value="0"/>
错误:
WARNING: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'grid.cfg' defined in URL [file:/home/ignite/sample-cache.xml]: Cannot create inner bean
'org.apache.ignite.configuration.CacheConfiguration#4cc0edeb' of type [org.apache.ignite.configuration.CacheConfiguration] while setting bean
property 'cacheConfiguration' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'org.apache.ignite.configuration.CacheConfiguration#4cc0edeb' defined in URL [file:/home/ignite/sample-cache.xml]: Error setting property
values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'offHeapMaxMemory' of bean class
[org.apache.ignite.configuration.CacheConfiguration]: Bean property 'offHeapMaxMemory' is not writable or has an invalid setter method. Does the
parameter type of the setter match the return type of the getter?
遮阳板快照
Time of the snapshot: 07/07/17, 16:54:35
+===========================================================================================================================+
| Name(@) | Mode | Nodes | Entries (Heap / Off-heap) | Hits | Misses | Reads | Writes |
+===========================================================================================================================+
| txnCache(@c0) | PARTITIONED | 1 | min: 2917681 (2917681 / 0) | min: 0 | min: 0 | min: 0 | min: 0 |
| | | | avg: 2917681.00 (2917681.00 / 0.00) | avg: 0.00 | avg: 0.00 | avg: 0.00 | avg: 0.00 |
| | | | max: 2917681 (2917681 / 0) | max: 0 | max: 0 | max: 0 | max: 0 |
+---------------------------------------------------------------------------------------------------------------------------+
Cache 'txnCache(@c0)':
+--------------------------------------------------------------+
| Name(@) | txnCache(@c0) |
| Nodes | 1 |
| Total size Min/Avg/Max | 2917681 / 2917681.00 / 2917681 |
| Heap size Min/Avg/Max | 2917681 / 2917681.00 / 2917681 |
| Off-heap size Min/Avg/Max | 0 / 0.00 / 0 |
+--------------------------------------------------------------+
Nodes for: txnCache(@c0)
+============================================================================================================+
| Node ID8(@), IP | CPUs | Heap Used | CPU Load | Up Time | Size | Hi/Mi/Rd/Wr |
+============================================================================================================+
| 924C5A56(@n0), 10.0.2.55 | 2 | 8.93 % | 93.83 % | 00:12:31:969 | Total: 2917681 | Hi: 0 |
| | | | | | Heap: 2917681 | Mi: 0 |
| | | | | | Off-Heap: 0 | Rd: 0 |
| | | | | | Off-Heap Memory: 0 | Wr: 0 |
+------------------------------------------------------------------------------------------------------------+
'Hi' - Number of cache hits.
'Mi' - Number of cache misses.
'Rd' - number of cache reads.
'Wr' - Number of cache writes.
Aggregated queries metrics:
Minimum execution time: 00:00:00:000
Maximum execution time: 00:00:00:000
Average execution time: 00:00:00:000
Total number of executions: 0
Total number of failures: 0
Visor 快照显示 Off-Heap/Off-Heap-Memory 为 0。在文档中,它提到默认关闭堆是默认启用的。存储堆外之前是否有任何阈值?我该如何配置?
CacheConfiguration 自 2.0 以来没有 offHeapMaxMemory 属性。
是的,因为 2.0 版默认缓存将数据存储在堆外。 您可以通过以下方式查看:
cache.size(CachePeekMode.OFFHEAP))
而且,遮阳板无法正确计算 "off-heap entries count" 指标,但这已经修复并将在 2.1 版
中提供