Hi Hugh, thanks for quick answer :), please see below for reply
Best Regards!
--
Marcelo Aliquintuy
87433162
El miércoles 19 de diciembre de 2012 a las 16:45, Hugh Williams escribió:
> Hi Marcelo,
>
> What is the version of version being used, need the exact version by running
> the commmand “virtuoso-t -?” from command line ?
Virtuoso Open Source Edition (multi threaded)
Version 6.1.4.3127-pthreads as of Nov 18 2011
Compiled for Darwin (i386-apple-darwin10.8.0)
Copyright (C) 1998-2011 OpenLink Software
>
> I presume you have tuned your Virtuoso instance for the hardware it is
> running on as detailed at:
>
> http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtRDFPerformanceTuning
I dont tunning anything :(
>
> Please also provide:
>
> 1. The output of running the “status(‘’);” command from isql so we can see
> the status of the server before and while the query is being run.
Connected to OpenLink Virtuoso
Driver: 06.01.3127 OpenLink Virtuoso ODBC Driver
OpenLink Interactive SQL (Virtuoso), version 0.9849b.
Type HELP; for help and EXIT; to exit.
SQL> status('');
^C
arsenal:~ maliq$ /Applications/dev/virtuoso-opensource-6.1.4/bin/isql 1111
Nothing return, and when kill them, after that isql doesn't connect
>
> 2. The output of running the “top” command to see the memory usage and CPU
> consumption of the server
processes: 93 total, 3 running, 90 sleeping, 401 threads
10:18:08
Load Avg: 1.21, 0.76, 0.46 CPU usage: 55.86% user, 4.22% sys, 39.90% idle
SharedLibs: 4220K resident, 11M data, 0B linkedit.
MemRegions: 12762 total, 1298M resident, 47M private, 367M shared. PhysMem:
910M wired, 1559M active, 321M inactive, 2789M used, 5402M free.
VM: 195G vsize, 1043M framework vsize, 88046(0) pageins, 0(0) pageouts.
Networks: packets: 30162/32M in, 21328/2374K out.
Disks: 63051/1250M read, 50606/527M written.
PID COMMAND %CPU TIME #TH #WQ #POR #MRE RPRVT RSHRD RSIZE
VPRVT VSIZE PGRP PPID STATE UID FAULTS COW MSGSENT MSGRECV SYSBSD
572 virtuoso-t 91.4 01:53.19 26/1 0 106 207 206M 244K 215M 239M
2616M 572 1 running 501 55193 55 200 89 1595601
>
> 3. The compiler query execution plan using the Virtuoso explain() function as
> detailed at:
>
> http://docs.openlinksw.com/virtuoso/fn_explain.html
SQL> explain('SPARQL PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX lom: <http://www.cc.uah.es/ie/ont/lom2owl#> PREFIX cc:
<http://www.toeska.cl/ns/contentcompass/ontology/v1.0#> select ?s, max(?sc) AS
?rank, ?type, (bif:search_excerpt(bif:vector("nino"),?o)) as ?c2, ?label,
?cfUrl, ?cfFormat FROM <urn:contentcompass:graph:lo> where {?s ?p ?o . ?s
rdf:type ?type . ?o bif:contains "nino" OPTION (score ?sc) . optional {?s
lom:hasTitle ?label . ?s cc:describes ?cf . ?cf lom:isLocated ?cfUrl . ?cf
lom:hasFormat ?cfFormat} . filter (?type in
(<http://www.toeska.cl/ns/contentcompass/ontology/v1.0#Content_Object>))} GROUP
BY ?s ?type ?cfUrl ?o ?label ?cfFormat ORDER BY DESC (?rank) limit 7 offset 0');
REPORT
VARCHAR
_______________________________________________________________________________
{
Precode:
0: $20 "__bft" := Call __bft (<c
http://www.toeska.cl/ns/contentcompass/ontology/v1.0#Content_Object>, 1 )
5: $21 "vector" := Call vector (<c nino>)
10: BReturn 0
Subquery 22
{
Fork 95
{
Fork 83
{
CONTAINS (<c ^'gf7a40' AND ([ __enc "UTF-8" ] nino)>) node on
DB.DBA.RDF_OBJ_RO_FLAGS_WORDS 0 rows
$33 "t7.O"
from DB.DBA.RDF_QUAD by RDF_QUAD_OP 15 rows
Key RDF_QUAD_OP ASC ($38 "t7.P")
inlined <col=555 O = $33 "t7.O">
from DB.DBA.RDF_QUAD by RDF_QUAD_POGS 0.74 rows
Key RDF_QUAD_POGS ASC ($42 "t7.S")
inlined <col=554 P = $38 "t7.P"> , <col=555 O = $33 "t7.O"> , <col=552 G =
#urn:contentcompass:graph:lo >
Precode:
0: $45 "__id2i" := Call __id2i ($42 "t7.S")
5: BReturn 0
from DB.DBA.RDF_QUAD by RDF_QUAD Unique
Key RDF_QUAD ASC ()
inlined <col=554 P = #type > , <col=553 S = $42 "t7.S"> , <col=555 O =
#Content_Object > , <col=552 G = #urn:contentcompass:graph:lo >
Subquery 49 OUTER
{
from DB.DBA.RDF_QUAD by RDF_QUAD 0.41 rows
Key RDF_QUAD ASC ($56 "t10.S", $55 "t10.O")
inlined <col=554 P = #hasTitle > , <col=553 S = $42 "t7.S">
row specs: <col=552 G = #urn:contentcompass:graph:lo >
from DB.DBA.RDF_QUAD by RDF_QUAD 0.41 rows
Key RDF_QUAD ASC ($60 "t11.O")
inlined <col=554 P = #describes > , <col=553 S = $56 "t10.S">
row specs: <col=555 O LIKE <c T?>> , <col=552 G = #urn:contentcompass:graph:lo
>
from DB.DBA.RDF_QUAD by RDF_QUAD 0.41 rows
Key RDF_QUAD ASC ($65 "t13.S", $64 "t13.O")
inlined <col=554 P = #hasFormat > , <col=553 S = $60 "t11.O">
row specs: <col=552 G = #urn:contentcompass:graph:lo >
from DB.DBA.RDF_QUAD by RDF_QUAD 0.4 rows
Key RDF_QUAD ASC ($69 "t12.O")
inlined <col=554 P = #isLocated > , <col=553 S = $60 "t11.O">
row specs: <col=552 G = #urn:contentcompass:graph:lo >
Local Code
0: $50 "s" := := artm $56 "t10.S"
4: $51 "label" := := artm $55 "t10.O"
8: $52 "cfUrl" := := artm $69 "t12.O"
12: $53 "cfFormat" := := artm $64 "t13.O"
16: BReturn 0
Subquery Select($50 "s", $51 "label", $52 "cfUrl", $53 "cfFormat", <$71
"<DB.DBA.RDF_QUAD t12>" spec 5>, <$67 "<DB.DBA.RDF_QUAD t13>" spec 5>, <$62
"<DB.DBA.RDF_QUAD t11>" spec 5>, <$58 "<DB.DBA.RDF_QUAD t10>" spec 5>)
}
Precode:
0: $78 "__ro2sq" := Call __ro2sq ($33 "t7.O")
5: $79 "search_excerpt" := Call search_excerpt ($21 "vector", $78
"__ro2sq")
10: $80 "__ro2sq" := Call __ro2sq ($51 "label")
15: $81 "__ro2sq" := Call __ro2sq ($52 "cfUrl")
20: $82 "__ro2sq" := Call __ro2sq ($53 "cfFormat")
25: BReturn 0
Sort (HASH) ($42 "t7.S", 0 , $52 "cfUrl", $33 "t7.O", $51 "label", $53
"cfFormat") -> ($31 "sc", $82 "__ro2sq", $81 "__ro2sq", $80 "__ro2sq", $79
"search_excerpt", $45 "__id2i") up to 2.6e+21 distinct
}
Key from temp ($42 "t7.S", $85 "-", $52 "cfUrl", $33 "t7.O", $51 "label", $53
"cfFormat", $86 "aggregate", $82 "__ro2sq", $81 "__ro2sq", $80 "__ro2sq", $79
"search_excerpt", $45 "__id2i")
Local setp:
Sort (HASH) (TOP 7 ) ($86 "aggregate") -> ($45 "__id2i", $20 "__bft", $79
"search_excerpt", $80 "__ro2sq", $81 "__ro2sq", $82 "__ro2sq")
}
top order by node
After code:
0: $23 "s" := := artm $45 "__id2i"
4: $24 "rank" := := artm $86 "aggregate"
8: $25 "type" := := artm $20 "__bft"
12: $26 "c2" := := artm $79 "search_excerpt"
16: $27 "label" := := artm $80 "__ro2sq"
20: $28 "cfUrl" := := artm $81 "__ro2sq"
24: $29 "cfFormat" := := artm $82 "__ro2sq"
28: BReturn 0
Subquery Select($23 "s", $24 "rank", $25 "type", $26 "c2", $27 "label", $28
"cfUrl", $29 "cfFormat", <$47 "<DB.DBA.RDF_QUAD t8>" spec 4>, <$44
"<DB.DBA.RDF_QUAD t7>" spec 5>, <$40 "<DB.DBA.RDF_QUAD t7>" spec 5>)
}
After code:
0: $115 "s" := Call __ro2sq ($23 "s")
5: $116 "rank" := Call __ro2sq ($24 "rank")
10: $117 "type" := Call __ro2sq ($25 "type")
15: $118 "c2" := Call __ro2sq ($26 "c2")
20: $119 "label" := Call __ro2sq ($27 "label")
25: $120 "cfUrl" := Call __ro2sq ($28 "cfUrl")
30: $121 "cfFormat" := Call __ro2sq ($29 "cfFormat")
35: BReturn 0
Select ($115 "s", $116 "rank", $117 "type", $118 "c2", $119 "label", $120
"cfUrl", $121 "cfFormat")
}
105 Rows. -- 47 msec.
>
> 4. The sparql_to_sql_text() output for the query so we can see what SQL it is
> being transformed to as detailed at:
>
> http://docs.openlinksw.com/virtuoso/fn_sparql_to_sql_text.html
SQL> select sparql_to_sql_text('PREFIX rdf:
<http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX lom:
<http://www.cc.uah.es/ie/ont/lom2owl#> PREFIX cc:
<http://www.toeska.cl/ns/contentcompass/ontology/v1.0#> select ?s, max(?sc) AS
?rank, ?type, (bif:search_excerpt(bif:vector("nino"),?o)) as ?c2, ?label,
?cfUrl, ?cfFormat FROM <urn:contentcompass:graph:lo> where {?s ?p ?o . ?s
rdf:type ?type . ?o bif:contains "nino" OPTION (score ?sc) . optional {?s
lom:hasTitle ?label . ?s cc:describes ?cf . ?cf lom:isLocated ?cfUrl . ?cf
lom:hasFormat ?cfFormat} . filter (?type in
(<http://www.toeska.cl/ns/contentcompass/ontology/v1.0#Content_Object>))} GROUP
BY ?s ?type ?cfUrl ?o ?label ?cfFormat ORDER BY DESC (?rank) limit 7 offset 0');
sparql_to_sql_text
VARCHAR
_______________________________________________________________________________
SELECT __ro2sq ("s-1-0_rbc"."s") AS "s", __ro2sq ("s-1-0_rbc"."rank") AS
"rank", __ro2sq ("s-1-0_rbc"."type") AS "type", __ro2sq ("s-1-0_rbc"."c2") AS
"c2", __ro2sq ("s-1-0_rbc"."label") AS "label", __ro2sq ("s-1-0_rbc"."cfUrl")
AS "cfUrl", __ro2sq ("s-1-0_rbc"."cfFormat") AS "cfFormat" FROM (SELECT TOP 7
__id2i ( "s-1-9"."s" ) AS "s",
MAX (
"s-1-9"."sc" ) AS "rank",
__bft(
'http://www.toeska.cl/ns/contentcompass/ontology/v1.0#Content_Object' , 1) AS
"type",
search_excerpt (
vector (
'nino' ),
__ro2sq ( "s-1-9"."o" )) AS "c2",
__ro2sq ( "s-1-4"."label" ) AS "label",
__ro2sq ( "s-1-4"."cfUrl" ) AS "cfUrl",
__ro2sq ( "s-1-4"."cfFormat" ) AS "cfFormat"
FROM (
SELECT "s-1-1-t0"."71af6d9~S" AS "s",
"s-1-1-t0"."ddcb702~O" AS "o",
"s-1-1-t0"."sc" AS "sc",
__bft(
'http://www.toeska.cl/ns/contentcompass/ontology/v1.0#Content_Object' , 1) AS
"type"
FROM (SELECT "s-1-1-t0-int"."G" AS "aa67003~G", "s-1-1-t0-int"."S" AS
"71af6d9~S", "s-1-1-t0-int"."P" AS "ac27003~P", "s-1-1-t0-int"."O" AS
"ddcb702~O", "sc" FROM DB.DBA.RDF_QUAD AS "s-1-1-t0-int"
WHERE contains("s-1-1-t0-int"."O", '^\'gf7a40\' AND ([ __enc
"UTF-8" ] nino)' , SCORE, "sc")
AND "s-1-1-t0-int"."G" = __i2idn ( __bft(
'urn:contentcompass:graph:lo' , 1))) AS "s-1-1-t0"
INNER JOIN DB.DBA.RDF_QUAD AS "s-1-1-t1"
ON ( "s-1-1-t0"."71af6d9~S" = "s-1-1-t1"."S" )
WHERE "s-1-1-t1"."G" = __i2idn ( __bft( 'urn:contentcompass:graph:lo' ,
1))
AND "s-1-1-t1"."P" = __i2idn ( __bft(
'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' , 1))
AND "s-1-1-t1"."O" = __i2idn ( __bft(
'http://www.toeska.cl/ns/contentcompass/ontology/v1.0#Content_Object' , 1))) AS
"s-1-9"
LEFT OUTER JOIN (
SELECT "s-1-4-t2"."S" AS "s",
"s-1-4-t2"."O" AS "label",
"s-1-4-t4"."O" AS "cfUrl",
"s-1-4-t5"."O" AS "cfFormat"
FROM DB.DBA.RDF_QUAD AS "s-1-4-t2"
INNER JOIN DB.DBA.RDF_QUAD AS "s-1-4-t3"
ON ( "s-1-4-t2"."S" = "s-1-4-t3"."S" )
INNER JOIN DB.DBA.RDF_QUAD AS "s-1-4-t4"
ON ( "s-1-4-t3"."O" = "s-1-4-t4"."S" )
INNER JOIN DB.DBA.RDF_QUAD AS "s-1-4-t5"
ON ( "s-1-4-t3"."O" = "s-1-4-t5"."S"
AND "s-1-4-t4"."S" = "s-1-4-t5"."S" )
WHERE "s-1-4-t2"."G" = __i2idn ( __bft( 'urn:contentcompass:graph:lo' ,
1))
AND "s-1-4-t2"."P" = __i2idn ( __bft(
'http://www.cc.uah.es/ie/ont/lom2owl#hasTitle' , 1))
AND "s-1-4-t3"."G" = __i2idn ( __bft( 'urn:contentcompass:graph:lo' ,
1))
AND "s-1-4-t3"."P" = __i2idn ( __bft(
'http://www.toeska.cl/ns/contentcompass/ontology/v1.0#describes' , 1))
AND isiri_id ( "s-1-4-t3"."O")
AND "s-1-4-t4"."G" = __i2idn ( __bft( 'urn:contentcompass:graph:lo' ,
1))
AND "s-1-4-t4"."P" = __i2idn ( __bft(
'http://www.cc.uah.es/ie/ont/lom2owl#isLocated' , 1))
AND "s-1-4-t5"."G" = __i2idn ( __bft( 'urn:contentcompass:graph:lo' ,
1))
AND "s-1-4-t5"."P" = __i2idn ( __bft(
'http://www.cc.uah.es/ie/ont/lom2owl#hasFormat' , 1))) AS "s-1-4"
ON ( "s-1-9"."s" = "s-1-4"."s" )
GROUP BY "s-1-9"."s" , 0.0 /* fake, instead of grouping by other const */,
"s-1-4"."cfUrl" , "s-1-9"."o" , "s-1-4"."label" , "s-1-4"."cfFormat"
ORDER BY 2 DESC
OPTION (QUIETCAST)) AS "s-1-0_rbc"
>
> Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software, Inc. // http://www.openlinksw.com/
> Weblog -- http://www.openlinksw.com/blogs/
> LinkedIn -- http://www.linkedin.com/company/openlink-software/
> Twitter -- http://twitter.com/OpenLink
> Google+ -- http://plus.google.com/100570109519069333827/
> Facebook -- http://www.facebook.com/OpenLinkSoftware
> Universal Data Access, Integration, and Management Technology Providers
>
>
>
>
>
>
>
> On 19 Dec 2012, at 18:32, Marcelo Aliquintuy wrote:
> > Hi.
> > I got 100% cpu with virtuoso with query that have bif:search_excerpt,
> > bif:vector in sparql endpoint or isql command line
> > the query is:
> >
> > PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> > PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> > PREFIX lom: <http://www.cc.uah.es/ie/ont/lom2owl#>
> > PREFIX cc: <http://www.toeska.cl/ns/contentcompass/ontology/v1.0#>
> > select ?s, max(?sc) AS ?rank, ?type,
> > (bif:search_excerpt(bif:vector('"niño"'),?o)) as ?c2, ?label, ?cfUrl,
> > ?cfFormat FROM <urn:contentcompass:graph:lo>
> > where {?s ?p ?o . ?s rdf:type ?type .
> > ?o bif:contains '"niño"' OPTION (score ?sc) .
> > optional {?s lom:hasTitle ?label .
> > ?s cc:describes ?cf .
> > ?cf lom:isLocated ?cfUrl .
> > ?cf lom:hasFormat ?cfFormat} .
> > filter (?type in
> > (<http://www.toeska.cl/ns/contentcompass/ontology/v1.0#Content_Object>))
> > }
> > GROUP BY ?s ?type ?cfUrl ?o ?label ?cfFormat
> > ORDER BY DESC (?rank)
> > limit 7 offset 0
> >
> > if i remove "(bif:search_excerpt(bif:vector('"niño"'),?o))" part the query
> > works fine but with them takes 100% CPU :o.
> > return without "(bif:search_excerpt(bif:vector('"niño"'),?o))":
> >
> > s rank type label cfUrl cfFormat
> > urn:co:f3b0574b-7ff6-aeee-1bce-3ecde6569685 30
> > http://www.toeska.cl/ns/contentcompass/ontology/v1.0#Content_Object
> > "Defensa de los derechos del niño : antecedentes históricos desde la
> > perspectiva de Chile"@es
> > "http://www.memoriachilena.cl/archivos2/pdfs/MC0030467.pdf"^^<http://www.w3.org/2001/XMLSchema#string>
> > "text/pdf"^^<http://www.w3.org/2001/XMLSchema#string>
> > urn:co:f3b0574b-7ff6-aeee-1bce-3ecde6569685 24
> > http://www.toeska.cl/ns/contentcompass/ontology/v1.0#Content_Object
> > "Defensa de los derechos del niño : antecedentes históricos desde la
> > perspectiva de Chile"@es
> > "http://www.memoriachilena.cl/archivos2/pdfs/MC0030467.pdf"^^<http://www.w3.org/2001/XMLSchema#string>
> > "text/pdf"^^<http://www.w3.org/2001/XMLSchema#string>
> > urn:co:f3b0574b-7ff6-aeee-1bce-3ecde6569685 24
> > http://www.toeska.cl/ns/contentcompass/ontology/v1.0#Content_Object
> > "Defensa de los derechos del niño : antecedentes históricos desde la
> > perspectiva de Chile"@es
> > "http://www.memoriachilena.cl/archivos2/pdfs/MC0030467.pdf"^^<http://www.w3.org/2001/XMLSchema#string>
> > "text/pdf"^^<http://www.w3.org/2001/XMLSchema#string>
> > urn:co:f3b0574b-7ff6-aeee-1bce-3ecde6569685 22
> > http://www.toeska.cl/ns/contentcompass/ontology/v1.0#Content_Object
> > "Defensa de los derechos del niño : antecedentes históricos desde la
> > perspectiva de Chile"@es
> > "http://www.memoriachilena.cl/archivos2/pdfs/MC0030467.pdf"^^<http://www.w3.org/2001/XMLSchema#string>
> > "text/pdf"^^<http://www.w3.org/2001/XMLSchema#string>
> > urn:co:f3b0574b-7ff6-aeee-1bce-3ecde6569685 20
> > http://www.toeska.cl/ns/contentcompass/ontology/v1.0#Content_Object
> > "Defensa de los derechos del niño : antecedentes históricos desde la
> > perspectiva de Chile"@es
> > "http://www.memoriachilena.cl/archivos2/pdfs/MC0030467.pdf"^^<http://www.w3.org/2001/XMLSchema#string>
> > "text/pdf"^^<http://www.w3.org/2001/XMLSchema#string>
> >
> >
> >
> > When use key "nino" o "niño" takes CPU, i use XAnyNormalization option in
> > virtuoso.ini too.
> > ..
> > [I18N]
> > XAnyNormalization = 3
> > ..
> >
> > Best regards!
> >
> > --
> > Marcelo Aliquintuy
> > 87433162
> >
> >
> > ------------------------------------------------------------------------------
> > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> > Remotely access PCs and mobile devices and provide instant support
> > Improve your efficiency, and focus on delivering more value-add services
> > Discover what IT Professionals Know. Rescue delivers
> > http://p.sf.net/sfu/logmein_12329d2d_______________________________________________
> > Virtuoso-users mailing list
> > [email protected]
> > (mailto:[email protected])
> > https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>
>
> Adjuntos:
> - smime.p7s
>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Virtuoso-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/virtuoso-users