• Forums
    • Public Forums
      • Community Connect
      • Dynatrace
        • Dynatrace Open Q&A
      • Application Monitoring & UEM
        • AppMon & UEM Open Q&A
      • Network Application Monitoring
        • NAM Open Q&A
  • Home /
  • Public Forums /
  • Application Monitoring & UEM /
  • AppMon & UEM Open Q&A /
avatar image
Question by Anoh B. · Feb 07, 2013 at 07:02 PM ·

Sync Time in Java

Why am I getting so much of sync time in my java application?

Regards,
Anoh Brou

Comment

People who like this

0 Show 0
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

4 Replies

  • Sort: 
  • Most voted
  • Newest
  • Oldest
avatar image

Answer by Christian S. · Feb 13, 2013 at 05:59 PM

actually, the auto-sensor information (that's where the sync information comes from) should normally already give you a good hint about the sync point.

could you share the PurePath above as a dynatrace session?

of course, the thread dump gives you then the full visibility into which other thread(s) were involved in that sync issue. you could also run thread dumps scheduled, let's say in a minute interval. as thread dumps are pretty light-weight that should not have too much impact on your application.

Comment

People who like this

0 Show 3 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Anoh B. · Mar 22, 2013 at 04:28 PM 0
Share

eJacket Acceptance 03222013.dts

Hello Christian,
Please find attached a session. Would you please show me what other process is in contention with "addStmtUsageData(weblogic.jdbc.wrapper.Statement, java.lang.String, long)"?

avatar image Christian S. Anoh B. · Mar 22, 2013 at 05:54 PM 1
Share

well, here's what i did:

i took a look at the Method Hotspots Dashlet to figure that the method mentioned by you really consumes most of the sync time:

weblogic.jdbc.common.internal.ConnectionPoolProfiler.addStmtUsageData(Statement, String, long)

and this seems to be called by prepared statements all the time.
so if i drill-down from this method to the PurePaths, i see which transactions are influenced by this method and that it's mostly around 10s for each transaction:

?

so to really tell you, what's going on inside this method there would be 2 options:

  • decompile this method and look at the code. you could do this on your system by right-clicking this method -> source lookup -> decompile source code
  • taking thread dumps or CPU sampling when this is happening. however, this may be a little difficult with the timing.

however, what i'm really wondering about is the class that is consuming all this sync time: weblogic.jdbc.common.internal.ConnectionPoolProfiler!

sounds too me like there is some kind of connection pool profiling enabled on this system that consumes this sync time!

a short google search brought up some links with some potentially useful information (search for 'profil'):

  • http://docs.oracle.com/cd/E13222_01/wls/docs81/ConsoleHelp/domain_jdbcconnectionpool_config_connections.html
  • http://docs.oracle.com/cd/E15051_01/wls/docs103/jdbc_admin/monitor.html

maybe one of these options is turned on?! the description also clearly states something like 'This feature uses extra resources and will likely slow down connection pool operations, so it is not recommended for production use.'. so this could explain the sync time.

i think this connection pool profiling is worth taking a look at!

hope this helps,
Christian

avatar image Anoh B. Christian S. · Mar 22, 2013 at 06:47 PM 0
Share

Thank you Christian. That was a great help.

Regards,
Anoh Brou

avatar image

Answer by Rob V. · Feb 07, 2013 at 09:58 PM

A thread dump is a dump of what's happening "now". There is no historical info stored in the JVM regarding threads.

So for this to be useful, you would need to see when you are getting PPs with sync contention, and do a thread dump then. It will become very clear to you who is blocked and who is not.

Comment

People who like this

0 Show 0 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image

Answer by Rob V. · Feb 07, 2013 at 07:55 PM

The "sync" is not just informational. As Roman mentioned, the app is blocking/restricting access to either code or an object, making sure that one thread only is accessing this resource. So when a method is showing "sync" that means it's waiting for someone else to give up control of that shared resource.

If you need to know who is holding/blocking and who is waiting, you can use the thread dump feature of dynaTrace to show that.

Rob

Comment

People who like this

0 Show 2 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Anoh B. · Feb 07, 2013 at 08:10 PM 0
Share

Thank you very much for the info. Is it possible to dump the thread of a particular timeframe, say yesterday for example?

Regards,
Anoh Brou

avatar image Joel B. · Oct 03, 2013 at 10:58 PM 0
Share

Hello Rob,

We have transactions that are reporting high sync time, but the application is .NET.  Do you have any input as to how to get more granular information regarding .NET sync time?

Thanks!

JB

avatar image

Answer by Roman S. · Feb 07, 2013 at 07:06 PM

Best guess - because somewhere in or under (the tree in the screenshot is not fully expanded) the getAwardInfoDocuments method you have a synchronized method or block and the PP could not enter it straight away.

Best, Roman

Comment

People who like this

0 Show 2 · Share
10 |2000000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Viewable by all users

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

avatar image Anoh B. · Feb 07, 2013 at 07:38 PM 0
Share

Here is the expanded getAwardInfoDocuments method. Are you saying that PP could enter getDADAward(gov.nsf.components.proposal.model.Proposal proposal, gov.nsf.components.dynAwdDoc.DADAwardVersion dadAwdVer) method straight away?
Does the sync have

a direct impact on the performace of the applicaqtion itself or just informational?

Regards,
Anoh Brou

avatar image Roman S. Anoh B. · Feb 07, 2013 at 07:53 PM 0
Share

Aehm, yes - this has direct impact. It means this method call took 14s and 90% of that are due to synchronization. Somewhere in the getDADAward there seems to be a synchronized block - I would try getting a developer for that app and ask him to take a look at this. Maybe they can shorten the part of the method that needs to be synchronized, but since we don't have visibilty below the method level this is nothing we can show...

Best, Roman

How to get started

First steps in the forum
Read Community User Guide
Best practices of using forum

NAM 2019 SP5 is available


Check the RHEL support added in the latest NAM service pack.

Learn more

LIVE WEBINAR

"Performance Clinic - Monitoring as a Self Service with Dynatrace"


JANUARY 15, 3:00 PM GMT / 10:00 AM ET

Register here

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Forum Tags

dotnet mobile monitoring load iis 6.5 kubernetes mainframe rest api dashboard framework 7.0 appmon 7 health monitoring adk log monitoring services auto-detection uem webserver test automation license web performance monitoring ios nam probe collector migration mq web services knowledge sharing reports window java hybris javascript appmon sensors good to know extensions search 6.3+ server documentation easytravel web dashboard kibana system profile purelytics docker splunk 6.1 process groups account 7.2 rest dynatrace saas spa guardian appmon administration production user actions postgresql upgrade oneagent measures security Dynatrace Managed transactionflow technologies diagnostics user session monitoring unique users continuous delivery sharing configuration alerting NGINX splitting business transaction client 6.3 installation database scheduler apache mobileapp RUM php dashlet azure purepath agent 7.1 appmonsaas messagebroker nodejs 6.2 android sensor performance warehouse
  • Forums
  • Public Forums
    • Community Connect
    • Dynatrace
      • Dynatrace Open Q&A
    • Application Monitoring & UEM
      • AppMon & UEM Open Q&A
    • Network Application Monitoring
      • NAM Open Q&A