afs commented on issue #2318:
URL: https://github.com/apache/jena/issues/2318#issuecomment-1986852846

   > we open many tdb2 connections
   
   "There can be only one" :-) per database.
   
   > the memory usage decreases.
   
   If that is heap, then it is the node cache - it's an LRU cache and the bytes 
size depends on the size of the nodes cached. By default, it has a limit of 1 
million entries (increasing the size has not been seen to lead to significant 
gains). Node cache will reappear in the new location.
   
   The RES (Resident RAM) will drop due to files - that's the OS file system 
cache for a closed file; RES goes up and down anyway while the database is 
running and is controlled by the kernel. VIRT will drop, possibly a lot, but 
all of VIRT that isn't also RES is not resident and has no performance effect 
and is meaningless.
   
   Sounds like you could seemlessly switch to a reloaded database using the 
same logic as the `DatasetGraphSwitchable`  which is the  java object the app 
has a handle on. (Not use unchanged - it's tied to the TDB2 compaction and 
carries some location details.)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to