You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by kseelam <kr...@hotmail.com> on 2010/10/23 01:29:44 UTC
Checkpoint on High performance journal
Hi,
We are looking at using High performance journal with JDBC as described at
http://activemq.apache.org/persistence.html
It mentioned that only outstanding messages will be persisted in the DB (by
batch) when the checkpoint tot he DB happens.
Could anyone explain how exactly the 'checkpoint' works? I did not find any
checkpointInterval attribute.
Also how the journalLogFiles and journalLogFileSize work?
We are looking at some design/architectural point of view and any reference
to any of the document would be highly appreciated.
Thank you all.
Krishna
--
View this message in context: http://activemq.2283324.n4.nabble.com/Checkpoint-on-High-performance-journal-tp3008012p3008012.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Invitation to connect on LinkedIn
Posted by kseelam <kr...@hotmail.com>.
I'd like to add you to my professional network on LinkedIn.
- Krishna
Krishna Seelam
Sr Software Engineer at UCLA
Greater Los Angeles Area
Confirm that you know Krishna Seelam:
https://www.linkedin.com/e/glgv4n-gtz12s36-3k/isd/4622547399/0XCdfv5G/?hs=false&tok=3OMJwj-SQbtkY1
--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/glgv4n-gtz12s36-3k/TIqgTtZu6F2brpGsTAPQYqdHGLGlw-HRaN2l6qTwajG_dBn4AgCDGbauYQwfuukjwUt/goo/ml-node%2B3008041-818674904-141989%40n4%2Enabble%2Ecom/20061/I1603561223_1/?hs=false&tok=1HIeE45qcbtkY1
(c) 2011 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Checkpoint-on-High-performance-journal-tp3008012p3920605.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Invitation to connect on LinkedIn
Posted by kseelam <kr...@hotmail.com>.
I'd like to add you to my professional network on LinkedIn.
- Krishna
Krishna Seelam
Sr Software Engineer at UCLA
Greater Los Angeles Area
Confirm that you know Krishna Seelam:
https://www.linkedin.com/e/4rzzqu-gtz12tzk-5k/isd/4622547638/wfRfKoBc/?hs=false&tok=0FvehODAgctkY1
--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/4rzzqu-gtz12tzk-5k/bHRZdSwKkdMonwrTbcTvual_89_UGllGNmTTqaIcmgmkAIlh9mTGIPwbdwCUngC1DYoO/goo/ml-node%2B3012336-1610705035-141989%40n4%2Enabble%2Ecom/20061/I1603561270_1/?hs=false&tok=1faMNWIsActkY1
(c) 2011 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Checkpoint-on-High-performance-journal-tp3008012p3920606.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: Checkpoint on High performance journal
Posted by kseelam <kr...@hotmail.com>.
Thanks for your reply.
Seems it is not possible to override the checkpointInterval. Can we
override/create my own JournalPersistenceAdapter and set it to
JournalPersistenceAdapterFactory? by creating the spring bean in the
activemq.xml ?
Also it looks like checkpoint cycle is more often than default
checkpointInterval (5min). is my understanding correct? Reading the code
seems difficult to understand the concept/overview.
Thanks you.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Checkpoint-on-High-performance-journal-tp3008012p3012336.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: Checkpoint on High performance journal
Posted by Johan Edstrom <se...@gmail.com>.
From activemq/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapterFactory.java
private int journalLogFileSize = 1024 * 1024 * 20;
private int journalLogFiles = 2;
In activemq/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java
private final long checkpointInterval = 1000 * 60 * 5;
private long lastCheckpointRequest = System.currentTimeMillis();
private long lastCleanup = System.currentTimeMillis();
private int maxCheckpointWorkers = 10;
private int maxCheckpointMessageAddSize = 1024 * 1024;
public synchronized void start() throws Exception {
if (!started.compareAndSet(false, true)) {
return;
}
checkpointTask = taskRunnerFactory.createTaskRunner(new Task() {
public boolean iterate() {
return doCheckpoint();
}
}, "ActiveMQ Journal Checkpoint Worker");
checkpointExecutor = new ThreadPoolExecutor(maxCheckpointWorkers, maxCheckpointWorkers, 30, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new ThreadFactory() {
public Thread newThread(Runnable runable) {
Thread t = new Thread(runable, "Journal checkpoint worker");
t.setPriority(7);
return t;
}
});
// checkpointExecutor.allowCoreThreadTimeOut(true);
this.usageManager.getMemoryUsage().addUsageListener(this);
if (longTermPersistence instanceof JDBCPersistenceAdapter) {
// Disabled periodic clean up as it deadlocks with the checkpoint
// operations.
((JDBCPersistenceAdapter)longTermPersistence).setCleanupPeriod(0);
}
longTermPersistence.start();
createTransactionStore();
recover();
// Do a checkpoint periodically.
this.scheduler = new Scheduler("Journal Scheduler");
this.scheduler.start();
this.scheduler.executePeriodically(periodicCheckpointTask, checkpointInterval / 10);
}
On Oct 22, 2010, at 5:29 PM, kseelam wrote:
>
> Hi,
>
> We are looking at using High performance journal with JDBC as described at
> http://activemq.apache.org/persistence.html
>
> It mentioned that only outstanding messages will be persisted in the DB (by
> batch) when the checkpoint tot he DB happens.
>
> Could anyone explain how exactly the 'checkpoint' works? I did not find any
> checkpointInterval attribute.
> Also how the journalLogFiles and journalLogFileSize work?
>
> We are looking at some design/architectural point of view and any reference
> to any of the document would be highly appreciated.
>
> Thank you all.
> Krishna
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Checkpoint-on-High-performance-journal-tp3008012p3008012.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Johan Edstrom
joed@opennms.org
They that can give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety.
Benjamin Franklin, Historical Review of Pennsylvania, 1759