Size: 5863
Comment:
|
Size: 5872
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
We tested the performance of two triple stores: Virtuoso and RDF-3X. We compare them to our own triple score on a couple of benchmarks. | We tested the performance of two triple stores: Virtuoso and RDF-3X. We compare them to our own triple store on a couple of benchmarks. |
Line 11: | Line 11: |
1. [[http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VOSDownload|Runterladen]] 2. Anweisungen in README-Datei folgen. |
1. [[http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VOSDownload|Herunterladen]] 2. Anweisungen in der README-Datei folgen. |
Line 14: | Line 14: |
1. [[https://code.google.com/p/rdf3x/downloads/list|Runterladen]] | 1. [[https://code.google.com/p/rdf3x/downloads/list|Herunterladen]] |
Line 16: | Line 16: |
=== Installation von SparqlEngineDraft: === 1. [[https://code.google.com/p/rdf3x/downloads/list|Klonen]] 2. [[https://github.com/Buchhold/SparqlEngineDraft#1-build|Anweisungen]] befolgen. |
|
Line 17: | Line 20: |
Um den Datensatz in die beide Stores laden zu können, musste dieser Satz in einen für RDF-Speicherung gängigen Format umgewandelt werden. Ausgewählt wurde "*.nt"-Format. Der ursprünglicher Satz enthielt Values und Enteties. Values waren schon nt-conform, die Enteties mussten umgewandelt werden. Dafür wurden die Enteties in die eckigen Klammer gesetzt und die unzulässige Zeichen durch die entsprechende Prozent-Kodierungen oder auch von uns defenierten Ersatzzeichen ersetzt. |
Um den Datensatz in die Triple-Stores laden zu können, muss dieser Satz in ein für die RDF-Speicherung gängiges Format umgewandelt werden. Ausgewählt wurde das NT-Format. Der ursprüngliche Datensatz enthält Values und Entities. Values waren schon nt-konform, die Entities mussten umgewandelt werden. Dafür wurden die Entities in eckige Klammern gesetzt und unzulässige Zeichen durch die entsprechenden Prozent-Kodierungen oder durch von uns definierte Ersatzzeichen ersetzt (siehe Ersetzungtabelle unten). |
Line 22: | Line 25: |
|| " |||| # |||| % |||| < |||| > |||| [ |||| \ |||| ] |||| ^ |||| { |||| | |||| } |||| ` |||| space || || %22 |||| %23 |||| %25 |||| %3C |||| %3E |||| %5B |||| %5C |||| %5D |||| %5E |||| %7B |||| %7C |||| %7D |||| %60 |||| _ || |
|| % |||| < |||| > |||| \ |||| ^ |||| ` |||| space || || %25 |||| %3C |||| %3E |||| %5C |||| %5E |||| %60 |||| _ || |
Line 25: | Line 28: |
Z.B.: '' Mikel Jackson --> <Mikel_Jackson> '' | Z.B.: '' Michael Jackson --> <Michael_Jackson> '' |
Line 28: | Line 31: |
Datenladen in den Virtuoso wurde mit [[http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtBulkRDFLoader|Bulk loading process]] gemacht. Bei diesem Prozess muss der Name des RDF-Graphen als graph_iri eingegeben werden. Unter dieser Namen ist der RDF-Satz bei Virtuoso erreichbar und man benutzt graph_iri als prefix bei jeder Entety, wenn man eine Spqrql-Anfrage an den Store erstellt. | Das Importieren der Daten in den Virtuoso Store wurde mit dem [[http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtBulkRDFLoader|Bulk loading process]] durchgeführt. Bei diesem Prozess muss der Name des RDF-Graphen als graph_iri eingegeben werden. Unter diesem Namen ist der RDF-Satz bei Virtuoso erreichbar: Wenn man eine Sparql-Anfrage an den Store erstellt, muss man die graph_iri als prefix für jede Entity benutzen. |
Line 30: | Line 33: |
Z.B.: '' Mikel Jackson --> '<http://foo/Mikel_Jackson>' '' | Z.B.: '' Michael Jackson --> '<http://foo/Michael_Jackson>' '' ''*'' Für bessere Ladeperformance empfiehlt sich die Variablen ''NumberOfBuffers'' und ''MaxDirtyBuffers'' in der virtuoso.ini-Datei auf einen höheren Wert zu setzen (genaueres ist in virtuoso.ini beschrieben). Die Datei liegt unter ''<Installationsordner von virtuoso>/var/lib/virtuoso/db/virtuoso.ini'' |
Line 33: | Line 38: |
Das Datenladen in den Rdf3x-Store erfolgt durch einen Skript ''<Installationsordner von Rdf3x>/bin/rdf3xload <DB-Name> <RDF-Satz-Pfad>''. Das wars! Bei der Nfragestellung muss man keinen zusätzlichen Prefix eingeben. | Das Importieren der Daten in den Rdf3x-Store erfolgt durch ein Skript in ''<Installationsordner von Rdf3x>/bin/rdf3xload <DB-Name> <RDF-Satz-Pfad>''. Bei der Anfragegenerierung ist kein zusätzlicher Präfix erforderlich. |
Line 35: | Line 40: |
Z.B.: '' Mikel Jackson --> '<Mikel_Jackson>' '' | Z.B.: '' Michael Jackson --> '<Michael_Jackson>' '' |
Line 37: | Line 42: |
=== Data Import SparqlEngineDraft: === [[https://github.com/Buchhold/SparqlEngineDraft#2-creating-an-index|Anweisungen]] befolgen. Bei der Anfragegenerierung ist kein zusätzlicher Präfix erforderlich. |
|
Line 38: | Line 45: |
=== Ladezeiten: === || '''RDF-Store'''|||| '''Ladezeit'''|| || Virtuoso |||| 1170 min|| || Rdf3x|||| noch nicht gemessen, aber deutlich weniger als bei Virtuoso|| |
Z.B.: '' Michael Jackson --> '<Michael_Jackson>' '' |
Line 43: | Line 47: |
== Queries == === Testvorgang === Als test-Framework wurde ein Python-Skript verwendet. Dabei wurde folgendes Abschnitt immer 3-Fach für jede Kombination Query<>RDF-Store ausgeführt. |
=== Indexerstellung: === |
Line 47: | Line 49: |
''start = int(round(time.time()*1000))'' | Die Größe des Input-RDF-Sets im NT-Format beträgt 17 GB. |
Line 49: | Line 51: |
''process = subprocess.Popen('''command''', stdout=subprocess.PIPE, shell=True)'' ''out, err = process.communicate()'' ''end = int(round(time.time()*1000)) '' wo '' '''command''' = virtuosoISQL_path + "isql 127.0.0.1:1113 dba dba " + queryFile'' für Virtuoso '' '''command''' = rdf3x_path + "rdf3xquery" + dataBase + " " + queryFile'' für rdf3x === Anfragen === Für jede Anfrage wurden zwei Datein erstellt die diese Anfrage enthalten: Eine für rdf3x und eine für Virtuoso. '''Beispiel Anfrage für rdf3x:''' ''SELECT * WHERE {'' ''<The%20Format%20(Musical%20Recording)%20%231> ?b ?c'' ''}'' '''Beispiel Anfrage für Virtuoso:''' ''SPARQL SELECT * WHERE {'' ''<http://foo.org/The%20Format%20(Musical%20Recording)%20%231> ?b ?c'' ''};'' |
|| '''RDF-Store''' |||| '''Ladezeit''' |||| '''Indexgröße auf der Festplatte''' || '''Indexgröße im Arbeitspeicher (unmittelbar nach dem Serverstart)''' || || Virtuoso |||| 23 min |||| 7.9 GB |||| 5.8 GB || || Rdf3x |||| 76 min |||| 12 GB |||| ? || || !SparqlEngineDraft |||| 26 min |||| 14.2 GB |||| 3.5 GB || |
Line 85: | Line 60: |
|| '''Query \ RDF Store''' |||| '''rdf3x''' |||| '''SparqlEngineDraft''' || || '''Query 1''' |||| 0ms/0ms/0ms/0ms(1) |||| 0ms/0ms/0ms/0ms(1) || || '''Query 2''' |||| 15ms/9ms/8ms/8ms(5162) |||| 0ms/0ms/0ms/0ms(5162) || || '''Query 3''' |||| 98ms/95ms/86ms/88ms(1579) |||| 0ms/0ms/0ms/0ms(1579) || || '''Query 4''' |||| 22ms/14ms/13ms/13ms(9767) |||| 0ms/0ms/0ms/0ms(9767) || || '''Query 5''' |||| 4ms/4ms/4ms/4ms(4) |||| 0ms/0ms/0ms/0ms(4) || || '''Query 6''' |||| 63ms/65ms/65ms/61ms(0) |||| 0ms/0ms/0ms/0ms(0) || || '''Query 7''' |||| 27ms/23ms/23ms/23ms(3697) |||| 0ms/0ms/0ms/0ms(3550) || || '''Query 8''' |||| 9ms/8ms/8ms/8ms(164) |||| 0ms/0ms/0ms/0ms(164) || || '''Query 9''' |||| 0ms/0ms/0ms/0ms(128) |||| 0ms/0ms/0ms/0ms(128) || || '''Query 10''' |||| 471ms/456ms/457ms/466ms(1528) |||| 0ms/0ms/0ms/0ms(1528) || |
|| '''Query \ RDF Store''' |||| '''rdf3x''' |||| '''SparqlEngineDraft''' |||| '''Virtuoso''' || || '''Query 1''' |||| 0.730ms(1) |||| 36.819ms(1) |||| 2433.000ms(1) || || '''Query 2''' |||| 16.472ms(5162) |||| 4.587ms(5162) |||| 121.000ms(5164) || || '''Query 3''' |||| 98.460ms(1579) |||| 57.766ms(1579) |||| 530.000ms(1579) || || '''Query 4''' |||| 24.536ms(9767) |||| 6.898ms(9767) |||| 38.000ms(9767) || || '''Query 5''' |||| 5.164ms(4) |||| 109.617ms(4) |||| 1229.000ms(4) || || '''Query 6''' |||| 75.784ms(0) |||| 41.713ms(0) |||| 138.000ms(0) || || '''Query 7''' |||| 31.728ms(3697) |||| 17.634ms(3697) |||| 101.000ms(3697) || || '''Query 8''' |||| 9.443ms(164) |||| 19.144ms(164) |||| 163.000ms(164) || || '''Query 9''' |||| 0.513ms(128) |||| 2.586ms(128) |||| 883.000ms(128) || || '''Query 10''' |||| 466.715ms(1528) |||| 208.694ms(1528) |||| 801.000ms(1528) || |
Line 97: | Line 72: |
''' Queries ''' | === Queries === |
Line 99: | Line 74: |
''' Query 1 ''' | '''Query 1''' |
Line 101: | Line 76: |
'' SELECT ?x WHERE { '' '' ?x <is-a> <Book> . '' '' ?x <Author> <Anthony_Newman_(Author)> '' '' } '' |
{{{ SELECT ?x WHERE { ?x <is-a> <Book> . ?x <Author> <Anthony_Newman_(Author)> } }}} |
Line 106: | Line 83: |
''' Query 2 ''' | '''Query 2''' |
Line 108: | Line 85: |
'' SELECT ?x WHERE { '' '' ?x <Genre> <Comedy> . ?x <is-a> <Award-Nominated_Work> . ?x <is-a> <Film> . '' '' } '' |
{{{ SELECT ?x WHERE { ?x <Genre> <Comedy> . ?x <is-a> <Award-Nominated_Work> . ?x <is-a> <Film> . } }}} |
Line 112: | Line 93: |
''' Query 3 ''' | '''Query 3''' |
Line 114: | Line 95: |
'' SELECT ?x WHERE { '' '' ?x <is-a> <Politician> . ?x <Film_performance> ?y . ?y <Genre> <Comedy> . '' '' } '' |
{{{ SELECT ?x WHERE { ?x <is-a> <Politician> . ?x <Film_performance> ?y . ?y <Genre> <Comedy> . } }}} |
Line 118: | Line 103: |
''' Query 4 ''' | '''Query 4''' |
Line 120: | Line 105: |
'' SELECT ?x WHERE { '' '' ?x <is-a> <Olympic_athlete> . ?x <is-a> <Deceased_Person> '' '' } '' |
{{{ SELECT ?x WHERE { ?x <is-a> <Olympic_athlete> . ?x <is-a> <Deceased_Person> } }}} |
Line 124: | Line 112: |
''' Query 5 ''' | '''Query 5''' |
Line 126: | Line 114: |
'' SELECT ?x WHERE { '' '' ?x <Release> <Technodrome,_Volume_2_(Consumer_product)> . '' '' ?x <is-a> <Canonical_Version> . '' '' ?x <is-a> <Musical_Recording> . '' '' } '' |
{{{ SELECT ?x WHERE { ?x <Release> <Technodrome,_Volume_2_(Consumer_product)> . ?x <is-a> <Canonical_Version> . ?x <is-a> <Musical_Recording> . } }}} |
Line 132: | Line 122: |
''' Query 6 ''' | '''Query 6''' |
Line 134: | Line 124: |
'' SELECT ?x ?y WHERE { '' '' ?x <is-a> <Person> . ?x <Country_of_nationality> <Germany> . ?x <Author> ?y . ?y <is-a> <Award-Nominated_Work> '' '' } '' |
{{{ SELECT ?x ?y WHERE { ?x <is-a> <Person> . ?x <Country_of_nationality> <Germany> . ?x <Author> ?y . ?y <is-a> <Award-Nominated_Work> } }}} |
Line 138: | Line 133: |
''' Query 7 ''' | '''Query 7''' |
Line 140: | Line 135: |
'' SELECT ?x WHERE { '' '' ?x <is-a> <Politician> . ?x <Parent> ?y . ?x <Parent> ?z . ?y <is-a> <Politician> . ?z <is-a> <Politician> . '' '' } '' |
{{{ SELECT ?x WHERE { ?x <is-a> <Politician> . ?x <Parent> ?y . ?x <Parent> ?z . ?y <is-a> <Politician> . ?z <is-a> <Politician> } }}} |
Line 144: | Line 145: |
''' Query 8 ''' | '''Query 8''' |
Line 146: | Line 147: |
'' SELECT ?x ?y WHERE{ ?x <is-a> <Monarch> . ?x <is-a> <Deceased_Person> .?x <Cause_of_death> <Assassination> . ?x <Place_of_birth> ?y } '' | {{{ SELECT ?x ?y WHERE{ ?x <is-a> <Monarch> . ?x <is-a> <Deceased_Person> . ?x <Cause_of_death> <Assassination> . ?x <Place_of_birth> ?y } }}} |
Line 148: | Line 156: |
''' Query 9 ''' | '''Query 9''' |
Line 150: | Line 158: |
'' SELECT ?x WHERE{ ?x <is-a> <Lake> . ?x <Contained_by> <Russia> } '' | {{{ SELECT ?x WHERE{ ?x <is-a> <Lake> . ?x <Contained_by> <Russia> } }}} |
Line 152: | Line 165: |
''' Query 10 ''' | '''Query 10''' |
Line 154: | Line 167: |
'' SELECT ?x ?y ?z WHERE{ ?x <is-a> <Musical_Recording> . ?x <Recorded_by> ?y . ?y <Award_Won> <Bollywood_Movie_Humanitarian_Award> . ?y <Celebrity_friend> ?z . ?z <Profession> <Prophet> } '' | {{{ SELECT ?x ?y ?z WHERE{ ?x <is-a> <Musical_Recording> . ?x <Recorded_by> ?y . ?y <Award_Won> <Bollywood_Movie_Humanitarian_Award> . ?y <Celebrity_friend> ?z . ?z <Profession> <Prophet> } }}} |
Triple Stores
We tested the performance of two triple stores: Virtuoso and RDF-3X. We compare them to our own triple store on a couple of benchmarks.
Software Installation
Installation von Virtuoso Open-Source Edition:
- Anweisungen in der README-Datei folgen.
Installation von rdf3x:
- Kompilieren
Installation von SparqlEngineDraft:
Anweisungen befolgen.
Data Import
Um den Datensatz in die Triple-Stores laden zu können, muss dieser Satz in ein für die RDF-Speicherung gängiges Format umgewandelt werden. Ausgewählt wurde das NT-Format. Der ursprüngliche Datensatz enthält Values und Entities. Values waren schon nt-konform, die Entities mussten umgewandelt werden. Dafür wurden die Entities in eckige Klammern gesetzt und unzulässige Zeichen durch die entsprechenden Prozent-Kodierungen oder durch von uns definierte Ersatzzeichen ersetzt (siehe Ersetzungtabelle unten).
Ersetzungstabelle:
% |
< |
> |
\ |
^ |
` |
space |
||||||
%25 |
%3C |
%3E |
%5C |
%5E |
%60 |
_ |
Z.B.: Michael Jackson --> <Michael_Jackson>
Data Import Virtuoso:
Das Importieren der Daten in den Virtuoso Store wurde mit dem Bulk loading process durchgeführt. Bei diesem Prozess muss der Name des RDF-Graphen als graph_iri eingegeben werden. Unter diesem Namen ist der RDF-Satz bei Virtuoso erreichbar: Wenn man eine Sparql-Anfrage an den Store erstellt, muss man die graph_iri als prefix für jede Entity benutzen.
Z.B.: Michael Jackson --> '<http://foo/Michael_Jackson>'
* Für bessere Ladeperformance empfiehlt sich die Variablen NumberOfBuffers und MaxDirtyBuffers in der virtuoso.ini-Datei auf einen höheren Wert zu setzen (genaueres ist in virtuoso.ini beschrieben). Die Datei liegt unter <Installationsordner von virtuoso>/var/lib/virtuoso/db/virtuoso.ini
Data Import Rdf3x:
Das Importieren der Daten in den Rdf3x-Store erfolgt durch ein Skript in <Installationsordner von Rdf3x>/bin/rdf3xload <DB-Name> <RDF-Satz-Pfad>. Bei der Anfragegenerierung ist kein zusätzlicher Präfix erforderlich.
Z.B.: Michael Jackson --> '<Michael_Jackson>'
Data Import SparqlEngineDraft:
Anweisungen befolgen. Bei der Anfragegenerierung ist kein zusätzlicher Präfix erforderlich.
Z.B.: Michael Jackson --> '<Michael_Jackson>'
Indexerstellung:
Die Größe des Input-RDF-Sets im NT-Format beträgt 17 GB.
RDF-Store |
Ladezeit |
Indexgröße auf der Festplatte |
Indexgröße im Arbeitspeicher (unmittelbar nach dem Serverstart) |
|||
Virtuoso |
23 min |
7.9 GB |
5.8 GB |
|||
Rdf3x |
76 min |
12 GB |
? |
|||
SparqlEngineDraft |
26 min |
14.2 GB |
3.5 GB |
Tests
Zeilenformat: <time> (number of lines in result)
Query \ RDF Store |
rdf3x |
Virtuoso |
||||
Query 1 |
0.730ms(1) |
36.819ms(1) |
2433.000ms(1) |
|||
Query 2 |
16.472ms(5162) |
4.587ms(5162) |
121.000ms(5164) |
|||
Query 3 |
98.460ms(1579) |
57.766ms(1579) |
530.000ms(1579) |
|||
Query 4 |
24.536ms(9767) |
6.898ms(9767) |
38.000ms(9767) |
|||
Query 5 |
5.164ms(4) |
109.617ms(4) |
1229.000ms(4) |
|||
Query 6 |
75.784ms(0) |
41.713ms(0) |
138.000ms(0) |
|||
Query 7 |
31.728ms(3697) |
17.634ms(3697) |
101.000ms(3697) |
|||
Query 8 |
9.443ms(164) |
19.144ms(164) |
163.000ms(164) |
|||
Query 9 |
0.513ms(128) |
2.586ms(128) |
883.000ms(128) |
|||
Query 10 |
466.715ms(1528) |
208.694ms(1528) |
801.000ms(1528) |
Queries
Query 1
SELECT ?x WHERE { ?x <is-a> <Book> . ?x <Author> <Anthony_Newman_(Author)> }
Query 2
SELECT ?x WHERE { ?x <Genre> <Comedy> . ?x <is-a> <Award-Nominated_Work> . ?x <is-a> <Film> . }
Query 3
SELECT ?x WHERE { ?x <is-a> <Politician> . ?x <Film_performance> ?y . ?y <Genre> <Comedy> . }
Query 4
SELECT ?x WHERE { ?x <is-a> <Olympic_athlete> . ?x <is-a> <Deceased_Person> }
Query 5
SELECT ?x WHERE { ?x <Release> <Technodrome,_Volume_2_(Consumer_product)> . ?x <is-a> <Canonical_Version> . ?x <is-a> <Musical_Recording> . }
Query 6
SELECT ?x ?y WHERE { ?x <is-a> <Person> . ?x <Country_of_nationality> <Germany> . ?x <Author> ?y . ?y <is-a> <Award-Nominated_Work> }
Query 7
SELECT ?x WHERE { ?x <is-a> <Politician> . ?x <Parent> ?y . ?x <Parent> ?z . ?y <is-a> <Politician> . ?z <is-a> <Politician> }
Query 8
SELECT ?x ?y WHERE{ ?x <is-a> <Monarch> . ?x <is-a> <Deceased_Person> . ?x <Cause_of_death> <Assassination> . ?x <Place_of_birth> ?y }
Query 9
SELECT ?x WHERE{ ?x <is-a> <Lake> . ?x <Contained_by> <Russia> }
Query 10
SELECT ?x ?y ?z WHERE{ ?x <is-a> <Musical_Recording> . ?x <Recorded_by> ?y . ?y <Award_Won> <Bollywood_Movie_Humanitarian_Award> . ?y <Celebrity_friend> ?z . ?z <Profession> <Prophet> }