lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Trcek <wzzelfz...@abas.de>
Subject Re: A lucene performance test
Date Tue, 14 Aug 2012 12:58:41 GMT
Am Tue, 14 Aug 2012 06:46:22 -0400 schrieb Robert Muir:

> I think this benchmark is not really benchmarking writes at all, but
> instead the time it takes to wait for merges to complete.
> 
> don't indexwriter.close() in your benchmark like this.

Ok, but how to? As I understand the api I need at least one commit() to
make the index usable for searchers. I commit/close each index only
once so I never force any merges.

I hacked in 

   indexWriter = new IndexWriter(...)
   foreach doc {
     indexwriter.addDocument(doc)
   }
   time-beforeCommit
   indexwriter.commit()
   time-afterCommit
   indexwriter.close()
   time-after-close (the column "seconds")

and the numbers compare for big indexes. There is a difference caused
by JIT.

$ java misc.LuceneKeyValuePerformance writereverse
WRITING
                                           #entries   seconds     entries/s
beforeCommit= 131,80 afterCommit= 134,19   20000000     140,04     142819
beforeCommit=  63,63 afterCommit=  66,61   10000000      66,61     150122
beforeCommit=  30,90 afterCommit=  33,58    5000000      33,58     148903
beforeCommit=  12,04 afterCommit=  13,29    2000000      13,29     150512
beforeCommit=   5,55 afterCommit=   6,73    1000000       6,73     148522
beforeCommit=   2,57 afterCommit=   3,38     500000       3,38     147913
beforeCommit=   0,95 afterCommit=   1,39     200000       1,39     144237
beforeCommit=   0,29 afterCommit=   0,70     100000       0,70     142355
beforeCommit=   0,16 afterCommit=   0,41      50000       0,41     120735
beforeCommit=   0,06 afterCommit=   0,22      20000       0,22      90243
beforeCommit=   0,03 afterCommit=   0,17      10000       0,17      57931
beforeCommit=   0,02 afterCommit=   0,10       5000       0,10      52145
beforeCommit=   0,02 afterCommit=   0,14       2000       0,14      14052
beforeCommit=   0,01 afterCommit=   0,09       1000       0,09      10892

$ java misc.LuceneKeyValuePerformance write
WRITING
                                           #entries   seconds     entries/s
beforeCommit=   0,25 afterCommit=   0,37       1000       0,37       2673
beforeCommit=   0,14 afterCommit=   0,32       2000       0,32       6164
beforeCommit=   0,11 afterCommit=   0,29       5000       0,29      17460
beforeCommit=   0,11 afterCommit=   0,28      10000       0,28      35153
beforeCommit=   0,07 afterCommit=   0,26      20000       0,26      75671
beforeCommit=   0,18 afterCommit=   0,42      50000       0,42     120150
beforeCommit=   0,32 afterCommit=   0,74     100000       0,74     134842
beforeCommit=   1,02 afterCommit=   1,47     200000       1,48     135524
beforeCommit=   2,65 afterCommit=   3,48     500000       3,48     143663
beforeCommit=   5,72 afterCommit=   6,97    1000000       6,97     143384
beforeCommit=  12,26 afterCommit=  13,59    2000000      13,59     147127
beforeCommit=  31,20 afterCommit=  33,65    5000000      33,65     148580
beforeCommit=  63,26 afterCommit=  66,82   10000000      66,82     149656
beforeCommit= 131,31 afterCommit= 133,63   20000000     140,98     141860

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message