You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by MARTINEZ Antonio <An...@alcatel-lucent.com> on 2008/06/06 21:13:41 UTC

After session.save() takes 15 minutes for 6K nodes

Hello,

I have an issue saving 6K inside a transaction on Jboss. I have about 6K
Nodes in the tree with about 15 String properties each. After I save
session.save() -save itself is fast-, the transaction takes about 15
minutes to end.

Peeking at the java process, the code executing is inside the
persistence manager (I use now mysqlPM but I had the same issue before
with derby).

Is there something that can be done to reduce this time (I was expecting
seconds).

Thanks,
Antonio
 

Re: After session.save() takes 15 minutes for 6K nodes

Posted by Stefan Guggisberg <st...@day.com>.
hi antonio

On Tue, Jun 10, 2008 at 4:32 AM, MARTINEZ Antonio
<An...@alcatel-lucent.com> wrote:
> Hi Stefan,
>
> Thanks for doing that testing.
>
> I have done now two different tests with a scaled down tree (140 Nodes
> with about 15 string of 15 bytes each)
> My server is a SunBlade 1500 with 2G.
>
> - If I build the tree and then save it, it takes about 40 seconds to
> save and exit the transaction.
>
> - However, if I just create one node and then add all other nodes as
> children of this one (flat storage), then it takes 3 seconds to save and
> exit the transaction.
>
> In the tree configuration, most of the nodes are at the deepest level
> (there are 10 levels in my case)

i modified my test accordingly. the 1st run adds ~10k child nodes to
a single parent ('flat'), the 2nd run creates a 8-level deep tree with
3 sibling child nodes at every but the leaf node (again ~10k nodes, 'deep').
the changes are comitted in a UserTransaction.  i get nearly
identical results for both runs (commit takes ~7 seconds).

i used derby bundle db pm.

are you perhaps using a custom access mananger?

if you can provide a simple and complete test case i'll further investigate
your problem...

cheers
stefan


>
>
> I do not understand what is going on
>
> Thanks,
> Antonio
>
>
>
>
> -----Original Message-----
> From: stefan.guggisberg@gmail.com [mailto:stefan.guggisberg@gmail.com]
> On Behalf Of Stefan Guggisberg
> Sent: Monday, June 09, 2008 8:50 AM
> To: users@jackrabbit.apache.org
> Subject: Re: After session.save() takes 15 minutes for 6K nodes
>
> hi antonio
>
> On Mon, Jun 9, 2008 at 5:36 PM, MARTINEZ Antonio
> <An...@alcatel-lucent.com> wrote:
>> Hello,
>>
>> I'm using JackRabbit 1.4.4 with MySql bundle. The string are very
>> small, I would say 10 bytes average and some strings are 30 bytes. So
>> I'm not sure DataStore would be of any benefit.
>>
>> Is there something else that can be done to improve the saving time ?
>> Did anybody else have a similar issue?
>
> i ran a quick test on my local machine (2 ghz macbook pro) with mysql
> 5.0 running on the same machine and using bundle mysql pm;
>
> adding 6k child nodes with 15 string properties of 100 chars each takes
> ~2 seconds, saving them takes ~44 seconds. i ran jackrabbit
> strand-alone, i.e. w/o tx.
>
> maybe you're experiencing a high network latency?
>
> cheers
> stefan
>
>>
>> Many thanks,
>> Antonio
>>
>>
>>
>> -----Original Message-----
>> From: Alexander Klimetschek [mailto:aklimets@day.com]
>> Sent: Sunday, June 08, 2008 11:00 PM
>> To: users@jackrabbit.apache.org
>> Subject: Re: After session.save() takes 15 minutes for 6K nodes
>>
>> On Fri, Jun 6, 2008 at 9:13 PM, MARTINEZ Antonio
>> <An...@alcatel-lucent.com> wrote:
>>> I have an issue saving 6K inside a transaction on Jboss. I have about
>
>>> 6K Nodes in the tree with about 15 String properties each.
>>
>> How long are the Strings (average and maximum)? If you have long
>> strings, consider using the DataStore (since Jackrabbit 1.4, see here
>> http://wiki.apache.org/jackrabbit/DataStore).
>>
>> Are you using a bundle persistence manager? Which version of
>> Jackrabbit do you use?
>>
>> Regards,
>> Alex
>>
>> --
>> Alexander Klimetschek
>> alexander.klimetschek@day.com
>>
>

RE: After session.save() takes 15 minutes for 6K nodes

Posted by MARTINEZ Antonio <An...@alcatel-lucent.com>.
Hello,

Any idea why it would be slower using the tree structure? 

Thank you,
Antonio 

-----Original Message-----
From: MARTINEZ Antonio [mailto:Antonio.Martinez@alcatel-lucent.com] 
Sent: Monday, June 09, 2008 7:33 PM
To: users@jackrabbit.apache.org
Subject: RE: After session.save() takes 15 minutes for 6K nodes

Hi Stefan,

Thanks for doing that testing.

I have done now two different tests with a scaled down tree (140 Nodes
with about 15 string of 15 bytes each) My server is a SunBlade 1500 with
2G.

- If I build the tree and then save it, it takes about 40 seconds to
save and exit the transaction.

- However, if I just create one node and then add all other nodes as
children of this one (flat storage), then it takes 3 seconds to save and
exit the transaction.

In the tree configuration, most of the nodes are at the deepest level
(there are 10 levels in my case)


I do not understand what is going on

Thanks,
Antonio




-----Original Message-----
From: stefan.guggisberg@gmail.com [mailto:stefan.guggisberg@gmail.com]
On Behalf Of Stefan Guggisberg
Sent: Monday, June 09, 2008 8:50 AM
To: users@jackrabbit.apache.org
Subject: Re: After session.save() takes 15 minutes for 6K nodes

hi antonio

On Mon, Jun 9, 2008 at 5:36 PM, MARTINEZ Antonio
<An...@alcatel-lucent.com> wrote:
> Hello,
>
> I'm using JackRabbit 1.4.4 with MySql bundle. The string are very 
> small, I would say 10 bytes average and some strings are 30 bytes. So 
> I'm not sure DataStore would be of any benefit.
>
> Is there something else that can be done to improve the saving time ?
> Did anybody else have a similar issue?

i ran a quick test on my local machine (2 ghz macbook pro) with mysql
5.0 running on the same machine and using bundle mysql pm;

adding 6k child nodes with 15 string properties of 100 chars each takes
~2 seconds, saving them takes ~44 seconds. i ran jackrabbit
strand-alone, i.e. w/o tx.

maybe you're experiencing a high network latency?

cheers
stefan

>
> Many thanks,
> Antonio
>
>
>
> -----Original Message-----
> From: Alexander Klimetschek [mailto:aklimets@day.com]
> Sent: Sunday, June 08, 2008 11:00 PM
> To: users@jackrabbit.apache.org
> Subject: Re: After session.save() takes 15 minutes for 6K nodes
>
> On Fri, Jun 6, 2008 at 9:13 PM, MARTINEZ Antonio 
> <An...@alcatel-lucent.com> wrote:
>> I have an issue saving 6K inside a transaction on Jboss. I have about

>> 6K Nodes in the tree with about 15 String properties each.
>
> How long are the Strings (average and maximum)? If you have long 
> strings, consider using the DataStore (since Jackrabbit 1.4, see here 
> http://wiki.apache.org/jackrabbit/DataStore).
>
> Are you using a bundle persistence manager? Which version of 
> Jackrabbit do you use?
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
>

RE: After session.save() takes 15 minutes for 6K nodes

Posted by MARTINEZ Antonio <An...@alcatel-lucent.com>.
Hi Stefan,

Thanks for doing that testing.

I have done now two different tests with a scaled down tree (140 Nodes
with about 15 string of 15 bytes each)
My server is a SunBlade 1500 with 2G.

- If I build the tree and then save it, it takes about 40 seconds to
save and exit the transaction.

- However, if I just create one node and then add all other nodes as
children of this one (flat storage), then it takes 3 seconds to save and
exit the transaction.

In the tree configuration, most of the nodes are at the deepest level
(there are 10 levels in my case)


I do not understand what is going on

Thanks,
Antonio




-----Original Message-----
From: stefan.guggisberg@gmail.com [mailto:stefan.guggisberg@gmail.com]
On Behalf Of Stefan Guggisberg
Sent: Monday, June 09, 2008 8:50 AM
To: users@jackrabbit.apache.org
Subject: Re: After session.save() takes 15 minutes for 6K nodes

hi antonio

On Mon, Jun 9, 2008 at 5:36 PM, MARTINEZ Antonio
<An...@alcatel-lucent.com> wrote:
> Hello,
>
> I'm using JackRabbit 1.4.4 with MySql bundle. The string are very 
> small, I would say 10 bytes average and some strings are 30 bytes. So 
> I'm not sure DataStore would be of any benefit.
>
> Is there something else that can be done to improve the saving time ?
> Did anybody else have a similar issue?

i ran a quick test on my local machine (2 ghz macbook pro) with mysql
5.0 running on the same machine and using bundle mysql pm;

adding 6k child nodes with 15 string properties of 100 chars each takes
~2 seconds, saving them takes ~44 seconds. i ran jackrabbit
strand-alone, i.e. w/o tx.

maybe you're experiencing a high network latency?

cheers
stefan

>
> Many thanks,
> Antonio
>
>
>
> -----Original Message-----
> From: Alexander Klimetschek [mailto:aklimets@day.com]
> Sent: Sunday, June 08, 2008 11:00 PM
> To: users@jackrabbit.apache.org
> Subject: Re: After session.save() takes 15 minutes for 6K nodes
>
> On Fri, Jun 6, 2008 at 9:13 PM, MARTINEZ Antonio 
> <An...@alcatel-lucent.com> wrote:
>> I have an issue saving 6K inside a transaction on Jboss. I have about

>> 6K Nodes in the tree with about 15 String properties each.
>
> How long are the Strings (average and maximum)? If you have long 
> strings, consider using the DataStore (since Jackrabbit 1.4, see here 
> http://wiki.apache.org/jackrabbit/DataStore).
>
> Are you using a bundle persistence manager? Which version of 
> Jackrabbit do you use?
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
>

Re: After session.save() takes 15 minutes for 6K nodes

Posted by Stefan Guggisberg <st...@day.com>.
hi antonio

On Mon, Jun 9, 2008 at 5:36 PM, MARTINEZ Antonio
<An...@alcatel-lucent.com> wrote:
> Hello,
>
> I'm using JackRabbit 1.4.4 with MySql bundle. The string are very small,
> I would say 10 bytes average and some strings are 30 bytes. So I'm not
> sure DataStore would be of any benefit.
>
> Is there something else that can be done to improve the saving time ?
> Did anybody else have a similar issue?

i ran a quick test on my local machine (2 ghz macbook pro) with mysql 5.0
running on the same machine and using bundle mysql pm;

adding 6k child nodes with 15 string properties of 100 chars each
takes ~2 seconds, saving them takes ~44 seconds. i ran jackrabbit
strand-alone, i.e. w/o tx.

maybe you're experiencing a high network latency?

cheers
stefan

>
> Many thanks,
> Antonio
>
>
>
> -----Original Message-----
> From: Alexander Klimetschek [mailto:aklimets@day.com]
> Sent: Sunday, June 08, 2008 11:00 PM
> To: users@jackrabbit.apache.org
> Subject: Re: After session.save() takes 15 minutes for 6K nodes
>
> On Fri, Jun 6, 2008 at 9:13 PM, MARTINEZ Antonio
> <An...@alcatel-lucent.com> wrote:
>> I have an issue saving 6K inside a transaction on Jboss. I have about
>> 6K Nodes in the tree with about 15 String properties each.
>
> How long are the Strings (average and maximum)? If you have long
> strings, consider using the DataStore (since Jackrabbit 1.4, see here
> http://wiki.apache.org/jackrabbit/DataStore).
>
> Are you using a bundle persistence manager? Which version of Jackrabbit
> do you use?
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
>

RE: After session.save() takes 15 minutes for 6K nodes

Posted by MARTINEZ Antonio <An...@alcatel-lucent.com>.
Hello,

I'm using JackRabbit 1.4.4 with MySql bundle. The string are very small,
I would say 10 bytes average and some strings are 30 bytes. So I'm not
sure DataStore would be of any benefit.

Is there something else that can be done to improve the saving time ?
Did anybody else have a similar issue?

Many thanks,
Antonio

 

-----Original Message-----
From: Alexander Klimetschek [mailto:aklimets@day.com] 
Sent: Sunday, June 08, 2008 11:00 PM
To: users@jackrabbit.apache.org
Subject: Re: After session.save() takes 15 minutes for 6K nodes

On Fri, Jun 6, 2008 at 9:13 PM, MARTINEZ Antonio
<An...@alcatel-lucent.com> wrote:
> I have an issue saving 6K inside a transaction on Jboss. I have about 
> 6K Nodes in the tree with about 15 String properties each.

How long are the Strings (average and maximum)? If you have long
strings, consider using the DataStore (since Jackrabbit 1.4, see here
http://wiki.apache.org/jackrabbit/DataStore).

Are you using a bundle persistence manager? Which version of Jackrabbit
do you use?

Regards,
Alex

--
Alexander Klimetschek
alexander.klimetschek@day.com

Re: After session.save() takes 15 minutes for 6K nodes

Posted by Alexander Klimetschek <ak...@day.com>.
On Fri, Jun 6, 2008 at 9:13 PM, MARTINEZ Antonio
<An...@alcatel-lucent.com> wrote:
> I have an issue saving 6K inside a transaction on Jboss. I have about 6K
> Nodes in the tree with about 15 String properties each.

How long are the Strings (average and maximum)? If you have long
strings, consider using the DataStore (since Jackrabbit 1.4, see here
http://wiki.apache.org/jackrabbit/DataStore).

Are you using a bundle persistence manager? Which version of
Jackrabbit do you use?

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com