Hi roottalk,
I'm trying to understand the memory usage of a simple macro that loops over a
TTree, calling GetEntry() (and essentially nothing else).
The pattern I see is shown in this plot of memory use (as reported by gSystem->GetProcInfo()) as a function of entry in the tree:
http://www.pas.rochester.edu/~prodrigues/memusage.png
Red is "resident" memory usage, and blue is "virtual". The thing I'm interested in is the pattern of flat memory usage for a number of entries, followed by a quick increase, over the course of a few entries, that is not reclaimed afterwards (eg, at around 1400).
I tried fiddling around with TTree:SetMaxVirtualSize and TTree:SetMaxCacheSize
(as you might guess from the title in the plot), but the pattern I describe
still occurs, just with slightly different sizes of jumps.
Can anyone explain what causes this pattern, or suggest ways of investigating it?
Thanks,
Phil
PS Some other information that might be relevant:
The input tree has a single branch containing and (large and complex) event
class. The typical uncompressed size of an entry (as reported by
TTree::GetEntry()) is 1-3 MB, although there are occasional large entries
(such as one of 300MB at around 1100 that causes the spike in memory that can
be seen there).
The spiky, messy memory usage at the start appears to be the region which has 1 entry per TBasket on disk. This region *does* change when I change TTree::SetMaxVirtualSize. For entry numbers >100, there are typically ~5 entries per TBasket. I suspect that the memory jumps have something to do with switching TBaskets, but I don't really have a firm idea what's going on. Received on Wed Aug 10 2011 - 19:20:52 CEST
This archive was generated by hypermail 2.2.0 : Wed Aug 10 2011 - 23:50:02 CEST