Hi Andrei:
Thanks for your answer!
My laptop run on MacOS(16G RAM),I just ran a simple test, it seems 'table
creation' cost much much more memory&time than 'data creation',and we got
'IgniteOutOfMemoryException: Out of memory in data region [name=default,
initSize=256.0 MiB, maxSize=3.2 GiB, persistenceEnabled=false]' in a few
seconds, see below:
* table count < 400 (time cost: 74s, 'java process' memory cost:6.32G):
Ignite ignite = Ignition.start("config/example-ignite.xml");
try (IgniteCache<?, ?> cache = ignite.getOrCreateCache(cfg)) {
longstart = System.currentTimeMillis();
for (inti = 0; i < 400; i++) {
cache.query(new SqlFieldsQuery(String.format(
"CREATE TABLE TBL_%s (id BIGINT,uid VARCHAR,PRIMARY KEY(id))",
i)));
}
System.out.println(System.currentTimeMillis() - start);
}
* table count (400~500 or 500+)(got 'OOME' in a few seconds)
So I guest:
sql-table is a special one in ignite, not only it's cost of memory, but also
it's way of creation, it's very expensive and it's not treated as first-class
citizen like 'plain-cache'
is this a problem?think about a multi-tenant scenario,if some system make
tenant-distinction on tbl-name level
At 2018-03-23 23:04:59, "aealexsandrov" <[email protected]> wrote:
>Hi Fvyaba,
>
>There is no information about it in documentation but according several
>places in the code I see that it isn't greater than int32.
>
> void ReadTableMetaVector(ignite::impl::binary::BinaryReaderImpl&
>reader, TableMetaVector& meta)
> {
> int32_t metaNum = reader.ReadInt32();
>
> meta.clear();
> meta.reserve(static_cast<size_t>(metaNum));
>
> for (int32_t i = 0; i < metaNum; ++i)
> {
> meta.push_back(TableMeta());
>
> meta.back().Read(reader);
> }
>
>So all restrictions that you can see will be related to available memory on
>your nodes.
>
>Thank you,
>Andrei
>
>
>
>
>--
>Sent from: http://apache-ignite-users.70518.x6.nabble.com/