Question about number of total onheap and offheap cache entries.

classic Classic list List threaded Threaded
9 messages Options
Ray Ray
Reply | Threaded
Open this post in threaded view
|

Question about number of total onheap and offheap cache entries.

I have a cache with 1 million entries.
This cache is set up with partitioned cache mode and two backup.
So Ignite will store 3 million entries on all nodes, right?
But when I try run cache and cache command in vision, visor tells that this
cache has total 7.5 million rows.
So I'm confused, why does Ignite store 7.5 million rows?
And I'm using Ignite 2.1, and by default the cache is stored off heap.
But visor tells that 3.5 million entries are store onheap and the other 3.5
million is stored offheap.
Here's the visor log

visor> cache
[2017-09-30T12:15:10,497][INFO
][grid-nio-worker-tcp-comm-0-#65%null%][TcpCommunicationSpi] Established
outgoing communication connection [locAddr=/10.29.42.49:34233,
rmtAddr=sap-datanode3/10.29.42.46:49100]
[2017-09-30T12:15:10,509][INFO
][grid-nio-worker-tcp-comm-1-#66%null%][TcpCommunicationSpi] Established
outgoing communication connection [locAddr=/10.29.42.49:40210,
rmtAddr=sap-datanode5/10.29.42.48:49100]
[2017-09-30T12:15:10,514][INFO
][grid-nio-worker-tcp-comm-2-#67%null%][TcpCommunicationSpi] Established
outgoing communication connection [locAddr=/127.0.0.1:47416,
rmtAddr=/127.0.0.1:49100]
[2017-09-30T12:15:10,521][INFO
][grid-nio-worker-tcp-comm-3-#68%null%][TcpCommunicationSpi] Established
outgoing communication connection [locAddr=/10.29.42.49:17331,
rmtAddr=sap-datanode4/10.29.42.47:49100]
Time of the snapshot: 09/30/17, 12:15:10
+=============================================================================================================================+
|      Name(@)      |    Mode     | Nodes |     Entries (Heap / Off-heap)    
|   Hits    |  Misses   |   Reads   |  Writes   |
+=============================================================================================================================+
| DailyAggData(@c0) | PARTITIONED | 4     | min: 744297 (0 / 744297)        
| min: 0    | min: 0    | min: 0    | min: 0    |
|                   |             |       | avg: 752107.50 (0.00 /
752107.50) | avg: 0.00 | avg: 0.00 | avg: 0.00 | avg: 0.00 |
|                   |             |       | max: 758153 (0 / 758153)        
| max: 0    | max: 0    | max: 0    | max: 0    |
+-----------------------------------------------------------------------------------------------------------------------------+

Use "-a" flag to see detailed statistics.
visor> cache -a
Time of the snapshot: 09/30/17, 12:15:16
+=============================================================================================================================+
|      Name(@)      |    Mode     | Nodes |     Entries (Heap / Off-heap)    
|   Hits    |  Misses   |   Reads   |  Writes   |
+=============================================================================================================================+
| DailyAggData(@c0) | PARTITIONED | 4     | min: 744297 (0 / 744297)        
| min: 0    | min: 0    | min: 0    | min: 0    |
|                   |             |       | avg: 752107.50 (0.00 /
752107.50) | avg: 0.00 | avg: 0.00 | avg: 0.00 | avg: 0.00 |
|                   |             |       | max: 758153 (0 / 758153)        
| max: 0    | max: 0    | max: 0    | max: 0    |
+-----------------------------------------------------------------------------------------------------------------------------+

Cache 'DailyAggData(@c0)':
+-----------------------------------------------------------+
| Name(@)                     | DailyAggData(@c0)           |
| Nodes                       | 4                           |
| Total size Min/Avg/Max      | 744297 / 752107.50 / 758153 |
|   Heap size Min/Avg/Max     | 0 / 0.00 / 0                |
|   Off-heap size Min/Avg/Max | 744297 / 752107.50 / 758153 |
+-----------------------------------------------------------+

Nodes for: DailyAggData(@c0)
+==============================================================================================================+
|      Node ID8(@), IP       | CPUs | Heap Used | CPU Load |   Up Time    |        
Size         | Hi/Mi/Rd/Wr |
+==============================================================================================================+
| 7A05C9B9(@n3), | 56   | 8.31 %    | 0.00 %   | 30:06:45:032 | Total:
1507662       | Hi: 0       |
|                            |      |           |          |              |  
Heap: 753831       | Mi: 0       |
|                            |      |           |          |              |  
Off-Heap: 753831   | Rd: 0       |
|                            |      |           |          |              |  
Off-Heap Memory: 0 | Wr: 0       |
+----------------------------+------+-----------+----------+--------------+----------------------+-------------+
| B39533DA(@n1), | 56   | 17.61 %   | 0.00 %   | 30:08:13:327 | Total:
1488594       | Hi: 0       |
|                            |      |           |          |              |  
Heap: 744297       | Mi: 0       |
|                            |      |           |          |              |  
Off-Heap: 744297   | Rd: 0       |
|                            |      |           |          |              |  
Off-Heap Memory: 0 | Wr: 0       |
+----------------------------+------+-----------+----------+--------------+----------------------+-------------+
| 9A77BB1F(@n0),  | 56   | 36.69 %   | 0.00 %   | 30:08:22:742 | Total:
1516306       | Hi: 0       |
|                            |      |           |          |              |  
Heap: 758153       | Mi: 0       |
|                            |      |           |          |              |  
Off-Heap: 758153   | Rd: 0       |
|                            |      |           |          |              |  
Off-Heap Memory: 0 | Wr: 0       |
+----------------------------+------+-----------+----------+--------------+----------------------+-------------+
| 9EA73689(@n2),  | 56   | 26.96 %   | 0.03 %   | 30:07:55:786 | Total:
1504298       | Hi: 0       |
|                            |      |           |          |              |  
Heap: 752149       | Mi: 0       |
|                            |      |           |          |              |  
Off-Heap: 752149   | Rd: 0       |
|                            |      |           |          |              |  
Off-Heap Memory: 0 | Wr: 0       |
+--------------------------------------------------------------------------------------------------------------+

And I get the total entries using sql query "select count(*) from
MeetingAggValue;", the result is 1,002,810

Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Vasiliy Sisko Vasiliy Sisko
Reply | Threaded
Open this post in threaded view
|

Re: Question about number of total onheap and offheap cache entries.

Hello @Ray


You problem is already fixed in issue https://issues.apache.org/jira/browse/IGNITE-6422.



On Sat, Sep 30, 2017 at 7:26 PM, Ray <[hidden email]> wrote:
I have a cache with 1 million entries.
This cache is set up with partitioned cache mode and two backup.
So Ignite will store 3 million entries on all nodes, right?
But when I try run cache and cache command in vision, visor tells that this
cache has total 7.5 million rows.
So I'm confused, why does Ignite store 7.5 million rows?
And I'm using Ignite 2.1, and by default the cache is stored off heap.
But visor tells that 3.5 million entries are store onheap and the other 3.5
million is stored offheap.
Here's the visor log

visor> cache
[2017-09-30T12:15:10,497][INFO
][grid-nio-worker-tcp-comm-0-#65%null%][TcpCommunicationSpi] Established
outgoing communication connection [locAddr=/10.29.42.49:34233,
rmtAddr=sap-datanode3/10.29.42.46:49100]
[2017-09-30T12:15:10,509][INFO
][grid-nio-worker-tcp-comm-1-#66%null%][TcpCommunicationSpi] Established
outgoing communication connection [locAddr=/10.29.42.49:40210,
rmtAddr=sap-datanode5/10.29.42.48:49100]
[2017-09-30T12:15:10,514][INFO
][grid-nio-worker-tcp-comm-2-#67%null%][TcpCommunicationSpi] Established
outgoing communication connection [locAddr=/127.0.0.1:47416,
rmtAddr=/127.0.0.1:49100]
[2017-09-30T12:15:10,521][INFO
][grid-nio-worker-tcp-comm-3-#68%null%][TcpCommunicationSpi] Established
outgoing communication connection [locAddr=/10.29.42.49:17331,
rmtAddr=sap-datanode4/10.29.42.47:49100]
Time of the snapshot: 09/30/17, 12:15:10
+=============================================================================================================================+
|      Name(@)      |    Mode     | Nodes |     Entries (Heap / Off-heap)
|   Hits    |  Misses   |   Reads   |  Writes   |
+=============================================================================================================================+
| DailyAggData(@c0) | PARTITIONED | 4     | min: 744297 (0 / 744297)
| min: 0    | min: 0    | min: 0    | min: 0    |
|                   |             |       | avg: 752107.50 (0.00 /
752107.50) | avg: 0.00 | avg: 0.00 | avg: 0.00 | avg: 0.00 |
|                   |             |       | max: 758153 (0 / 758153)
| max: 0    | max: 0    | max: 0    | max: 0    |
+-----------------------------------------------------------------------------------------------------------------------------+

Use "-a" flag to see detailed statistics.
visor> cache -a
Time of the snapshot: 09/30/17, 12:15:16
+=============================================================================================================================+
|      Name(@)      |    Mode     | Nodes |     Entries (Heap / Off-heap)
|   Hits    |  Misses   |   Reads   |  Writes   |
+=============================================================================================================================+
| DailyAggData(@c0) | PARTITIONED | 4     | min: 744297 (0 / 744297)
| min: 0    | min: 0    | min: 0    | min: 0    |
|                   |             |       | avg: 752107.50 (0.00 /
752107.50) | avg: 0.00 | avg: 0.00 | avg: 0.00 | avg: 0.00 |
|                   |             |       | max: 758153 (0 / 758153)
| max: 0    | max: 0    | max: 0    | max: 0    |
+-----------------------------------------------------------------------------------------------------------------------------+

Cache 'DailyAggData(@c0)':
+-----------------------------------------------------------+
| Name(@)                     | DailyAggData(@c0)           |
| Nodes                       | 4                           |
| Total size Min/Avg/Max      | 744297 / 752107.50 / 758153 |
|   Heap size Min/Avg/Max     | 0 / 0.00 / 0                |
|   Off-heap size Min/Avg/Max | 744297 / 752107.50 / 758153 |
+-----------------------------------------------------------+

Nodes for: DailyAggData(@c0)
+==============================================================================================================+
|      Node ID8(@), IP       | CPUs | Heap Used | CPU Load |   Up Time    |
Size         | Hi/Mi/Rd/Wr |
+==============================================================================================================+
| 7A05C9B9(@n3), | 56   | 8.31 %    | 0.00 %   | 30:06:45:032 | Total:
1507662       | Hi: 0       |
|                            |      |           |          |              |
Heap: 753831       | Mi: 0       |
|                            |      |           |          |              |
Off-Heap: 753831   | Rd: 0       |
|                            |      |           |          |              |
Off-Heap Memory: 0 | Wr: 0       |
+----------------------------+------+-----------+----------+--------------+----------------------+-------------+
| B39533DA(@n1), | 56   | 17.61 %   | 0.00 %   | 30:08:13:327 | Total:
1488594       | Hi: 0       |
|                            |      |           |          |              |
Heap: 744297       | Mi: 0       |
|                            |      |           |          |              |
Off-Heap: 744297   | Rd: 0       |
|                            |      |           |          |              |
Off-Heap Memory: 0 | Wr: 0       |
+----------------------------+------+-----------+----------+--------------+----------------------+-------------+
| 9A77BB1F(@n0),  | 56   | 36.69 %   | 0.00 %   | 30:08:22:742 | Total:
1516306       | Hi: 0       |
|                            |      |           |          |              |
Heap: 758153       | Mi: 0       |
|                            |      |           |          |              |
Off-Heap: 758153   | Rd: 0       |
|                            |      |           |          |              |
Off-Heap Memory: 0 | Wr: 0       |
+----------------------------+------+-----------+----------+--------------+----------------------+-------------+
| 9EA73689(@n2),  | 56   | 26.96 %   | 0.03 %   | 30:07:55:786 | Total:
1504298       | Hi: 0       |
|                            |      |           |          |              |
Heap: 752149       | Mi: 0       |
|                            |      |           |          |              |
Off-Heap: 752149   | Rd: 0       |
|                            |      |           |          |              |
Off-Heap Memory: 0 | Wr: 0       |
+--------------------------------------------------------------------------------------------------------------+

And I get the total entries using sql query "select count(*) from
MeetingAggValue;", the result is 1,002,810

Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/



--
Vasiliy Sisko
GridGain Systems
www.gridgain.com
Ray Ray
Reply | Threaded
Open this post in threaded view
|

Re: Question about number of total onheap and offheap cache entries.

Thank you Vasiliy for your answer.

In the ticket, it looks like the problem is with the off-heap entry count.
But my question is why the on-heap entry count is always the same as the
off-heap entry count?
Ignite stores the cache off-heap by default, so in design there will be zero
on-heap entry count when the cache is not visited, right?
Or is there some eviction configuration I need to set up for the entries to
be evicted after they are visited and brought on-heap?
I've been watching the visor stats for a day now, and the cache is not
visited during the day.
But the on-heap entry count is still not zero.

And is there any release date for Ignite 2.3?

Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Alexey Kuznetsov-2 Alexey Kuznetsov-2
Reply | Threaded
Open this post in threaded view
|

Re: Question about number of total onheap and offheap cache entries.

Hi Ray!

Could you show your cache configuration?

In case if you set "onHeapEnabled=true" Ignite will "cache" values in heap during get & sql operations.
And heap metric will be > 0.

As for 2.3 - it will be released by the end of October.
You can always try to build from sources from master.


On Tue, Oct 3, 2017 at 12:23 AM, Ray <[hidden email]> wrote:
Thank you Vasiliy for your answer.

In the ticket, it looks like the problem is with the off-heap entry count.
But my question is why the on-heap entry count is always the same as the
off-heap entry count?
Ignite stores the cache off-heap by default, so in design there will be zero
on-heap entry count when the cache is not visited, right?
Or is there some eviction configuration I need to set up for the entries to
be evicted after they are visited and brought on-heap?
I've been watching the visor stats for a day now, and the cache is not
visited during the day.
But the on-heap entry count is still not zero.

And is there any release date for Ignite 2.3?



--
Alexey Kuznetsov
Ray Ray
Reply | Threaded
Open this post in threaded view
|

Re: Question about number of total onheap and offheap cache entries.

Hi Alexey

My cache configuration is as follows.
cacheConfig.setName("DailyAggData")
cacheConfig.setIndexedTypes(classOf[A], classOf[B])
cacheConfig.setSqlSchema("PUBLIC")
aggredCacheConfig.setBackups(2)
cacheConfig.setQueryParallelism(8)

I didn't explicitly set "onHeapEnabled=true".
So what will happen if I perform get & sql operations with
onHeapEnabled=false?
Will off-heap entries be brought on-heap?

Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
dsetrakyan dsetrakyan
Reply | Threaded
Open this post in threaded view
|

Re: Question about number of total onheap and offheap cache entries.



On Tue, Oct 3, 2017 at 4:19 AM, Ray <[hidden email]> wrote:
Hi Alexey

My cache configuration is as follows.
cacheConfig.setName("DailyAggData")
cacheConfig.setIndexedTypes(classOf[A], classOf[B])
cacheConfig.setSqlSchema("PUBLIC")
aggredCacheConfig.setBackups(2)
cacheConfig.setQueryParallelism(8)

I didn't explicitly set "onHeapEnabled=true".
So what will happen if I perform get & sql operations with
onHeapEnabled=false?
Will off-heap entries be brought on-heap?

Yes, but only to return to user. Ignite will not be caching on-heap entry, and therefore the count should be 0.



Ray Ray
Reply | Threaded
Open this post in threaded view
|

Re: Question about number of total onheap and offheap cache entries.

But my on-heap entry count is still not 0 here.
As I didn't set onHeapEnabled=true, the value should be false in default,
right?
So is this a visor bug that the on-heap entry count is not 0?




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Ray Ray
Reply | Threaded
Open this post in threaded view
|

Re: Question about number of total onheap and offheap cache entries.

I mean in the sixth column "Size" of last chart of "cache -a" command, the
"Heap" entry count is not 0.
As the above picture shows.
<http://apache-ignite-users.70518.x6.nabble.com/file/t1346/WechatIMG8.jpeg>

But in the cache summary chart, the on-heap entry count is 0.
<http://apache-ignite-users.70518.x6.nabble.com/file/t1346/WechatIMG9.jpeg>

It's really confusing that these two statistics does not match.
Please let me know which of these is correct.

Thanks



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Ray Ray
Reply | Threaded
Open this post in threaded view
|

Re: Question about number of total onheap and offheap cache entries.

Looks like this ticket is the answer I'm looking for.
https://issues.apache.org/jira/browse/IGNITE-6131




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/