Hi,

we are currently looking for ways to reduce the overall memory usage when using 
Fastbit for longer running processes like this:

  char  *path;
  part  *partition=0;
  table *tab=0;
  table *in_memory_select=0;
  table *select_on_select=0;

  partition=new part(path);
  tab=table::create(*partition);
  in_memory_select=tab->select(query1,where1);
  select_on_select=in_memory_select->select(query2,where2);

  delete select_on_select;
  delete in_memory_select;
  delete tab;
  delete partition;

  // program goes on after this but memory for tables is not yet fully freed!
  // following operations will take a long time to complete, thus the process 
is blocking memory for a long time...

  // an additional call to fileManager::instance().clear() would free the 
memory!!


As far as I understand, all tables opened are memory mapped and registered in 
ibis::fileManager.
It seems to me that deleting tables and partitions via operator delete does not 
immediately decrease the memory usage. I think they are still registered by the 
fileManager instance and will still allocate memory. The intention is probably 
to reuse the tables in other queries etc.
A call to ibis::fileManager::clear() in addition to calling delete does seem to 
free all the memory.

I have now few questions on this:
- Is it safe to call ibis::fileManager::clear() even if there are still any 
open tables? Does the call to clear free all objects or just objects not 
opened/referenced anymore? 
- Is calling fileManager::clear() after operator delete the intended way to 
decrease memory usage or are there any better mechanisms?

Thank you for info on this and best regards
Jan


--
Jan Steemann
[email protected] 
Phone +49 2233 7933 752 | Fax +49 2233 7933 788 

Globalpark AG | Kalscheurener Str. 19a | 50354 Huerth | Germany
Vorsitzender des Vorstands/Chief Executive Officer (CEO) | Dr. Lorenz Graef
Mitglieder des Vorstands/Board Member | Frank Kleinert, Frank Michael, Oliver 
Trabert
Vorsitzender d. Aufsichtsrats/Chairperson of the Supervisory Board |
Dr. Richard C. Geibel | HRG Amtsgericht Koeln/Entered on Cologne |
Local Court Commercial Register | HRB 64032

GLOBALPARK - manage what matters | http://www.globalpark.de

_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to