Fork me on GitHub
#xtdb
<
2023-01-19
>
Hukka11:01:38

Hm. I started to look into surprisingly big heap uses, and on top I see we have over four million Strings in the heap. This is a bit new territory for me, but I suspect this is coming from xtdb based on seeing org.agrona also having a bunch of buffers allocated, and nothing else depends on those

Hukka11:01:12

Indeed, after shutting down the node, all that heap is released

Hukka11:01:03

Well, I suppose it's not a problem yet, as long as it stays in reasonable levels (about half a gig now, after querying data)

tatut12:01:23

there are caches used by the node which may be big, but that isn’t a problem if you don’t need the memory for something else

tatut12:01:08

looks like the second change cache has a background thread that monitors memory use

Hukka12:01:20

Yeah, but would be good to have some way to estimate the cache sizes

👍 2
Hukka12:01:02

I'm guessing that the rocks cache is bounded, but does xt then keep a reference to all the documents that happen to be in the cache? Or is it just something completely unrelated.

refset13:01:27

We do have this issue open where you'd be very welcome to pose such questions (I'll link back to this thread at least, anyway) https://github.com/xtdb/xtdb/issues/1830 In short though, managing memory usage is a tricky balance between: 1. performance - caches make things fast so use memory if it's available 2. robustness - we don't want OOMs or to cause non-XT performance to suffer unpredictably 3. user-friendliness - defaults should be sane but exposing levers is often necessary As per the issue, we need to review the defaults at some point.

jonpither13:01:37

Which version of XT?

refset13:01:36

> the second chance cache has a background thread that monitors memory use note that the second chance cache has been disabled (in favour of LRU) as of 1.22.0, due to unresolved memory issues

Hukka13:01:03

Looks like the questions in the issue pretty much cover the subject

blob_thumbs_up 2
refset13:01:10

> I'm guessing that the rocks cache is bounded that's definitely true of the block cache as I understand things, although Rocks will perform various allocations for other reasons > does xt then keep a reference to all the documents that happen to be in the cache? XT has no visibility of what's inside the Rocks cache