Comments (7)
Nice finding, I think basically the memorized function shouldn't take ROOTFile as input argument because that makes the key lingers in LRU cache.
But this shouldn't be a problem other than producing bigger mapping number right? Since we only MMap the file, it's technically not real memory used
from unroot.jl.
Moelf wrote: "But this shouldn't be a problem other than producing bigger mapping number right? Since we only MMap the file, it's technically not real memory used."
It uses virtual memory address space. This address space is quite large on 64-bit architecture and much more limited on 32-bit one. It's any case a good practice to release resource, when no more needed.
I've also observed that it increases the resident set size (RSS). I expect it's an artifact, because in my test it went well beyond the physical memory with no impact on performance. Nevertheless, it can be worrying for the user and can be a real problem if a limit is set on RSS usage (see ulimit). My linux kernel version is 5.10.0.
My guess is that file data loaded by the kernel in the memory buffer are counted, even they have been discarded and until the memory is unmapped.
Philippe.
from unroot.jl.
Thanks for the investigation and fix proposal Philippe!
I have not have time to reproduce the issue yet but was wondering if closing the file properly (which is also a good practice ;)
) in your example would make any difference.
from unroot.jl.
It doesn't change. You need the ROOTFile instance and its fobj to be garbage collected, which was prevented by the reference in the LRU cache.
from unroot.jl.
Yes, you are right!
I think #261 should work, but have not verified yet.
from unroot.jl.
That PR also has tests
from unroot.jl.
Yep, saw them already. We can merge if you agree :)
from unroot.jl.
Related Issues (20)
- TTree v5 parsing issue
- Type stability regression introduced in 0.10.6 HOT 7
- Add type stability tests
- Unable to read `vector<float>` (regression in `v0.10.0`)
- `threadid()`-based buffers are unsafe under task migration
- How to test concurrency bug? HOT 2
- [RNTuple] Missing zigzag encoding support
- Dangling TBasket not handled properly (offset index type wrong) HOT 2
- Opening `km3net_online.root` causes huge memory usage spike HOT 2
- `LazyTree()` hang regression in 0.10.16
- Pre-compilation failure after upgrading to v1.9.3 HOT 6
- Performance for trees with a large number of branches HOT 13
- Fix Documentation due to their 1.0 release
- `RNTuple` reading extremely slow
- `nanoAOD_ttbar` latency HOT 26
- CI broken on nighly due to MD5.jl using SHA.jl internals
- RNTuple RC2 compatibility
- Do not manage to read a TTree with a structure of arrays of basic types HOT 17
- Cannot read empty collections from a RNTuple file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unroot.jl.