Re: some cwm performance discussion, with numbers

> In answer to some cwm scaling/performance questions, I wrote:
> 
> <DanC> $ time python ~/w3ccvs/WWW/2000/10/swap/cwm.py --rdf cyc.daml
> --filter=subc.n3 -n3 >,cyc-sub.n3
> <DanC>  
> <DanC> real    0m43.022s
> <DanC> user    0m38.761s
> <DanC> sys     0m0.385s
> <DanC> the query just finds all subClassOf triples: { ?C1 s:subClassOf
> ?C2 } => { ?C1 s:subClassOf ?C2 }.
> 
> 
> where cyc.daml is http://opencyc.sourceforge.net/daml/cyc.daml
> $ wc cyc.daml
>   40863  203574 2436919 cyc.daml
> 
> $ wc ,cyc-sub.n3
>   3999   7243 133947 ,cyc-sub.n3
> 
> for more detail, see the log...
> http://www.ilrt.bris.ac.uk/discovery/chatlogs/rdfig/2004-01-21.html#T05-19-16

bash-2.05b$ time pl -q -g "halt"

real    0m0.009s                         <- swi startup
user    0m0.000s
sys     0m0.010s

bash-2.05b$ time pl -q -g "[bench0b], halt"

real    0m0.130s                         <- and load the benchmark
user    0m0.080s
sys     0m0.050s

bash-2.05b$ time pl -q -g "[bench0b], load, halt"

real    0m1.379s                          <- and load cyc
user    0m1.290s
sys     0m0.060s
bash-2.05b$ time pl -q -g "[bench0b], load, run, halt"

real    0m1.405s                          <- and query & write
user    0m1.340s
sys     0m0.050s
bash-2.05b$ time pl -q -g "[bench0b], load, run, run, run, run, run, run, halt"

real    0m1.474s                          <- and (query & write) 6 times
user    0m1.390s
sys     0m0.070s
bash-2.05b$ cat bench0b.pl
:- [library('semweb/rdf_db')].

load :-
   rdf_load('cyc.daml').

run :-
   tell('out.pl'),
   ( rdf(C1, rdfs:subClassOf, C2),
     writeln(rdf(C1, rdfs:subClassOf, C2)),
     fail      % loop back to get/write the other C1/C2 values
   ); true.

--------------  [get back to 1-times out.pl]
bash-2.05b$ wc cyc.daml out.pl
  40863  203574 2436919 cyc.daml
   2380    7140  337930 out.pl      <-  why a different number of triples?!
  43243  210714 2774849 total
bash-2.05b$ head out.pl
rdf(file:/home/sandro/4/01/html-rules/cyc.daml#AbandoningSomething, rdfs:subClassOf, file:/home/sandro/4/01/html-rules/cyc.daml#LosingUserRights)
rdf(file:/home/sandro/4/01/html-rules/cyc.daml#AbandoningSomething, rdfs:subClassOf, file:/home/sandro/4/01/html-rules/cyc.daml#PurposefulAction)
rdf(file:/home/sandro/4/01/html-rules/cyc.daml#Ablation, rdfs:subClassOf, file:/home/sandro/4/01/html-rules/cyc.daml#Separation-Complete)
rdf(file:/home/sandro/4/01/html-rules/cyc.daml#Ablation, rdfs:subClassOf, file:/home/sandro/4/01/html-rules/cyc.daml#RemovingSomething)
rdf(file:/home/sandro/4/01/html-rules/cyc.daml#AboveGroundLevelInAConstruction, rdfs:subClassOf, file:/home/sandro/4/01/html-rules/cyc.daml#LevelOfAConstruction)
rdf(file:/home/sandro/4/01/html-rules/cyc.daml#AbradingSomething, rdfs:subClassOf, file:/home/sandro/4/01/html-rules/cyc.daml#Ablation)
rdf(file:/home/sandro/4/01/html-rules/cyc.daml#AbstractInformationalThing, rdfs:subClassOf, file:/home/sandro/4/01/html-rules/cyc.daml#IntangibleIndividual)
rdf(file:/home/sandro/4/01/html-rules/cyc.daml#AbstractShapeType, rdfs:subClassOf, file:/home/sandro/4/01/html-rules/cyc.daml#ShapeType)
rdf(file:/home/sandro/4/01/html-rules/cyc.daml#AcademicProfessional, rdfs:subClassOf, file:/home/sandro/4/01/html-rules/cyc.daml#Professional)
rdf(file:/home/sandro/4/01/html-rules/cyc.daml#AcademicQuarter, rdfs:subClassOf, file:/home/sandro/4/01/html-rules/cyc.daml#TimeInterval)
bash-2.05b$

Received on Wednesday, 21 January 2004 06:58:59 UTC