Performance metrics and bug report

[email protected]
Newsgroups gmane.mail.ifile.general
Message-ID <[email protected]>
Jason has probably already run much better experiments, but I ran some
quick unscientific experiments with ifile and figured I'd share the
results.  Executive summary:

- running ifile -c -q (query only) on a large number of messages
  (1040) has a speedup factor of about 40 (that's four-zero) per-word
  over running it on a single message; even going to 32 messages, you
  get a speedup of about 10.

- running ifile -c -Q (query and update) or ifile -i (insert)
  on 32 messages you get a  speedup of about 15 over running it
  on a single message.

  BUG REPORT: Going to 1040 messages, ifile dumps core: ifile_realloc
  returns a 0 which is then used without being checked in
  ifile_lexer_simple_open_text_fp.  This actually explains why, in
  spite of training ifile on my mail spool, some stuff was never
  getting filed right; the initial training dumped core on the largest
  directories of mail before writing back the db ;-)


In my environment, ifile is run at least twice for every message, and
tends to take 1.5-2 seconds per message.  So daemonizing ifile might
get me down to .1 seconds/message or so; that would be a huge
improvement, especially when refiling mail.

Jason, the bug above aside, how clean is ifile with respect to memory
allocation/cleanup/leaks?

Jeremy



------------------------------------------------------------
Experimental setup: All were run with ifile 1.0.7 on on a 600Mhz
Alpha, with files stored remotely in NFS.  Performance on a faster
processor and a local filesystem would probably be a lot better, but
this is the harsh environment in which I actually read mail, so...

All timings are from 'time', and they're generally my eyeball-average
of between one and three runs.  Did I mention this was unscientific?


------------------------------------------------------------
------------------------------------------------------------
ifile -c -q  (query only)
------------------------------------------------------------
Experiment:
- ifile -c -q ARG  > /dev/null
  run on 1 message with (according to wc) 644 words

Realtime:
- Total: .541s
- Average per-word:  8.40e-4s

------------------------------------------------------------
Experiment:
- ifile -c -q ARGS  > /dev/null
  run on 32 messages with (according to wc) a total of 10712 words,
  (324.6  words-per-message on average)

Realtime:
- Total: .756s
- Average per-word: 7.06e-05s
- Average per-message:  2.29e-02s

------------------------------------------------------------
Experiment:
- ifile -c -q ARGS  > /dev/null
  run on 1070 messages with (according to wc) a total of 447770 words,
  (418.5  words-per-message on average)

Realtime:
- Total: 8.817s
- Average per-word:  1.97e-5
- Average per-message:  8.27e-3s

------------------------------------------------------------
------------------------------------------------------------
ifile -c -Q (query and update)
(ifile -i takes about the same running times)
------------------------------------------------------------
Experiment:
- ifile -c -Q ARG  > /dev/null
  run on 1 message with (according to wc) 644 words

Realtime:
- Total: 1.17s
- Average per-word:  1.82e-3

------------------------------------------------------------
Experiment:
- ifile -c -Q ARGS  > /dev/null
  run on 32 messages with (according to wc) a total of 10712 words,
  (324.6  words-per-message on average)

Realtime:
- Total: 1.25s
- Average per-word: 1.17e-4
- Average per-message:  3.90e-2

------------------------------------------------------------
Experiment:
- ifile -c -Q ARGS  > /dev/null
  run on 1070 messages with (according to wc) a total of 447770 words,
  (418.5  words-per-message on average)

Realtime:
- Total: highly variable -- 37.77 to 51.83s.  Average: 44.8s
- Average per-word:  1.00e-4
- Average per-message:  4.19e-2

NOTE: SEGMENTATION FAULT ENDS THIS EXPERIMENT; THESE RESULTS AREN'T
RELIABLE.

------------------------------------------------------------

End of data.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.