On Tue, Nov 8, 2016 at 11:36 AM, Isuru Perera <isu...@wso2.com> wrote:

> Hi,
>
> Thanks for the detailed explanation.
>
> On Tue, Nov 8, 2016 at 11:23 AM, Kishanthan Thangarajah <
> kishant...@wso2.com> wrote:
>
>> DepSynch update/commit on manager node is designed to run with deployment
>> scheduler task. So on every run, we check whether any changes to the local
>> repo and then commit those to remote. The above trace is for doing a svn
>> status check and find whether there are any local file changes
>> (modification, addition etc) before deciding on executing the svn commit
>> command.
>>
>> The above can run only on a manager / read-write node. What's the impact
>> with performance? Are we seeing any bottleneck with this task running or is
>> the resource consumption?
>>
> There is an impact on performance as the dep sync task utilizes the CPU
> most of the time. We noticed the performance issue in a 2 CPU machine.
> Since the dep sync task is running every 15 seconds, there is not much CPU
> time for other threads.
>

We haven't seen this behaviour previously. According to the trace and
source of sqljet, SqlJetBtreeTable.getCurrentState() does a stack.peek. So
we need to check why this call takes up CPU resource. Could this be
environment specific?



>
>> On Mon, Nov 7, 2016 at 1:35 PM, Isuru Perera <isu...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> When analyzing a performance issue using Java Flight Recorder, I noticed
>>> that the server is running Deployment Synchronizer task most of the time.
>>>
>>> Please see the stack trace below.
>>>
>>>
>>> Stack Trace    Sample Count    Percentage(%)
>>> java.util.Stack.peek()    20    1.661
>>>    
>>> org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeTable.getCurrentState()
>>> 20    1.661
>>>       org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeTable.getCursor()
>>> 19    1.578
>>>          
>>> org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeTable.hasMoved()
>>> 11    0.914
>>>             org.tmatesoft.sqljet.core.internal.table.SqlJetBtreeTable.eof()
>>> 10    0.831
>>>                org.tmatesoft.sqljet.core.inte
>>> rnal.table.SqlJetBtreeTable.getRecord()    8    0.664
>>>                   org.tmatesoft.sqljet.core.inte
>>> rnal.table.SqlJetBtreeTable.getValueMem(int)    6    0.498
>>>                      org.tmatesoft.sqljet.core.inte
>>> rnal.table.SqlJetBtreeDataTable.getValueMem(int)    6    0.498
>>>                         org.tmatesoft.sqljet.core.inte
>>> rnal.table.SqlJetBtreeTable.getValueUncached(int)    6    0.498
>>>                            org.tmatesoft.sqljet.core.inte
>>> rnal.table.SqlJetBtreeTable.getValue(int)    6    0.498
>>>                               org.tmatesoft.sqljet.core.inte
>>> rnal.table.SqlJetBtreeDataTable.getValue(int)    6    0.498
>>>                                  org.tmatesoft.sqljet.core.inte
>>> rnal.table.SqlJetBtreeTable.getValues()    6    0.498
>>>                                     org.tmatesoft.sqljet.core.inte
>>> rnal.table.SqlJetTableDataCursor$16.run(SqlJetDb)    6    0.498
>>>                                        org.tmatesoft.sqljet.core.tabl
>>> e.SqlJetDb$3.run(SqlJetEngine)    6    0.498
>>>                                           org.tmatesoft.sqljet.core.tabl
>>> e.engine.SqlJetEngine$12.runSynchronized(SqlJetEngine)    6    0.498
>>>
>>> org.tmatesoft.sqljet.core.table.engine.SqlJetEngine.runSynch
>>> ronized(ISqlJetEngineSynchronized)    6    0.498
>>>
>>> org.tmatesoft.sqljet.core.table.engine.SqlJetEngine.runEngin
>>> eTransaction(ISqlJetEngineTransaction, SqlJetTransactionMode)    6
>>> 0.498
>>>
>>> org.tmatesoft.sqljet.core.table.SqlJetDb.runTransaction(ISqlJetTransaction,
>>> SqlJetTransactionMode)    6    0.498
>>>
>>> org.tmatesoft.sqljet.core.table.SqlJetDb.runReadTransaction(ISqlJetTransaction)
>>> 6    0.498
>>>
>>> org.tmatesoft.sqljet.core.internal.table.SqlJetTableDataCursor.getRowValues()
>>> 6    0.498
>>>
>>> org.tmatesoft.svn.core.internal.db.SVNSqlJetSelectStatement.getRowValues2(Map)
>>> 5    0.415
>>>
>>> org.tmatesoft.svn.core.internal.db.SVNSqlJetSelectStatement.loadRowValues(boolean)
>>> 5    0.415
>>>
>>> org.tmatesoft.svn.core.internal.db.SVNSqlJetSelectStatement.next()
>>> 5    0.415
>>>
>>> org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.addChildren(Set,
>>> SVNSqlJetStatement)    2    0.166
>>>
>>> org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.gatherChildren(File,
>>> boolean, boolean)    2    0.166
>>>
>>> org.tmatesoft.svn.core.internal.wc17.db.SVNWCDb.readChildren(File)
>>> 2    0.166
>>>
>>> org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCleanup.repairTimestamps(SVNWCContext,
>>> File)    2    0.166
>>>
>>> org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCleanup.repairTimestamps(SVNWCContext,
>>> File)    2    0.166
>>>
>>> org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCleanup.repairTimestamps(SVNWCContext,
>>> File)    2    0.166
>>>
>>> org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCleanup.repairTimestamps(SVNWCContext,
>>> File)    2    0.166
>>>
>>> org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCleanup.cleanupInternal(SVNWCContext,
>>> File)    1    0.083
>>>
>>>                                  org.tmatesoft.svn.core.interna
>>> l.wc2.ng.SvnNgCleanup.cleanup(SVNWCContext, File)    1    0.083
>>>
>>>                                     org.tmatesoft.svn.core.interna
>>> l.wc2.ng.SvnNgCleanup.run(SVNWCContext)    1    0.083
>>>
>>>                                        org.tmatesoft.svn.core.interna
>>> l.wc2.ng.SvnNgCleanup.run(SVNWCContext)    1    0.083
>>>
>>>                                           org.tmatesoft.svn.core.interna
>>> l.wc2.ng.SvnNgOperationRunner.run()    1    0.083
>>>
>>>
>>> org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperation)
>>> 1    0.083
>>>
>>>
>>> org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperation)
>>> 1    0.083
>>>
>>>
>>> org.tmatesoft.svn.core.wc2.SvnOperation.run()    1    0.083
>>>
>>>
>>> org.tmatesoft.svn.core.javahl17.SVNClientImpl.cleanup(String)    1
>>> 0.083
>>>
>>>
>>> org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.cleanup(File)
>>> 1    0.083
>>>
>>>
>>> org.wso2.carbon.deployment.synchronizer.subversion.SVNBasedArtifactRepository.commit(int,
>>> String)    1    0.083
>>>
>>>
>>> org.wso2.carbon.deployment.synchronizer.DeploymentSynchronizer.commit()
>>> 1    0.083
>>>
>>>
>>> org.wso2.carbon.deployment.synchronizer.internal.DeploymentS
>>> ynchronizerServiceImpl.commit(int)    1    0.083
>>>
>>>
>>> org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.deploymentSyncCommit()
>>> 1    0.083
>>>
>>>
>>> org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run()
>>> 1    0.083
>>>
>>>
>>> java.util.concurrent.Executors$RunnableAdapter.call()    1    0.083
>>>
>>>
>>> java.util.concurrent.FutureTask.runAndReset()    1    0.083
>>>
>>>
>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFu
>>> tureTask.access$301(ScheduledThreadPoolExecutor$ScheduledFutureTask)
>>> 1    0.083
>>>
>>>
>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run()
>>> 1    0.083
>>>
>>>
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker)
>>> 1    0.083
>>>
>>>
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run()    1    0.083
>>>
>>>
>>>                                  java.lang.Thread.run()    1    0.083
>>>
>>> Why is this running periodically? How to configure the time period?
>>>
>>
>> This can be configured via carbon.xml (DeploymentUpdateInterval), but
>> this is the same task that does the deployment too (on every 15 sec). I
>> would recommend not to change this.
>>
> I think there should be a different parameter for configuring the dep sync
> task interval. I also noticed this parameter, but I couldn't figure out
> that it's also related to deployment synchronizer.
>

No, the other config is to do periodic svn update , not for svn commit. In
here according to the trace, we are seeing periodic commit method call,
that runs on manager nodes.


>
>> Is there a way to disable this scheduled task  and update only when
>>> there's a notification?
>>>
>>
>> This is run only on a read-write node. So we have to have this as there
>> is no other way to find out whether there were any local modification and
>> then commit those to remote.
>>
>
>>
>>>
>>> Product is WSO2 API Manager 1.10.
>>>
>>> Thanks!
>>>
>>> Best Regards,
>>>
>>> --
>>> Isuru Perera
>>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>> Contact: +IsuruPereraWSO2
>>> <https://www.google.com/+IsuruPereraWSO2/about>
>>>
>>
>>
>>
>> --
>> *Kishanthan Thangarajah*
>> Technical Lead,
>> Platform Technologies Team,
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - +94773426635
>> Blog - *http://kishanthan.wordpress.com
>> <http://kishanthan.wordpress.com>*
>> Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
>>
>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 <https://www.google.com/+IsuruPereraWSO2/about>
>



-- 
*Kishanthan Thangarajah*
Technical Lead,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to