<div dir="ltr">Sounds good for me.<div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, May 26, 2013 at 12:58 AM, Vishesh Handa <span dir="ltr"><<a href="mailto:me@vhanda.in" target="_blank">me@vhanda.in</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hey guys<br><br>I have made a very important discovery - The Storage service is a big bottleneck!<br>



<br></div>Running a query such as - 'select * where { graph ?g { ?r ?p ?o. } } LIMIT 50000' by directly connecting to virtuoso via ODBC takes about 2.65 seconds. In contrast running the same query by using the Nepomuk ResourceManager's main model takes about 19.5 seconds.<br>




<br></div><div>Nepomuk internally uses the Soprano::LocalSocketClient to connect to the storage service which runs a Soprano::LocalServer.<br><br></div><div>I've been trying to optimize this Soprano code for some time now and from 4.9 we have a good 200% performance increase. But we can increase it a LOT more by just directly communicating with virtuoso.<br>




<br></div><div>Pros -<br></div><div>* 6-8x performance upgrade<br></div><div>* The storage service isn't using such high cpu when reading<br></div><div>* Accurate reporting - Suppose app 'x' does a costly query which requires a large number of results, then 'x' will have high cpu consumption. Currently both NepomukStorage and 'x' have very high cpu consumption.<br>




<br></div><div>Cons -<br></div><div>* Less Control - By having all queries go through the Nepomuk Storage we could theoretical build amazing tools to tell us which query is executing and how long it is taking. However, no such tool has ever been written - so we won't be loosing anything.<br>




<br></div><div><div><div>Before 4.10 this could never have been done because we used to have a lot of code in the storage service which handled removable media and other devices. This code would often modify the sparql queries and modify the results. With 4.10, I threw away all that code.<br>




<br></div><div>Comments?<br><br></div><div>PS: This is only for read only operations. All writes should still go through the storage service. Though maybe we want to change that as well?<span><font color="#888888"><br>
</font></span></div><span><font color="#888888"><div><br></div><div>-- <br>
<span style="color:rgb(192,192,192)">Vishesh Handa</span><br>
</div></font></span></div></div></div>
<br>_______________________________________________<br>
Nepomuk mailing list<br>
<a href="mailto:Nepomuk@kde.org" target="_blank">Nepomuk@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/nepomuk" target="_blank">https://mail.kde.org/mailman/listinfo/nepomuk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best wishes,<div>Ignacio</div><div><br></div>
</div></div>