You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Andrey Mashenkov <an...@gmail.com> on 2017/07/04 12:00:24 UTC

Re: Measuring cache size and performance

Hi,

Looks like:
- "size" is a difference between retention size of cache before and after
test.
- "avgItemSize" is just "size/count"

So, avgItemSize also includes key and value size.

Assume, we have 64-bit JVM with compressed oops, so links has 4 bytes
overhead and there is 8 bytes alignment.
Key size - 8 (long) ~ 24 (as wrapped Long object with aligment).

Value size - 12 (obj header) +8(long) +8(long) + 4(ref to String) + 4(int)
~ 40 (with 8 byte  alignment)
Value String field size - 12 (obj header) + 4(hash) + 4(ref to char[]) +  ~
24 (with 8 byte  alignment)
Char array - 12 (obj header) + 4 (size) + 2*17 (chars) ~ 56 (with 8 byte
 alignment)
Total value size: 120 bytes

Total overhead: ~ 147 bytes + (primary index for sql) - (Hashmap buckets
size).

On Fri, Jun 30, 2017 at 9:56 PM, Pascal <pa...@gmail.com> wrote:

> Hi Andrew,
>
> I measured this on 2.0.
> size= 0MB  count=64  avgItemSize=7431
> size= 0MB  count=128  avgItemSize=3852
> size= 0MB  count=256  avgItemSize=2061
> size= 0MB  count=512  avgItemSize=1164
> size= 0MB  count=1024  avgItemSize=716
> size= 0MB  count=2048  avgItemSize=492
> size= 1MB  count=4096  avgItemSize=380
> size= 2MB  count=8192  avgItemSize=324
> size= 4MB  count=16384  avgItemSize=303
> size= 8MB  count=32768  avgItemSize=286
> size= 17MB  count=65536  avgItemSize=284
> size= 34MB  count=131072  avgItemSize=277
> size= 69MB  count=262144  avgItemSize=276
> size= 137MB  count=524288  avgItemSize=275
> size= 279MB  count=1048576  avgItemSize=279
> size= 551MB  count=2097152  avgItemSize=275
> size= 1103MB  count=4194304  avgItemSize=275
> I assume the amount of unsued free space is negligible with caches bigger
> than +/- 32MB. Correct?
>
> Pascal
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Measuring-cache-size-and-performance-
> tp14072p14187.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Best regards,
Andrey V. Mashenkov