Re: [ROOT] Optimizing performance in Windows

From: Valeri Fine (fine@bnl.gov)
Date: Sat Feb 23 2002 - 01:54:14 MET


Hello Ed,

 Are you sure your problem is related to Windows ?
 
>   I would like to know if anybody has any advice on performance
> optimizing on Win2K - I am using qtRoot "version 3.02/06 25 January
> 2002".  My application analyzed a root file which consists of a TNtuple.

Even though the QtRoot version is for evaluation and was compiled with 
all "optimization off"
(Usually it slow down the application by factor 2) 
this may not explain your troubles. You may want to download the regular 
version to compare the figures (or try your application with UNIX machine).

To advice you what do you do and how more precisely.

The piece of the code will do the job.
For example are you using TNTuple::Draw method each time to loop over,
are you using MakeClass methods and pre-compiled code etc ?

  And the main issue how slow is your "slow"

> The analysis requires spinning though the TNtuple multiple times.  The
> TNtuple has 8-10 branches and can contain up to 10's of millions of
> entries.  Note: I have a gigabyte of physical memory.  I have 2
> questions: 

  How large are your branches (average) 1 word, 10 words, 100 words
  My guess your file is less then your memory < 1Gb.

> 1. When I first spin through the ntuple, it takes a long time - I can
> see that my root process is doing lots of I/O - fine.  when I do a .ls I
> see the input ntuple "in memory" that is, it shows up on a line starting
> w/ OBJ:. 

  What you see is the TTree class object, That is small. It contains some 
  general description of TNtuple, not the TNtuple data.

>  However my process memory is about the same size as it was
> before I read in the TNtuple.  When I spin through the TNtuple
> subsequent times, it takes just as long - I my process once again logs
> lots of I/O.  How can I read in the ntuple in such a way that it lives
> in memory?

  I think there is no way to keep the all events in the memory.

  Anyway it is not the QtRoot Windows version omission rather ROOT-wide 
  feature.

  I hope Rene can explain this matter better,

  On other hand when my experiment needs to hold the entire event in the 
  memory it applies TTable  /  TDataSet OO model rather TTree. 
 (see: http://root.cern.ch/root/htmldoc/TDataSet.html 
   http://root.cern.ch/root/htmldoc/TTable.html
   and http://www.usatlas.bnl.gov/computing/software/db/Chep2000.pdf

  One has full control over the number of events resided in the memory 
  simulatenously.
 
  It does read the entire event into the memory at once and then may 
  loop over it as many time as one needs. I can provide the further information.

 
> 2.  At some point, I generate an output TNtuple.  When I do this, my
> root process starts page faulting like crazy but eventually the process
> memory size creeps up to the required size.  [Note: when I spin through
> the TNtuple, its quite a bit faster!]  How can I configure root to use
> start out with a larger allocated memory so that I don't need to page
> fault.

  Are you using the ROOT TFile compression ?
  I'd like to call your attention the compression  is expansive.
  To compress / uncompress one needs two buffers in memory.
  for real buffer and for the compressed buffer to be allocated 
  reallocated.

  Again I hope Rene / Foms can explain things better.

  Best regards, Valeri 

> 
> Thanks..
> 
> Ed Oltman
> 
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:42 MET