jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Working with JCR in highly concurrent applications
Date Thu, 21 Sep 2006 22:57:15 GMT
Hi,

On 9/21/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> Jukka I am not sure how you have computed with such accuracy.

The raw results are shown below. The test case (attached) consists of
running a given number of parallel threads that each just repeat the
code snippet that reads a single property from a random location. The
first column reports the number of concurrent threads in a test run,
the second column the total number of property reads performed, and
the third column the exact measurement time (in milliseconds). The
test setup allowed the threads to run for five seconds before starting
the measurements. The measurement lasted about 30 seconds (the exaxt
time was measured), and the threads only finished running after the
measurement period had ended.

Threads,Count,Time
1,515263,30000
2,602342,30047
3,480340,30063
4,476496,30203
5,433930,30188
6,428222,30219
7,437373,30000
8,515249,34781
9,384501,30000
10,349670,30000
20,254787,30000
30,266225,30000
40,243408,30000
50,233156,30000
60,222628,30000
70,211203,30000
80,216089,31468
90,212402,30000
100,196199,30563

The average times per single execution of the code snippet were
calculated directly from the above data.

> Also, I am thinking that the more times you are running that look the bigger
> the chances are to reread the same property and so to hit the cached
> node in the session (and this results in a massive improvement of the
> performance). Am I wrong?

You're right! I didn't take into account the caching improvements
during the summer (JCR-471), only figuring that a content structure of
10k nodes will outweight the default 1k size of the previous item
state cache. So consider the above results representative of
Jackrabbit when the working set is fully cached.

To decrease the cache effect I increased the size of the content model
from 10k nodes to 40k and 90k nodes by using 200x200 and 300x300
content structures instead of the original 100x100 structure. The
results are below, again in microseconds:

Threads  with 40k nodes       with 90k nodes
-----------------------------------------------------------------------
      1  1336 *************   3199 ********************************
      2  1190 ************    2520 *************************
      3  1177 ************    2300 ***********************
      4  1152 ************    2200 **********************
      5  1182 ************    2104 *********************
      6  1161 ************    2001 ********************
      7  1122 ***********     1987 ********************
      8  1106 ***********     1867 *******************
      9  1110 ************    1829 ******************
    ---
     10  1088 ***********     1810 ******************
     20  1143 ***********     1805 ******************
     30  1135 ***********     1701 *****************
     40  1173 ************    1582 ****************
     50  1131 ***********     1545 ***************
     60  1173 ************    1549 ***************
     70  1238 ************    1517 ***************
     80  1171 ************    1580 ****************
     90  1174 ************    1555 ****************
    100  1065 ***********     1540 ***************

With these larger working sets, the random property access code
snippet executes at 1+ milliseconds and doesn't grow by the number of
concurrent threads.

BR,

Jukka Zitting

-- 
Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftsmanship, JCR consulting, and Java development

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message