Max server object count

View: New views
4 Messages — Rating Filter:   Alert me  

Max server object count

by Artyom Sokolov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://www.terracotta.org/web/display/docs/Release+Notes says that
"Max server object count capped by int. There could be some unexpected
behavior if the database has more than max int/2 objects in it."

It would be appreciated if someone describes what can happen in this
case and why.

Thanks.
_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users

Re: Max server object count

by Saravanan Subbiah :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Currently at various places in our code base we use java collections to store/operate on the list of shared objects in
the system. As you know java collections return an int for getSize() (and many uses int for internal index pointers
too). So theoretically it can only handle Integer.MAX_VALUE elements in the collection. This is ok for java collections
as this is already a high number (2 Billion) and there is probably not enough memory to hold that many elements in the
collection anyways. (This is becoming untrue fast with 64bit VMs)

But since TC can page objects in/out from disk, it is possible for us to handle 2+ billion objects, if we fix certain
areas of our code base to not use java collections and use some special datastructures or fix the code logic to operate
on the list in chunks. Anyways this is not yet done, so the word of warning in the release note.

That being said, this limit is for the current live objects in the system and the limit is 2 billion. So its unlikely
that most people will ever hit that limit.

Artyom Sokolov wrote:

> http://www.terracotta.org/web/display/docs/Release+Notes says that
> "Max server object count capped by int. There could be some unexpected
> behavior if the database has more than max int/2 objects in it."
>
> It would be appreciated if someone describes what can happen in this
> case and why.
>
> Thanks.
> _______________________________________________
> tc-users mailing list
> tc-users@...
> http://lists.terracotta.org/mailman/listinfo/tc-users
_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users

Re: Max server object count

by Artyom Sokolov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What about 2 active L2 with striping enabled? Would be there 4 billion
objects or still 2 billions?

Thanks.

On Tue, Jun 2, 2009 at 2:06 PM, Saravanan Subbiah
<ssubbiah@...> wrote:

> Currently at various places in our code base we use java collections to store/operate on the list of shared objects in
> the system. As you know java collections return an int for getSize() (and many uses int for internal index pointers
> too). So theoretically it can only handle Integer.MAX_VALUE elements in the collection. This is ok for java collections
> as this is already a high number (2 Billion) and there is probably not enough memory to hold that many elements in the
> collection anyways. (This is becoming untrue fast with 64bit VMs)
>
> But since TC can page objects in/out from disk, it is possible for us to handle 2+ billion objects, if we fix certain
> areas of our code base to not use java collections and use some special datastructures or fix the code logic to operate
> on the list in chunks. Anyways this is not yet done, so the word of warning in the release note.
>
> That being said, this limit is for the current live objects in the system and the limit is 2 billion. So its unlikely
> that most people will ever hit that limit.
>
> Artyom Sokolov wrote:
>> http://www.terracotta.org/web/display/docs/Release+Notes says that
>> "Max server object count capped by int. There could be some unexpected
>> behavior if the database has more than max int/2 objects in it."
>>
>> It would be appreciated if someone describes what can happen in this
>> case and why.
>>
>> Thanks.
>> _______________________________________________
>> tc-users mailing list
>> tc-users@...
>> http://lists.terracotta.org/mailman/listinfo/tc-users
> _______________________________________________
> tc-users mailing list
> tc-users@...
> http://lists.terracotta.org/mailman/listinfo/tc-users
>
_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users

Re: Max server object count

by Saravanan Subbiah :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Since we dont share anything between the L2s other than control data, it should be able to handle 4 billion objects. But
there are some gotchas, like you cant have 1 shared collection in the system with more than 2 billion entries, which is
anyway not possible with current java collections. Also the L1s connect to both the L2s and fault the shared graph as
needed. We dont restrict the size of the faulted graph, its a function of available memory at the L1. So as long as the
  L1 doesnt try to fault more than 2 billion objects at the same time, it should be fine.

All this is theoretical limit though, not sure if I am overlooking something.

Artyom Sokolov wrote:

> What about 2 active L2 with striping enabled? Would be there 4 billion
> objects or still 2 billions?
>
> Thanks.
>
> On Tue, Jun 2, 2009 at 2:06 PM, Saravanan Subbiah
> <ssubbiah@...> wrote:
>> Currently at various places in our code base we use java collections to store/operate on the list of shared objects in
>> the system. As you know java collections return an int for getSize() (and many uses int for internal index pointers
>> too). So theoretically it can only handle Integer.MAX_VALUE elements in the collection. This is ok for java collections
>> as this is already a high number (2 Billion) and there is probably not enough memory to hold that many elements in the
>> collection anyways. (This is becoming untrue fast with 64bit VMs)
>>
>> But since TC can page objects in/out from disk, it is possible for us to handle 2+ billion objects, if we fix certain
>> areas of our code base to not use java collections and use some special datastructures or fix the code logic to operate
>> on the list in chunks. Anyways this is not yet done, so the word of warning in the release note.
>>
>> That being said, this limit is for the current live objects in the system and the limit is 2 billion. So its unlikely
>> that most people will ever hit that limit.
>>
>> Artyom Sokolov wrote:
>>> http://www.terracotta.org/web/display/docs/Release+Notes says that
>>> "Max server object count capped by int. There could be some unexpected
>>> behavior if the database has more than max int/2 objects in it."
>>>
>>> It would be appreciated if someone describes what can happen in this
>>> case and why.
>>>
>>> Thanks.
>>> _______________________________________________
>>> tc-users mailing list
>>> tc-users@...
>>> http://lists.terracotta.org/mailman/listinfo/tc-users
>> _______________________________________________
>> tc-users mailing list
>> tc-users@...
>> http://lists.terracotta.org/mailman/listinfo/tc-users
>>
> _______________________________________________
> tc-users mailing list
> tc-users@...
> http://lists.terracotta.org/mailman/listinfo/tc-users
_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users