That's probably due to page fragmentation: TotalUsedPages shows pages that
are not *completely* free. Looks like there's no direct metric responsible
for this, but I discovered the following workaround: there exists a metric
called "PagesFillFactor". It is computed as follows: (TotalAllocatedPages -
FreeSpaceInUsedPages) / TotalAllocatedPages . The problem is that it does
not take fully empty pages into account. So we can try to combine several
metrics to do the correct calculation:
TotalUsedPages - (TotalAllocatedPages - PagesFillFactor *
TotalAllocatedPages)

On Sun, Sep 18, 2022 at 4:29 PM 38797715 <[email protected]> wrote:

> I've checked TotalUsedPages in ignite.dataRegionMetrics(), it is found
> that the logic of this metric is consistent with OffheapUsedSize, that is,
> the value will not be updated after data deletion.
> 在 2022/9/18 19:42, Alexander Polovtcev 写道:
>
> Hello, you can check out "TotalUsedPages" and "TotalUsedSize" metrics that
> can be found in the Data Region metrics. However, please keep in mind that
> this does not take page fragmentation into account.
>
> On Sat, Sep 17, 2022 at 2:35 PM 38797715 <[email protected]> wrote:
>
>> Hi team,
>>
>> We found that if the delete operation is executed, the memory space
>> corresponding to the data will not be released, and this space will be
>> reused later.
>>
>> Therefore, metrics such as OffheapUsedSize will become inaccurate.
>>
>> So, how to calculate the exact amount of memory occupied by data in a
>> cache or a dataregion?
>>
>
>
> --
> With regards,
> Aleksandr Polovtcev
>
>

-- 
With regards,
Aleksandr Polovtcev

Reply via email to