[ 
https://issues.apache.org/jira/browse/AMQ-7132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16743401#comment-16743401
 ] 

Alan Protasio edited comment on AMQ-7132 at 1/15/19 9:53 PM:
-------------------------------------------------------------

How do you run the tests? Like this?

mvn clean install -Dtest=RecoveryStatsBrokerTest

I could run here with a fedora. This is my ENV:

 
{quote}[fedora@ip-172-31-16-252 ~]$ cat /etc/os-release
 NAME=Fedora
 VERSION="29 (Cloud Edition)"
 ID=fedora
 VERSION_ID=29
 PLATFORM_ID="platform:f29"
 PRETTY_NAME="Fedora 29 (Cloud Edition)"
 ANSI_COLOR="0;34"
 CPE_NAME="cpe:/o:fedoraproject:fedora:29"
 HOME_URL="https://fedoraproject.org/";
 
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f29/system-administrators-guide/";
 SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help";
 BUG_REPORT_URL="https://bugzilla.redhat.com/";
 REDHAT_BUGZILLA_PRODUCT="Fedora"
 REDHAT_BUGZILLA_PRODUCT_VERSION=29
 REDHAT_SUPPORT_PRODUCT="Fedora"
 REDHAT_SUPPORT_PRODUCT_VERSION=29
 PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy";
 VARIANT="Cloud Edition"
 VARIANT_ID=cloud

[fedora@ip-172-31-16-252 ~]$ java -version
 openjdk version "1.8.0_191"
 OpenJDK Runtime Environment (build 1.8.0_191-b12)
 OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode) 
{quote}
 

The test also succeeded here:
{quote}-------------------------------------------------------------------------------
 Test set: org.apache.activemq.broker.RecoveryStatsBrokerTest
 -------------------------------------------------------------------------------
 Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 81.349 sec - 
in org.apache.activemq.broker.RecoveryStatsBrokerTest
{quote}
 

Seems that here is taking a little longer though.. (in my host it was taking 
10s and here is taking ~30 secs, so maybe only changing the timeout will 
resolve this as it is only 60 seconds)

I will attach the whole output in the ticked.

This ran in a aws m5.large instance.


was (Author: alanprot):
How do you run the tests? Like this?

mvn clean install -Dtest=RecoveryStatsBrokerTest

I could run here with a fedora. This is my ENV:

 
{quote}[fedora@ip-172-31-16-252 ~]$ cat /etc/os-release
NAME=Fedora
VERSION="29 (Cloud Edition)"
ID=fedora
VERSION_ID=29
PLATFORM_ID="platform:f29"
PRETTY_NAME="Fedora 29 (Cloud Edition)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:29"
HOME_URL="https://fedoraproject.org/";
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f29/system-administrators-guide/";
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help";
BUG_REPORT_URL="https://bugzilla.redhat.com/";
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=29
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=29
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy";
VARIANT="Cloud Edition"
VARIANT_ID=cloud


[fedora@ip-172-31-16-252 ~]$ java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode) 
{quote}
 

The test also succeeded here:
{quote}-------------------------------------------------------------------------------
Test set: org.apache.activemq.broker.RecoveryStatsBrokerTest
-------------------------------------------------------------------------------
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 81.349 sec - in 
org.apache.activemq.broker.RecoveryStatsBrokerTest
{quote}
 

I will attach the whole output in the ticked.

This ran in a aws m5.large instance.

> ActiveMQ reads lots of index pages upon startup (after a graceful or 
> ungraceful shutdown)
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQ-7132
>                 URL: https://issues.apache.org/jira/browse/AMQ-7132
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: KahaDB
>    Affects Versions: 5.15.8
>            Reporter: Alan Protasio
>            Assignee: Christopher L. Shannon
>            Priority: Major
>             Fix For: 5.16.0
>
>         Attachments: output.tgz
>
>
> Hi.
> We noticed that ActiveMQ reads lots of pages in the index file when is 
> starting up to recover the destinations statistics:
> [https://github.com/apache/activemq/blob/master/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java#L819]
> Nowadays, in order to do that, activemq traverse the 
> storedDestination.locationIndex to get the messageCount and totalMessageSize 
> of each destination. For destinations with lots of messages this process can 
> take a while making the startup process take long time.
> In a case of a master-slave broker, this prevent the broker to fast failover 
> and does not meet what is stated on 
> [http://activemq.apache.org/shared-file-system-master-slave.html.]
> {quote}If you have a SAN or shared file system it can be used to provide 
> _high availability_ such that if a broker is killed, another broker can take 
> over immediately. 
> {quote}
> One solution for this is keep track of the destination statistics summary in 
> the index file and doing so, we dont need to read all the locationIndex on 
> the start up.
> The code change proposed is backward compatible but need a bump on the kahadb 
> version. If this information is not in the index, the broker will fall back 
> to the current implementation, which means that the first time people upgrade 
> to the new version, it will still have to read the locationIndex, but 
> subsequent restarts will be fast.
> This change should have a negligible performance impact during normal 
> activemq operation, as this change introduce a few more bytes of data to the 
> index and this information will be on checkpoints. Also, this new information 
> is synchronized with the locationIndex as they are update at the same 
> transaction.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to