[Xapian-tickets] [Xapian] #390: Include a way to log IO for profiling

Xapian nobody at xapian.org
Fri Jul 24 09:38:13 BST 2009


#390: Include a way to log IO for profiling
-------------------------+--------------------------------------------------
 Reporter:  richard      |       Owner:  olly
     Type:  enhancement  |      Status:  new 
 Priority:  normal       |   Milestone:      
Component:  Other        |     Version:      
 Severity:  normal       |   Blockedby:      
 Platform:  All          |    Blocking:      
-------------------------+--------------------------------------------------
 It would be good to have a way to get a log of all the IO performed by
 Xapian during indexing or search, so that we can profile it.

 Attached is a patch to xapian which does just this - it's controlled by
 setting the XAPIAN_IO_LOG env var to a filename to store the log in
 (optionally with %p replaced with the process ID).  The output format is
 fairly easy to parse: one line for each operation, with the first
 character indicating the operation type, followed by the filedescriptor
 involved, followed by the start time (as in integer, in microseconds since
 epoch), followed by the elapsed time, followed by the filename for open,
 or the offset and length for read or write.

 It might be better to use an LD_PRELOAD hack, or some other tracing
 technique, to get these log files, but the patch is a simple way to get
 them for now.

 I've put a script into xapian-maintainer-tools/perftest/ which displays
 the generated logs graphically (it takes a while to draw for large log
 files).

-- 
Ticket URL: <http://trac.xapian.org/ticket/390>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list