Java – MySQL jconnector on COM myql. jdbc. utils. ReadAheadInputStream. Spend 50% of the time in fill()

I'm profiling my application, which uses spring hibernate MySQL Java connector Visual VM shows that when 1000 parallel connections are read, more than 50% of the CPU time is com myql. jdbc. utils. ReadAheadInputStream. Cost in fill()

Are there any optimizations to make it faster?

Solution

It is difficult to answer your question without other information Here are some information needs that should be met

>Is your estimated CPU time absolute or relative? It would seem odd if the fill () method used half the CPU time available for the system But if this number is using visual VM to report the usage time relative to the time spent by the application, then the rest of your application may not have done significant work? > Use system level tools to determine these analytical measurements? You can use pidstat, mpstat and SAR to cross check whether you are on Linux I've seen the visual VM tag time spent on socketinputstream The socketread0 () method is used as CPU time, which is not confirmed by pidstat I think this is the result of some measurement approximation in the visual VM itself or JVM behavior So it's always a good idea to cross check by using operating system tools

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>