You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Tobias Bocanegra <tr...@apache.org> on 2013/10/24 08:48:30 UTC
java.util.UUID
Hi,
just a quick question:
[image: Inline image 1]
I thought that Oak does not use UUIDs so much anymore - why do I have 20mb
of them? they are all allocated via the SegmentMK.
Regards, Toby
Re: java.util.UUID
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On Thu, Oct 24, 2013 at 1:56 PM, Tobias Bocanegra <tr...@apache.org> wrote:
> the relevant information was:
>
> java.util.UUID, 353'574 Objects (41%), 22'628'736 shallow size
OK, cool. I just changed the internals a bit to avoid having to keep
so many duplicate UUID instances in memory. That should bring these
numbers down considerably.
BR,
Jukka Zitting
Re: java.util.UUID
Posted by Tobias Bocanegra <tr...@apache.org>.
On Thu, Oct 24, 2013 at 6:38 AM, Jukka Zitting <ju...@gmail.com> wrote:
> Hi,
>
> On Thu, Oct 24, 2013 at 2:48 AM, Tobias Bocanegra <tr...@apache.org> wrote:
>> [Inline image 1]
>
> The image didn't survive it's trip to the mailing list. Can you post a
> link to it?
the relevant information was:
java.util.UUID, 353'574 Objects (41%), 22'628'736 shallow size
>
>> I thought that Oak does not use UUIDs so much anymore - why do I have 20mb of them? they are all allocated via the SegmentMK.
>
> The SegmentMK uses UUIDs to identify segments.
>
> Currently multiple copies of each UUID are kept in memory, one for the
> segment itself and another for each other segment that contains a
> reference to it. Avoiding those duplicates should bring the memory
> requirement down by an order of magnitude.
>
> Another reason for the high memory use is that currently the TarMK
> (not the MongoDB backend of SegmentMK) keeps all Segment UUIDs in
> memory all the time to avoid having to scan through the tar files when
> looking up a segment. A segment index at the end of each tar file
> should take care of that.
>
> BR,
>
> Jukka Zitting
--
toby
Re: java.util.UUID
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On Thu, Oct 24, 2013 at 2:48 AM, Tobias Bocanegra <tr...@apache.org> wrote:
> [Inline image 1]
The image didn't survive it's trip to the mailing list. Can you post a
link to it?
> I thought that Oak does not use UUIDs so much anymore - why do I have 20mb of them? they are all allocated via the SegmentMK.
The SegmentMK uses UUIDs to identify segments.
Currently multiple copies of each UUID are kept in memory, one for the
segment itself and another for each other segment that contains a
reference to it. Avoiding those duplicates should bring the memory
requirement down by an order of magnitude.
Another reason for the high memory use is that currently the TarMK
(not the MongoDB backend of SegmentMK) keeps all Segment UUIDs in
memory all the time to avoid having to scan through the tar files when
looking up a segment. A segment index at the end of each tar file
should take care of that.
BR,
Jukka Zitting