You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Pradeep Badiger <Pr...@fico.com> on 2016/12/16 13:26:49 UTC

Binary Marshalling issue

Hi,

I have an application which uses apache ignite cache in an embedded mode. On each GC cycle, I am seeing lot of memory getting retained. Cache has around 10K entries and each entry is an object containing a map of 500 entries. The key and value in the map within an object is string of less than 20 bytes.

I see lot of time spent during the marshalling process when the cache entry is made.

Does ignite generate lot of short lived objects during the marshalling process? What would cause lot of memory to be retained during each GC cycle?

Thanks,
Pradeep V.B.
This email and any files transmitted with it are confidential, proprietary and intended solely for the individual or entity to whom they are addressed. If you have received this email in error please delete it immediately.

RE: Binary Marshalling issue

Posted by Pradeep Badiger <Pr...@fico.com>.
Thanks Andrey.

From: Andrey Mashenkov [mailto:andrey.mashenkov@gmail.com]
Sent: Friday, December 16, 2016 11:30 AM
To: user@ignite.apache.org
Subject: Re: Binary Marshalling issue

Hi,

Unfortunatelly ignite does not support keepBinary option for Maps [1].
Best way is try to avoid using short-lived Maps.

But you can try to implementation of BinaryObject that implements Externalizable interface where you will free to choose the way to access map entries.
For example, such implementation can have BinaryObject.field() method with same semantic as Map.get() method.

[1] http://apacheignite.gridgain.org/docs/binary-marshaller#binaryobject-cache-api

On Fri, Dec 16, 2016 at 5:48 PM, Pradeep Badiger <Pr...@fico.com>> wrote:
Hi Andrey,

Thanks for your response. Is there a way I can disable it or reduce it? Do I need to use BinaryObject?

Thanks,
Pradeep V.B.

From: Andrey Mashenkov [mailto:andrey.mashenkov@gmail.com<ma...@gmail.com>]
Sent: Friday, December 16, 2016 9:41 AM
To: user@ignite.apache.org<ma...@ignite.apache.org>
Subject: Re: Binary Marshalling issue

Hi

As I understand you have many short-lived Maps as values in cache.
Yes, in your case, you can get a lot of garbage due to Map will be marshal\unmarshal along with each of its content at every cache entry access.

On Fri, Dec 16, 2016 at 4:26 PM, Pradeep Badiger <Pr...@fico.com>> wrote:
Hi,

I have an application which uses apache ignite cache in an embedded mode. On each GC cycle, I am seeing lot of memory getting retained. Cache has around 10K entries and each entry is an object containing a map of 500 entries. The key and value in the map within an object is string of less than 20 bytes.

I see lot of time spent during the marshalling process when the cache entry is made.

Does ignite generate lot of short lived objects during the marshalling process? What would cause lot of memory to be retained during each GC cycle?

Thanks,
Pradeep V.B.
This email and any files transmitted with it are confidential, proprietary and intended solely for the individual or entity to whom they are addressed. If you have received this email in error please delete it immediately.



--
С уважением,
Машенков Андрей Владимирович
Тел. +7-921-932-61-82

Best regards,
Andrey V. Mashenkov
Cerr: +7-921-932-61-82
This email and any files transmitted with it are confidential, proprietary and intended solely for the individual or entity to whom they are addressed. If you have received this email in error please delete it immediately.



--
С уважением,
Машенков Андрей Владимирович
Тел. +7-921-932-61-82

Best regards,
Andrey V. Mashenkov
Cerr: +7-921-932-61-82
This email and any files transmitted with it are confidential, proprietary and intended solely for the individual or entity to whom they are addressed. If you have received this email in error please delete it immediately.

Re: Binary Marshalling issue

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi,

Unfortunatelly ignite does not support keepBinary option for Maps [1].
Best way is try to avoid using short-lived Maps.

But you can try to implementation of BinaryObject that implements
Externalizable interface where you will free to choose the way to access
map entries.
For example, such implementation can have BinaryObject.field() method with
same semantic as Map.get() method.

[1]
http://apacheignite.gridgain.org/docs/binary-marshaller#binaryobject-cache-api

On Fri, Dec 16, 2016 at 5:48 PM, Pradeep Badiger <Pr...@fico.com>
wrote:

> Hi Andrey,
>
>
>
> Thanks for your response. Is there a way I can disable it or reduce it? Do
> I need to use BinaryObject?
>
>
>
> Thanks,
>
> Pradeep V.B.
>
>
>
> *From:* Andrey Mashenkov [mailto:andrey.mashenkov@gmail.com]
> *Sent:* Friday, December 16, 2016 9:41 AM
> *To:* user@ignite.apache.org
> *Subject:* Re: Binary Marshalling issue
>
>
>
> Hi
>
>
>
> As I understand you have many short-lived Maps as values in cache.
>
> Yes, in your case, you can get a lot of garbage due to Map will be
> marshal\unmarshal along with each of its content at every cache entry
> access.
>
>
>
> On Fri, Dec 16, 2016 at 4:26 PM, Pradeep Badiger <Pr...@fico.com>
> wrote:
>
> Hi,
>
>
>
> I have an application which uses apache ignite cache in an embedded mode.
> On each GC cycle, I am seeing lot of memory getting retained. Cache has
> around 10K entries and each entry is an object containing a map of 500
> entries. The key and value in the map within an object is string of less
> than 20 bytes.
>
>
>
> I see lot of time spent during the marshalling process when the cache
> entry is made.
>
>
>
> Does ignite generate lot of short lived objects during the marshalling
> process? What would cause lot of memory to be retained during each GC
> cycle?
>
>
>
> Thanks,
>
> Pradeep V.B.
>
> This email and any files transmitted with it are confidential, proprietary
> and intended solely for the individual or entity to whom they are
> addressed. If you have received this email in error please delete it
> immediately.
>
>
>
>
>
> --
>
> С уважением,
> Машенков Андрей Владимирович
> Тел. +7-921-932-61-82
>
> Best regards,
> Andrey V. Mashenkov
> Cerr: +7-921-932-61-82
> This email and any files transmitted with it are confidential, proprietary
> and intended solely for the individual or entity to whom they are
> addressed. If you have received this email in error please delete it
> immediately.
>



-- 
С уважением,
Машенков Андрей Владимирович
Тел. +7-921-932-61-82

Best regards,
Andrey V. Mashenkov
Cerr: +7-921-932-61-82

RE: Binary Marshalling issue

Posted by Pradeep Badiger <Pr...@fico.com>.
Hi Andrey,

Thanks for your response. Is there a way I can disable it or reduce it? Do I need to use BinaryObject?

Thanks,
Pradeep V.B.

From: Andrey Mashenkov [mailto:andrey.mashenkov@gmail.com]
Sent: Friday, December 16, 2016 9:41 AM
To: user@ignite.apache.org
Subject: Re: Binary Marshalling issue

Hi

As I understand you have many short-lived Maps as values in cache.
Yes, in your case, you can get a lot of garbage due to Map will be marshal\unmarshal along with each of its content at every cache entry access.

On Fri, Dec 16, 2016 at 4:26 PM, Pradeep Badiger <Pr...@fico.com>> wrote:
Hi,

I have an application which uses apache ignite cache in an embedded mode. On each GC cycle, I am seeing lot of memory getting retained. Cache has around 10K entries and each entry is an object containing a map of 500 entries. The key and value in the map within an object is string of less than 20 bytes.

I see lot of time spent during the marshalling process when the cache entry is made.

Does ignite generate lot of short lived objects during the marshalling process? What would cause lot of memory to be retained during each GC cycle?

Thanks,
Pradeep V.B.
This email and any files transmitted with it are confidential, proprietary and intended solely for the individual or entity to whom they are addressed. If you have received this email in error please delete it immediately.



--
С уважением,
Машенков Андрей Владимирович
Тел. +7-921-932-61-82

Best regards,
Andrey V. Mashenkov
Cerr: +7-921-932-61-82
This email and any files transmitted with it are confidential, proprietary and intended solely for the individual or entity to whom they are addressed. If you have received this email in error please delete it immediately.

Re: Binary Marshalling issue

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi

As I understand you have many short-lived Maps as values in cache.
Yes, in your case, you can get a lot of garbage due to Map will be
marshal\unmarshal along with each of its content at every cache entry
access.

On Fri, Dec 16, 2016 at 4:26 PM, Pradeep Badiger <Pr...@fico.com>
wrote:

> Hi,
>
>
>
> I have an application which uses apache ignite cache in an embedded mode.
> On each GC cycle, I am seeing lot of memory getting retained. Cache has
> around 10K entries and each entry is an object containing a map of 500
> entries. The key and value in the map within an object is string of less
> than 20 bytes.
>
>
>
> I see lot of time spent during the marshalling process when the cache
> entry is made.
>
>
>
> Does ignite generate lot of short lived objects during the marshalling
> process? What would cause lot of memory to be retained during each GC
> cycle?
>
>
>
> Thanks,
>
> Pradeep V.B.
> This email and any files transmitted with it are confidential, proprietary
> and intended solely for the individual or entity to whom they are
> addressed. If you have received this email in error please delete it
> immediately.
>



-- 
С уважением,
Машенков Андрей Владимирович
Тел. +7-921-932-61-82

Best regards,
Andrey V. Mashenkov
Cerr: +7-921-932-61-82