Not signed in (Sign In)

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorsandy
    • CommentTimeApr 9th 2012
     
    What is the Threads column in the lower section?
    Doc says,
    ”Threads”, meaning average number of threads busy with a query.

    How do you calculate threads for a query?
  1.  
    Hello Sandy,

    Jet Profiler checks what the database servers threads are busy doing. It samples the server x times per second. The value is the average number of threads seen executing the specified query. So if you see a value of 0.5 it means on average, half of the time, one thread is busy executing the query.
    • CommentAuthorsandy
    • CommentTimeApr 11th 2012
     
    Hi Bjorn,

    Suppose one query is executing 10 sec.
    Threads = 10/(Noof threads in collection1+Noof threads in collection2+Noof threads in collection3+.....Noof threads in collection3)

    Am I correct?

    Thanks,
    Sandy
  2.  
    Threads = 1.

    The number of total threads is not important. What counts is the number of threads busy. In your example, during 10 seconds, one thread is busy with the query. So during that time frame you will see a Thread value of 1. After 10 seconds, the value drops back to 0 again. If you run Jet Profiler for 20 seconds and that query is running 10 of those seconds, the average in, say the Top Queries list, will show 0.5.
    • CommentAuthorsandy
    • CommentTimeApr 20th 2012
     
    Thanks for your help.
    I have few more questions.

    1. Suppose I am executing a query after jet profiler runs for 10 seconds. Query is running for 10 secs. Do we get a thread value of 1 during this time?. If you run jet profiler for 30sec then, threads = 10/30 = .333. Is this correct?

    2. We are executing two queries in same time, then how do you calculate the thread value?
    Same with tables also, if two tables are open, then how do you calculate the thread value of tables?
  3.  
    Hello,

    1. Yes and yes. It is the average for the selected timeframe so 10 / 30 = .333.

    2. It will be 2, it is summed up. And for tables as well, you get an open count of 2 if two concurrent queries are each holding one handle to the table.
    • CommentAuthorsandy
    • CommentTimeApr 23rd 2012
     
    suppose 2 queries are running at the same time. first query is running for 5 sec and second query is running for 10 sec.

    for the 5 sec : 10/5 . (because 2 queries same time)
    for the 6 th second : 6/6

    Is this correct?
  4.  
    That will show number of busy threads, second by second:

    2 2 2 2 2 1 1 1 1 1
    • CommentAuthorsandy
    • CommentTimeApr 23rd 2012
     
    How do you calculate the thread value here?

    1 st sec : 2/1
    2nd sec: 4/2
    3rd sec: 6/3
    4th sec : 8/4
    5th sec: 10/5
    6th sec: 6/6
    7th sec: 7/7.

    Suppose jet profiler was running for 10 sec. and query started executing at 11 sec.
    11 sec : 2/11
    12 sec: 4/12
    13 sec: 6/13
    14 sec : 8/14
    15 sec: 10/15
    16 sec: 6/16
    17 sec: 7/17.
    Is this correct?
  5.  
    The value is per second without memory. For each second: how many threads are currently executing queries? No division is necessary.

    There is a smoothing filter in the graph settings that allow you to add some smoothing to the graphs so that peaks are flattened. This makes it easier to spot trends but it can make it harder for you to see the exact figures you are looking for. Try switching it off and then see if it makes more sense to you.