You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by mikle-a <an...@inbox.ru> on 2020/02/03 15:11:19 UTC

Page size for large objects

Hi!

As I got from the documentation, DataStorageConfiguration "pageSize"
parameter have to be adjusted when we have a lot of big objects.

1) How to find out actual object size? I've accomplished it with
*((BinaryObjectImpl)ignite.binary().toBinary(myObject)).length()*, but not
sure whether it is correct way?

2) I found out that majority of my objects is about 64 * 1024 bytes, while
max allowed page size is 16 * 1024 (according to
DataStorageConfiguration.java:353). Could you please tell me, is it
generally a bad idea to store such big objects in ignite? What kind of
issues will I face storing such objects in pages of size 16 * 1024 bytes?

Thanks in advance.



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

Re: Page size for large objects

Posted by akurbanov <an...@gmail.com>.
Hi,

This test uses .array().length instead of length() in estimating the size,
so I guess that would be the approach to use:
https://github.com/apache/ignite/blame/master/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryMarshallerSelfTest.java

Regarding the large objects, you can definitely store them, but keep in mind
that there will be some overheads, like serialization/deserialization costs,
that might be avoided by utilizing local computations or for example,
cache.invoke. Benchmarking your exact your use-case is the best way to go.

Generally you should keep pageSize as close as possible to most
common/average object size, but it must not be lower than page size of
storage device that will be used.

Best regards,
Anton





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