Monday, October 4, 2010

NoteToSelf: JVisualVM rules. And -XX:+UseConcMarkSweepGC messes it up.

JVisualVM (under your JDK /bin directory, on Windows something like C:\Program Files\Java\jdk1.6.0_07\bin\jvisualvm.exe), released with JDK version 6, update 7, provides an awesome view into your JVM processes.

Local processes are automagically shown, which is very helpful:

The overview will give you JVM arguments and system properties. This can be very helpful when someone claims they started with one set of arguments and you believe otherwise! The Monitor tab has a nice UI for grabbing a quick heap dump and viewing it, as well as some graphs that can often immediately point out that you have a memory leak (particularly if you don't see a nice healthy saw-tooth for the heap). The Threads tab shockingly gives you information about threads and the ability to perform thread dumps. Although it has never actually been helpful for me yet the visibility into running/waiting is very cool:

Even better, JVisualVM makes monitoring remote processes very easy. Just start the remote JVM with arguments similar to java -Dcom.sun.management.jmxremote.port=7890 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false ...whatever... and then on the client start JVisualVM and choose File>Add JMX Connection and enter hostname:7890 (or whatever number you set for com.sun.management.jmxremote.port) and to see into a remote VM. You can also use jstad but in many cases we don't start this so being able to easily boot arbitrary processes as monitorable is a major plus.

Unfortunately there is a gotcha. If the JVM arguments to the process you want to watch included -XX+UseConcMarkSweepGC you will see a little red warning in the bottom right informing you there was a NullPointerException at com.sun.tools.visualvm.jvm.MonitoredDataImpl.:

This will result in the Monitor tab being completely useless; none of the graphs will populate. Apparently this is due to a bug (see https://visualvm.dev.java.net/issues/show_bug.cgi?id=128) that is fixed. Sadly the fix seems not to be deployed into my environments yet :(

19 comments:

Unknown said...

jvisualvm rocks. Orders of magnitude easier to get started with than other profilers I've used in the past. I would have never found this JSF issue without it (or if I had to re-compile/instrument classes or startup scripts to attach a profiler):

http://wrschneider.blogspot.com/2011/10/bizarre-glassfish-jsfel-performance.html

Green Laser Sight - Viridian Weapon Technologies said...

Body Cam : The Ruger lCP2 380 ACP Handgun is an inconspicuous gun ideal for concealed lug as well as individual security. The small framework of this 380 ACP gun suits a range of holsters as well as hidden bring tools, making it a wonderful option for mobile defense. Pistol Light This Ruger gun is developed with an alloy steel barrel, steel slide, and glass-filled nylon hold frame to provide a stable capturing system with dependable accuracy. For enhanced handling, the Ruger LCP II features a distinctive grip framework that has actually been made a little larger than the original Ruger Laser to extra successfully distribute recoil and lower muzzle rise. Light for Pistol

Steven Cohen said...

Do You Now AximTrade Review Login Is A Secure, Multi-channel, Multi-factor Authentication System, Enabling Customers To Securely Access Their Accounts To Fund/deposit, Request Withdrawal, Update Or Manage Their Profile And More.

Oliver said...

We can rank your site for any search term on page 1 of Google, Yahoo and Bing's search engine results For Keyword " Forex Ranking List "

Unknown said...

Forex Seo Reseller You Can Use Link Building Services To Increase The Visibility Of Your Website. The Service Is An Affordable And Long-term Solution To Help Your Site Rank Higher In Search Engine Results. Link Building Services Use A Variety Of Strategies To Help Your Site Rank Higher. One Such Strategy Is To Create Backlinks To Your Site. The Link Building Service Will Create And Place Links On Websites That Are Relevant To Your Business And Industry. This Helps Your Site Rank Higher In Search Engine Results And Increases The Likelihood Of Potential Customers Finding Your Site.

Unknown said...

No One Knows How Many Links Are Required To Rank On The First Page Of Google, But It's Safe To Say That There Are A Lot. We Will Do All The Work For You, Including The Tedious Forex Seo Reseller Process, For A Reasonable Price. We'll Make Sure That You Have A Complete List Of Links, Both Old And New, To Keep Your Site's Rankings High.

Oliver said...

Whether you are a new trader or an experienced trader, Online Stock Broker provides all of the information you need to make an educated decision about which online broker to use. We have years of experience in this industry working alongside brokers, traders and market makers and we bring our knowledge and expertise to you with this guide.

Unknown said...

Broker Forex Net Is Your Best Resource For Binary Options, Forex, Cfds And Much More. We're Not Just Happy To Provide You With Great Information, We Also Want To Teach You How To Make The Most Of Online Trading. Broker Forex Is Online Portal Created For Traders To Help Them Find The Best Brokers And Strategies For Online Trading. Along With Broker Review And Login Details At Broker Forex We Offer Guest Post & Blog, Content Marketing Services, Link Building Services, And Much More.

Oliver said...

At Market Forex Net Our Aim Is To Provide You With The Information Necessary To Make An Educated Choice When Finding The Right Trading Service Provider. We List A Variety Of Brokers Offering Many Different Platforms And Services. Gaining Access To A Wide Range Of The Best Online Brokers Will Allow You To Compare Them Side By Side And Make The Right Decision For Your Trading Needs.

Steven Cohen said...

Check The Funff Stock Overview To Monitor A Stock And View Live Price Changes As They Occur, Including Volume And Share Changes. With Our Live, Real Time Stock Market Overview App, You No Longer Need To Refresh Your Browser Or Watch Multiple Computer Screens To View Real Time Stock Prices.

Unknown said...

Are you looking to make money by trading currencies on the forex market? Do you want to find the best forex brokers with the lowest costs and fees? Our free guide provides all the information you need to start trading, selecting a reputable and safe broker, and understanding your How To Start Forex Broker .

Unknown said...

As a new forex trader you need to know what the best brokers offers and their Start Forex Brokerage before you begin trading and investing, Use this guide to learn about trading costs, leverage and leverage limits, spreads and execution times, custodial services and market maker spreads .

Oliver said...

Ati testing login Real-Time Overview Of A Stock, Including Recent And Historical Price Charts, News, Events, Analyst Rating Changes And Other Key Stock Information.

Unknown said...

As a new forex trader you need to know what the best brokers offers and their Become A Forex Broker before you begin trading and investing, Use this guide to learn about trading costs, leverage and leverage limits, spreads and execution times, custodial services and market maker spreads .

Unknown said...

Free Forex White Label Partnership will enable you to get all the benefits of the MetaTrader 4 automated trading platform and MetaQuotes language with even more exciting functionalities for your own brand

Unknown said...

At Tradingzy, we’re digital marketing specialists. We focus on search engine optimization for the forex market. We’ve got the best ranking on Google for keywords like “ what is forex seo .”

periyannan said...

This is the first & best article to make me satisfied by presenting good content. I feel so happy and delighted. Thank you so much for this article.
This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting.

evs full form
raw agent full form
full form of tbh in instagram
dbs bank full form
https full form
tft full form
pco full form
kra full form in hr
tbh full form in instagram story
epc full form

Unknown said...

This is our list of the Best MT4 Forex Brokers In UAE . Each broker has been carefully selected and reviewed before appearing on this list. We take pride that all of the brokers listed pay their affiliates promptly and give you excellent trading education.

Unknown said...

Our list of the Best MT4 Forex Brokers In Netherland is compiled solely of trusted, regulated and reputable forex brokers. We have selected well-known brokers that offer great customer service, low fees, an easy-to-use online platform, and education for new investors.

Post a Comment