You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Maria Jackson <ma...@gmail.com> on 2013/12/20 15:00:12 UTC

Find time taken by a particular query in Jena TDB

Is it possible to find the time that a particular query takes to
run(compilatiion + execution time) in Jena TDB.

I think it is possible add these within the code. But is there any other
way out...is there some build-in Jena TDB feature which allows me to find
the time a query takes in total (i..e plan generation + executing it).

I'll be highly grateful to you for the same.
I have a paper submission deadline tomorrow..an early response is highly
appreciated.

Re: Find time taken by a particular query in Jena TDB

Posted by Rose Beck <ro...@gmail.com>.
I am very sorry if it seems a question which is too naive...but I am just
curious?


On Fri, Dec 20, 2013 at 7:46 PM, Rose Beck <ro...@gmail.com> wrote:

> Ok. Thanks a lot Andy for the link.
>
> But now from the question ...I am bit curious to understand what is meant
> by a running system and time taken to attach a store..in Jena docs. Can you
> please clarify?
>
>
> On Fri, Dec 20, 2013 at 7:43 PM, Andy Seaborne <an...@apache.org> wrote:
>
>> On 20/12/13 14:00, Maria Jackson wrote:
>>
>>> Is it possible to find the time that a particular query takes to
>>> run(compilatiion + execution time) in Jena TDB.
>>>
>>> I think it is possible add these within the code. But is there any other
>>> way out...is there some build-in Jena TDB feature which allows me to find
>>> the time a query takes in total (i..e plan generation + executing it).
>>>
>>> I'll be highly grateful to you for the same.
>>> I have a paper submission deadline tomorrow..an early response is highly
>>> appreciated.
>>>
>>>
>> This is a repeat question:
>>
>> http://mail-archives.apache.org/mod_mbox/jena-users/201311.mbox/%
>> 3CCALZBbQs4PqmX9JXha2EDw3ywRfyFixoJmsZyCMYCFAfYdps3Pw%40mail.gmail.com%3E
>>
>
>

Re: Find time taken by a particular query in Jena TDB

Posted by Andy Seaborne <an...@apache.org>.
On 20/12/13 20:25, Rose Beck wrote:
> Also I even checked the code...i think this whole reasoning is in sync.
> Please correct me if I am wrong?
>
>
> On Sat, Dec 21, 2013 at 1:51 AM, Rose Beck <ro...@gmail.com> wrote:
>
>> Great answer..but after repeating the execution of the one would not get
>> cold cache time..right?  So, I think --time is great for getting the cold
>> cache time used by Jena..right?

Yes - it'll amortize the cache warm up and JVM warm up (JIT on the code 
speeds things up by a huge factor).

The weakness is that it is executing the exactly the same query each 
time - that may not be a very useful test or it maybe useful, depending 
on what you are testing.  In BSBM for example, it takes templates and 
inserts random values so it is not an identical query each time.

	Andy

>>
>>
>> On Sat, Dec 21, 2013 at 1:43 AM, Andy Seaborne <an...@apache.org> wrote:
>>
>>> On 20/12/13 15:18, Rose Beck wrote:
>>>
>>>   So that means (if I am not wrong) that --time gives the cold cache time.
>>>>
>>>
>>> What you can do is use --repeat=X,Y  which does X warmup repeats and then
>>> Y actual executions.  (see --help)
>>>
>>> But these are really to compare effects of changing the query or, for
>>> developers, different optimizations.
>>>
>>> It is not suitable for comparing one system with another, only changes of
>>> query etc within Jena.
>>>
>>>          Andy
>>>
>>>
>>>
>>>
>>>
>>
>


Re: Find time taken by a particular query in Jena TDB

Posted by Rose Beck <ro...@gmail.com>.
Also I even checked the code...i think this whole reasoning is in sync.
Please correct me if I am wrong?


On Sat, Dec 21, 2013 at 1:51 AM, Rose Beck <ro...@gmail.com> wrote:

> Great answer..but after repeating the execution of the one would not get
> cold cache time..right?  So, I think --time is great for getting the cold
> cache time used by Jena..right?
>
>
> On Sat, Dec 21, 2013 at 1:43 AM, Andy Seaborne <an...@apache.org> wrote:
>
>> On 20/12/13 15:18, Rose Beck wrote:
>>
>>  So that means (if I am not wrong) that --time gives the cold cache time.
>>>
>>
>> What you can do is use --repeat=X,Y  which does X warmup repeats and then
>> Y actual executions.  (see --help)
>>
>> But these are really to compare effects of changing the query or, for
>> developers, different optimizations.
>>
>> It is not suitable for comparing one system with another, only changes of
>> query etc within Jena.
>>
>>         Andy
>>
>>
>>
>>
>>
>

Re: Find time taken by a particular query in Jena TDB

Posted by Rose Beck <ro...@gmail.com>.
Great answer..but after repeating the execution of the one would not get
cold cache time..right?  So, I think --time is great for getting the cold
cache time used by Jena..right?


On Sat, Dec 21, 2013 at 1:43 AM, Andy Seaborne <an...@apache.org> wrote:

> On 20/12/13 15:18, Rose Beck wrote:
>
>  So that means (if I am not wrong) that --time gives the cold cache time.
>>
>
> What you can do is use --repeat=X,Y  which does X warmup repeats and then
> Y actual executions.  (see --help)
>
> But these are really to compare effects of changing the query or, for
> developers, different optimizations.
>
> It is not suitable for comparing one system with another, only changes of
> query etc within Jena.
>
>         Andy
>
>
>
>
>

Re: Find time taken by a particular query in Jena TDB

Posted by Andy Seaborne <an...@apache.org>.
On 20/12/13 15:18, Rose Beck wrote:

> So that means (if I am not wrong) that --time gives the cold cache time.

What you can do is use --repeat=X,Y  which does X warmup repeats and 
then Y actual executions.  (see --help)

But these are really to compare effects of changing the query or, for 
developers, different optimizations.

It is not suitable for comparing one system with another, only changes 
of query etc within Jena.

	Andy





Re: Find time taken by a particular query in Jena TDB

Posted by Rose Beck <ro...@gmail.com>.
Thanks for the awesome reply. It has really helped me clear a lot. You are
really an awesome and great individual Andy.

So that means (if I am not wrong) that --time gives the cold cache time.


On Fri, Dec 20, 2013 at 8:41 PM, Andy Seaborne <an...@apache.org> wrote:

> On 20/12/13 14:16, Rose Beck wrote:
>
>> Ok. Thanks a lot Andy for the link.
>>
>
> Mainly for Maria who has asked the question before
>
>
>
>> But now from the question ...I am bit curious to understand what is meant
>> by a running system and time taken to attach a store..in Jena docs. Can
>> you
>> please clarify?
>>
>
> The store is the database on disk.
>
> Opening it means access the disk so depending on the setup, that can be
> distorting on the figures.  TDB caches heavily (all databases do - disks
> are slow) so it takes time to settle down for meaningful timing figures.
>
> Anyone serious about benchmarks needs to use a framework e.g.
>
> http://www.slideshare.net/RobVesse/practical-sparql-benchmarking
>
> as well as be clear about what exactly they are testing.
>
> The number of academic papers that have weak benchmarks is really quite
> alarming.   Reviewers are letting through material that does little to
> contribute to the literature.  Failures include not comparing
> like-with-like (e.g memory vs disk, systems that were designed for
> something else, ...), and, my pet hate, not running at large enough scale,
> so it is running a disk database out of RAM cache.
>
> Useful figures are hard to obtain - not a last minute addition.
>
>         Andy
>
>
>
>>
>> On Fri, Dec 20, 2013 at 7:43 PM, Andy Seaborne <an...@apache.org> wrote:
>>
>>  On 20/12/13 14:00, Maria Jackson wrote:
>>>
>>>  Is it possible to find the time that a particular query takes to
>>>> run(compilatiion + execution time) in Jena TDB.
>>>>
>>>> I think it is possible add these within the code. But is there any other
>>>> way out...is there some build-in Jena TDB feature which allows me to
>>>> find
>>>> the time a query takes in total (i..e plan generation + executing it).
>>>>
>>>> I'll be highly grateful to you for the same.
>>>> I have a paper submission deadline tomorrow..an early response is highly
>>>> appreciated.
>>>>
>>>>
>>>>  This is a repeat question:
>>>
>>> http://mail-archives.apache.org/mod_mbox/jena-users/201311.mbox/%
>>> 3CCALZBbQs4PqmX9JXha2EDw3ywRfyFixoJmsZyCMYCFAfYdps3Pw%40mail.gmail.com
>>> %3E
>>>
>>>
>>
>
>
> store -=
>

Re: Find time taken by a particular query in Jena TDB

Posted by Andy Seaborne <an...@apache.org>.
On 20/12/13 14:16, Rose Beck wrote:
> Ok. Thanks a lot Andy for the link.

Mainly for Maria who has asked the question before

>
> But now from the question ...I am bit curious to understand what is meant
> by a running system and time taken to attach a store..in Jena docs. Can you
> please clarify?

The store is the database on disk.

Opening it means access the disk so depending on the setup, that can be 
distorting on the figures.  TDB caches heavily (all databases do - disks 
are slow) so it takes time to settle down for meaningful timing figures.

Anyone serious about benchmarks needs to use a framework e.g.

http://www.slideshare.net/RobVesse/practical-sparql-benchmarking

as well as be clear about what exactly they are testing.

The number of academic papers that have weak benchmarks is really quite 
alarming.   Reviewers are letting through material that does little to 
contribute to the literature.  Failures include not comparing 
like-with-like (e.g memory vs disk, systems that were designed for 
something else, ...), and, my pet hate, not running at large enough 
scale, so it is running a disk database out of RAM cache.

Useful figures are hard to obtain - not a last minute addition.

	Andy

>
>
> On Fri, Dec 20, 2013 at 7:43 PM, Andy Seaborne <an...@apache.org> wrote:
>
>> On 20/12/13 14:00, Maria Jackson wrote:
>>
>>> Is it possible to find the time that a particular query takes to
>>> run(compilatiion + execution time) in Jena TDB.
>>>
>>> I think it is possible add these within the code. But is there any other
>>> way out...is there some build-in Jena TDB feature which allows me to find
>>> the time a query takes in total (i..e plan generation + executing it).
>>>
>>> I'll be highly grateful to you for the same.
>>> I have a paper submission deadline tomorrow..an early response is highly
>>> appreciated.
>>>
>>>
>> This is a repeat question:
>>
>> http://mail-archives.apache.org/mod_mbox/jena-users/201311.mbox/%
>> 3CCALZBbQs4PqmX9JXha2EDw3ywRfyFixoJmsZyCMYCFAfYdps3Pw%40mail.gmail.com%3E
>>
>



store -=

Re: Find time taken by a particular query in Jena TDB

Posted by Rose Beck <ro...@gmail.com>.
Ok. Thanks a lot Andy for the link.

But now from the question ...I am bit curious to understand what is meant
by a running system and time taken to attach a store..in Jena docs. Can you
please clarify?


On Fri, Dec 20, 2013 at 7:43 PM, Andy Seaborne <an...@apache.org> wrote:

> On 20/12/13 14:00, Maria Jackson wrote:
>
>> Is it possible to find the time that a particular query takes to
>> run(compilatiion + execution time) in Jena TDB.
>>
>> I think it is possible add these within the code. But is there any other
>> way out...is there some build-in Jena TDB feature which allows me to find
>> the time a query takes in total (i..e plan generation + executing it).
>>
>> I'll be highly grateful to you for the same.
>> I have a paper submission deadline tomorrow..an early response is highly
>> appreciated.
>>
>>
> This is a repeat question:
>
> http://mail-archives.apache.org/mod_mbox/jena-users/201311.mbox/%
> 3CCALZBbQs4PqmX9JXha2EDw3ywRfyFixoJmsZyCMYCFAfYdps3Pw%40mail.gmail.com%3E
>

Re: Find time taken by a particular query in Jena TDB

Posted by Andy Seaborne <an...@apache.org>.
On 20/12/13 14:00, Maria Jackson wrote:
> Is it possible to find the time that a particular query takes to
> run(compilatiion + execution time) in Jena TDB.
>
> I think it is possible add these within the code. But is there any other
> way out...is there some build-in Jena TDB feature which allows me to find
> the time a query takes in total (i..e plan generation + executing it).
>
> I'll be highly grateful to you for the same.
> I have a paper submission deadline tomorrow..an early response is highly
> appreciated.
>

This is a repeat question:

http://mail-archives.apache.org/mod_mbox/jena-users/201311.mbox/%3CCALZBbQs4PqmX9JXha2EDw3ywRfyFixoJmsZyCMYCFAfYdps3Pw%40mail.gmail.com%3E

Re: Find time taken by a particular query in Jena TDB

Posted by Maria Jackson <ma...@gmail.com>.
Yes I am running my program on a single server. But I am unable to
understand what is the overhead that is associated with "--time".


On Fri, Dec 20, 2013 at 7:36 PM, Rose Beck <ro...@gmail.com> wrote:

> I think she can use "--time".
> But I dont understand what is meant by store there..therefore I am not
> sure.
>
> I think you are running your program on a single server..so check out if it
> helps.
>
>
> Exact text: Invoke a SPARQL query on a store. Use --time for timing
> information. The store is attached on each run of this command so timing
> includes some overhead not present in a running system.
>
>
> On Fri, Dec 20, 2013 at 7:30 PM, Maria Jackson
> <ma...@gmail.com>wrote:
>
> > Is it possible to find the time that a particular query takes to
> > run(compilatiion + execution time) in Jena TDB.
> >
> > I think it is possible add these within the code. But is there any other
> > way out...is there some build-in Jena TDB feature which allows me to find
> > the time a query takes in total (i..e plan generation + executing it).
> >
> > I'll be highly grateful to you for the same.
> > I have a paper submission deadline tomorrow..an early response is highly
> > appreciated.
> >
>

Re: Find time taken by a particular query in Jena TDB

Posted by Rose Beck <ro...@gmail.com>.
I think she can use "--time".
But I dont understand what is meant by store there..therefore I am not
sure.

I think you are running your program on a single server..so check out if it
helps.


Exact text: Invoke a SPARQL query on a store. Use --time for timing
information. The store is attached on each run of this command so timing
includes some overhead not present in a running system.


On Fri, Dec 20, 2013 at 7:30 PM, Maria Jackson
<ma...@gmail.com>wrote:

> Is it possible to find the time that a particular query takes to
> run(compilatiion + execution time) in Jena TDB.
>
> I think it is possible add these within the code. But is there any other
> way out...is there some build-in Jena TDB feature which allows me to find
> the time a query takes in total (i..e plan generation + executing it).
>
> I'll be highly grateful to you for the same.
> I have a paper submission deadline tomorrow..an early response is highly
> appreciated.
>