You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Márcio Moraes <mm...@gmail.com> on 2007/09/26 21:31:55 UTC
jdbcPersistenceAdapter with derbydb get slow
After receiving and consuming ~200,000 messages with jdbcPersistenceAdapter
and derbydb ActiveMQ get slow, very slow.
Is jdbcPersistenceAdapter-derbydb ready to use in production environment?
What kind of persistence you guys have using?
Att,
Márcio Moraes
Re: jdbcPersistenceAdapter with derbydb get slow
Posted by Dejan Bosanac <de...@nighttale.net>.
I've peaked into Default JDBC adapter and here are some quick tips I can
recommend.
As far as I can see the only additional index that could be helpful is
combined index on container and id columns (find next message query).
Also, I would recommend if you can recreate your indexes as it usually helps
with performances. It would be a good practice if we add this as a batch job
to be executed periodically as it can improve performances a great deal.
I have some experience with optimizing access to large tables in Derby, so
I'll try to find some time to dig into this a bit deeper.
Thanks,
Dejan
On 9/26/07, Márcio Moraes <mm...@gmail.com> wrote:
>
> I looked at derby database and saw ~244,000 messages on ACTIVEMQ_MSGS
> table,
> all messages have been consumed.
>
> Why does messages was not deleted after consume?
>
> ActiveMQ logs says:
>
> ActiveMQ Cleanup Timer]2007-09-26 09:15:56,630 DefaultJDBCAdapter:537 -
> Executing SQL: DELETE FROM ACTIVEMQ_MSGS WHERE ( EXPIRATION<>0 AND
> EXPIRATION<?) OR ID <= ( SELECT min(ACTIVEMQ_ACKS.LAST_ACKED_ID) FROM
> ACTIVEMQ_ACKS WHERE ACTIVEMQ_ACKS.CONTAINER=ACTIVEMQ_MSGS.CONTAINER)
>
> Is there some configuration i need do?
>
> I am using Jencks 2.0 and creating the TopicSession with AUTO_ACKNOWLEDGE
> mode.
>
> Att,
>
> Márcio Moraes
>
> Thanks.
>
> 2007/9/26, Márcio Moraes <mm...@gmail.com>:
> >
> > After receiving and consuming ~200,000 messages with
> > jdbcPersistenceAdapter and derbydb ActiveMQ get slow, very slow.
> >
> > Is jdbcPersistenceAdapter-derbydb ready to use in production
> environment?
> >
> > What kind of persistence you guys have using?
> >
> > Att,
> >
> > Márcio Moraes
> >
> >
> >
>
--
Dejan Bosanac
www.scriptinginjava.net
Re: jdbcPersistenceAdapter with derbydb get slow
Posted by Márcio Moraes <mm...@gmail.com>.
I looked at derby database and saw ~244,000 messages on ACTIVEMQ_MSGS table,
all messages have been consumed.
Why does messages was not deleted after consume?
ActiveMQ logs says:
ActiveMQ Cleanup Timer]2007-09-26 09:15:56,630 DefaultJDBCAdapter:537 -
Executing SQL: DELETE FROM ACTIVEMQ_MSGS WHERE ( EXPIRATION<>0 AND
EXPIRATION<?) OR ID <= ( SELECT min(ACTIVEMQ_ACKS.LAST_ACKED_ID) FROM
ACTIVEMQ_ACKS WHERE ACTIVEMQ_ACKS.CONTAINER=ACTIVEMQ_MSGS.CONTAINER)
Is there some configuration i need do?
I am using Jencks 2.0 and creating the TopicSession with AUTO_ACKNOWLEDGE
mode.
Att,
Márcio Moraes
Thanks.
2007/9/26, Márcio Moraes <mm...@gmail.com>:
>
> After receiving and consuming ~200,000 messages with
> jdbcPersistenceAdapter and derbydb ActiveMQ get slow, very slow.
>
> Is jdbcPersistenceAdapter-derbydb ready to use in production environment?
>
> What kind of persistence you guys have using?
>
> Att,
>
> Márcio Moraes
>
>
>