<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4266388600963991311</id><updated>2011-11-23T11:24:30.034Z</updated><category term='performance'/><category term='health center'/><category term='tools'/><category term='method profiling'/><category term='ulimit'/><category term='garbage collection'/><title type='text'>Collecting the garbage ...</title><subtitle type='html'>Thoughts, ramblings, and musings from a Java developer. A lot of my thoughts are about garbage collection and the stormy relationship between the Java developer and the Java garbage collector. My postings here reflect my personal views and do not necessarily represent those of my employer IBM.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://hollycummins.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://hollycummins.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Holly Cummins</name><uri>http://www.blogger.com/profile/08367229042550909996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://4.bp.blogspot.com/_CzL4MgtWqlE/SNqPSjfV_nI/AAAAAAAAAAM/76ic7gbFfrw/S220/cumminsholly.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4266388600963991311.post-6586461280340352348</id><published>2009-06-15T17:23:00.002+01:00</published><updated>2009-06-15T17:33:43.131+01:00</updated><title type='text'>Health Center 1.0 released</title><content type='html'>Last week was a big week for the Health Center team. Version 1.0 of the Health Center was released. Full installation instructions are available from the &lt;a href="http://www.ibm.com/developerworks/java/jdk/tools/healthcenter/"&gt;Health Center homepage&lt;/a&gt;. It now works with IBM Support Assistant and is suitable for use in production (with recent IBM JVMs). A method profiler that's got a low enough overhead to be used in production and left on all the time is a pretty special thing, I think. One which is only part of a tool which also assesses system stability, triages a range of performance problems, and makes performance tuning accessible to non-experts is even more special, I think.&lt;br /&gt;&lt;br /&gt;To celebrate the whole team baked and brought in carrot cake, brownies, chocolate chip cookies, lemon cake, rocky road squares, and flapjacks. We even had balloons. It was very nice but I've never eaten so much at work and I think we were all ready to explode by the afternoon - in future I think we should delegate and have only &lt;i&gt;half&lt;/i&gt; the team bake per release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4266388600963991311-6586461280340352348?l=hollycummins.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hollycummins.blogspot.com/feeds/6586461280340352348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4266388600963991311&amp;postID=6586461280340352348' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/6586461280340352348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/6586461280340352348'/><link rel='alternate' type='text/html' href='http://hollycummins.blogspot.com/2009/06/health-center-10-released.html' title='Health Center 1.0 released'/><author><name>Holly Cummins</name><uri>http://www.blogger.com/profile/02737477241094504981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4266388600963991311.post-3397417751038564131</id><published>2009-05-12T10:00:00.007+01:00</published><updated>2009-05-12T15:08:53.682+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='health center'/><category scheme='http://www.blogger.com/atom/ns#' term='method profiling'/><title type='text'>How to interpret a method profile</title><content type='html'>In a &lt;a href="http://hollycummins.blogspot.com/2009/05/how-do-you-solve-performance-problem.html"&gt;previous post&lt;/a&gt;, I described the general methodology I use to diagnose performance problems. &lt;br /&gt;&lt;br /&gt;Once an application has been identified as CPU-bound, either by using the &lt;a href="https://www14.software.ibm.com/iwm/web/cc/earlyprograms/ibm/ibmmdtjhc/"&gt;Health Center&lt;/a&gt; or CPU monitoring, the next step is to figure out &lt;i&gt;what&lt;/i&gt; is eating CPU. In a Java application, this will usually be Java code, but it could be native code. Profiling native code usually requires platform specific tools; on linux, I use &lt;a href="http://perfinsp.sourceforge.net/tprof.html"&gt;tprof&lt;/a&gt;. Profiling Java code is a lot easier, and is more likely to yield big performance improvements, so I usually start with a Java profile and only profile native code if I didn't get anywhere with the Java profile. For Java profiling, I use the Health Center. It's got a few advantages, one of which is that there's no bytecode instrumentation needed, there's no need to specify only a few packages to profile, and the overhead is very low, so it won't affect the performance characteristics of what you're trying to profile.&lt;br /&gt;&lt;br /&gt;So what does a method profile tell you? Simply put, it tells you what your application is spending its time doing. More precisely, it tells you what code your application is spending its time running - it doesn't tell you when your application is waiting on a lock instead of running your code, and it doesn't tell you when the JVM is collecting garbage instead of running your code. Assuming locking and GC aren't the cause of the performance problem (see &lt;a href="http://hollycummins.blogspot.com/2009/05/how-do-you-solve-performance-problem.html"&gt;triaging a performance problem&lt;/a&gt;), the method profile will give you the information you need to make your application go faster. &lt;br /&gt;&lt;br /&gt;The application is doing too much work, and that's slowing it down. Your aim in performance tuning is to make the application do less work. There are lots of ways to make code more efficient. Sometimes people start performance tuning by code inspection - they read through the code base looking for obvious inefficiencies. I've done this myself lots of times, but it's not a particularly efficient technique. Say I find a method which is pretty carelessly implemented, and I double its speed with a bit of refactoring. Then I triumphantly re-run my application, only to discover nothing's changed. What's going on? The problem is that a big performance improvement on a method which is rarely called isn't going to change much of anything. For example, if I double the speed of a method which uses 0.5% of my CPU time, I've sped my application up by an imperceptible 0.25%. If, on the other hand, I shave 10% of the time of a method which is using 20% of my CPU, my application will go 2% faster. So the first rule of performance tuning is to optimise the methods at the top of the profile and ignore the ones near the bottom. &lt;br /&gt;&lt;br /&gt;This is example from a method profiler, in this case the one in the Health Center. One method is clearly using more CPU than the rest, and so it's coloured red. In this case, 60% of the time the JVM checked what the application was doing, it was executing the FireworkParticle.animate() method. This is what's shown by the left-hand 'Self' column. The 'Tree' column on the right shows how much time the application spent in both the animate() method and its descendants. Some profilers call this column 'descendants' instead. Usually the Self figures are more useful for optimising an application.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_CzL4MgtWqlE/SghHSSWmMBI/AAAAAAAAACU/2OJgM1UsqtQ/s1600-h/healthcenterprofile.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 500px; height: 210px;" src="http://2.bp.blogspot.com/_CzL4MgtWqlE/SghHSSWmMBI/AAAAAAAAACU/2OJgM1UsqtQ/s400/healthcenterprofile.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5334592138110185490" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What makes a method appear near the top of a method profile? It's taking up a lot of CPU time, but why? There are two reasons; either the method is being called too often, or the method is doing too much work when it's called. Sometimes it happens that a method really is doing the right amount of work the right number of times, but this is usually only the case after a fair amount of work. In their natural state, most programs can - and should - contain inefficiencies. (Remember that &lt;a href="http://fresh.homeunix.net/~luke/misc/knuth-turingaward.pdf"&gt;premature optimisation is the root of all evil&lt;/a&gt;.) &lt;br /&gt;&lt;br /&gt;Some profilers can distinguish between a method which is called several times, and one which is called once and then spends a long time executing, but many cannot. The reason is that some profilers operate by &lt;i&gt;tracing&lt;/i&gt; - that is, recording every entry and exit of a method. This gives very precise information, but usually carries a fairly heavy performance cost. The IBM JVM can be &lt;a href="http://www.ibm.com/developerworks/java/library/j-ibmjava5/"&gt;configured with launch parameters&lt;/a&gt; to count or time method executions, but it's only advisable to do this for a restricted subset of methods. An alternate method of collecting profiling information is to &lt;i&gt;sample&lt;/i&gt; - that is, check periodically what method is executing. This is much less expensive but doesn't give as much detail as tracing profilers. The Health Center uses method sampling already built into the JVM to allow profiling with extremely low overhead. &lt;br /&gt;&lt;br /&gt;Often it will be obvious when inspecting a hot method if it's being called frequently or is slow to run. Code with loops, particularly nested loops, is probably expensive to run. Code which doesn't seem to do much but which is at the top of a profile is probably being called a lot. This leads neatly to the next steps in optimization: eliminate loops and do less work inside loops for expensive methods, and call inexpensive method less frequently. &lt;br /&gt;&lt;br /&gt;How do you go about making sure a method is called less? Method profilers which also record stack traces can make calling method less pretty easy. For example, this is the output of the Health Center, showing where calls to one of the top methods in the profile have come from: &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CzL4MgtWqlE/SghJ7WkhiHI/AAAAAAAAACc/mBPYcnXEpcI/s1600-h/healthcenterinvocationpaths.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 148px;" src="http://1.bp.blogspot.com/_CzL4MgtWqlE/SghJ7WkhiHI/AAAAAAAAACc/mBPYcnXEpcI/s400/healthcenterinvocationpaths.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5334595042640234610" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In this case, 98% of the time the doSomeWork() method was sampled, it was animate() that called it. 2% of the time, it was draw() that called it. In this case, the next step is to inspect the animate() method and see why it's calling doSomeWork(). Often, at least in the first passes of optimisation, most of the calls to the top method are totally unnecessary and can be trivially eliminated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4266388600963991311-3397417751038564131?l=hollycummins.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hollycummins.blogspot.com/feeds/3397417751038564131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4266388600963991311&amp;postID=3397417751038564131' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/3397417751038564131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/3397417751038564131'/><link rel='alternate' type='text/html' href='http://hollycummins.blogspot.com/2009/05/how-to-interpret-method-profile.html' title='How to interpret a method profile'/><author><name>Holly Cummins</name><uri>http://www.blogger.com/profile/08367229042550909996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://4.bp.blogspot.com/_CzL4MgtWqlE/SNqPSjfV_nI/AAAAAAAAAAM/76ic7gbFfrw/S220/cumminsholly.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_CzL4MgtWqlE/SghHSSWmMBI/AAAAAAAAACU/2OJgM1UsqtQ/s72-c/healthcenterprofile.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4266388600963991311.post-8879320755845404725</id><published>2009-05-11T14:41:00.007+01:00</published><updated>2009-05-12T16:03:50.652+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='health center'/><title type='text'>How do you solve a performance problem?</title><content type='html'>I was talking to a friend today about a performance problem he was seeing, and he explained that he wasn't entirely sure how to fix it. Performance tuning can be very skilled, but the basic principles are straightforward and should be accessible to every Java developer. &lt;br /&gt;&lt;br /&gt;This is the methodology I recommend.  &lt;br /&gt;&lt;br /&gt;All performance problems are caused by a limited resource. Your job as a performance analyst (or developer who's suddenly required to be a performance analyst) is to identify what resource is limited - what's the bottleneck for this application? Often after fixing the first bottleneck, a second bottleneck will become apparent - the process of performance tuning is the process of eliminating bottlenecks, one by one, until the performance is good enough for you and your stakeholders.&lt;br /&gt;&lt;br /&gt;Computational resources fall into a few basic categories. Different people count them differently, but I like to think of four types of resource: the CPU, memory, I/O, and locks. &lt;br /&gt;&lt;br /&gt;A CPU-bound application can't get enough processor time to complete its work. A memory-bound application needs more memory than is available. An I/O-bound application is trying to do I/O faster than the system can handle. Finally, a lock-bound application is being held up by the fact that multiple threads are contending on the same locks. 'Lock-bound' isn't a terribly common term, but I think it's really important to consider lock contention when analyzing performance problems. As systems become more and more parallel, synchronization are increasingly a limiting factor in the scalability of the system. &lt;br /&gt;&lt;br /&gt;So how do you identify which of these resources is the cause of the hold-up? Some heuristics can help as a first step. If the CPU is at or near 100%, the CPU is likely to be the culprit. If the CPU isn't near 100%, it's probably locking or I/O. The rule of thumb becomes a bit muddier when it comes to memory. Sometimes memory problems can show up as low CPU usage, because the system is waiting on a heap lock (which is properly locking) or physical memory access - paging in the worst case (technically, I/O). However, in a garbage collected system, excessive memory consumption will often manifest as lots of processing time being spent in the garbage collector (CPU).  &lt;br /&gt;&lt;br /&gt;Tools can help turn these fairly fuzzy heuristics into a more precise diagnosis. There are lots of tools available, both free and not-free. My favourite tool is &lt;a href="https://www14.software.ibm.com/iwm/web/cc/earlyprograms/ibm/ibmmdtjhc/"&gt;IBM's Health Center&lt;/a&gt;. This is probably because I'm the technical lead for the Health Center, so I think what it does is pretty sensible and cool. :) The Health Center is free, but it can only monitor IBM JVMs. I do think it's one of the best ways to investigate garbage collection, locking, and collect method profiles from an IBM JVM.&lt;br /&gt;&lt;br /&gt;The Health Center tries to automate the process of identifying the root cause of a performance problem. The front page shows a dashboard with a bunch of status indicators. If one of them is red or orange, that's a pretty good indicator of where to start tweaking the performance. The one area the Health Center doesn't cover at the moment is I/O. It can identify garbage collection and locking bottlenecks pretty accurately, and the method profiler can identify the root cause of much excessive CPU usage. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_CzL4MgtWqlE/Sggy6HAzJYI/AAAAAAAAACM/1cXKDqpX0jU/s1600-h/healthcenterfrontpage.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 271px;" src="http://2.bp.blogspot.com/_CzL4MgtWqlE/Sggy6HAzJYI/AAAAAAAAACM/1cXKDqpX0jU/s400/healthcenterfrontpage.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5334569732516554114" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So let's say you've used the Health Center (or your tool of choice) and you're seeing some red crosses. What next? In the Health Center, clicking on the link next to a red cross will bring up more information and more detailed recommendations about how to fix the problem. In later posts I'll give a bit more background about how to go about fixing locking issues, memory issues, and CPU issues.&lt;br /&gt;&lt;br /&gt;Forward links:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; &lt;a href="http://hollycummins.blogspot.com/2009/05/how-to-interpret-method-profile.html"&gt;How to interpret a method profile&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4266388600963991311-8879320755845404725?l=hollycummins.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hollycummins.blogspot.com/feeds/8879320755845404725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4266388600963991311&amp;postID=8879320755845404725' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/8879320755845404725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/8879320755845404725'/><link rel='alternate' type='text/html' href='http://hollycummins.blogspot.com/2009/05/how-do-you-solve-performance-problem.html' title='How do you solve a performance problem?'/><author><name>Holly Cummins</name><uri>http://www.blogger.com/profile/08367229042550909996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://4.bp.blogspot.com/_CzL4MgtWqlE/SNqPSjfV_nI/AAAAAAAAAAM/76ic7gbFfrw/S220/cumminsholly.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_CzL4MgtWqlE/Sggy6HAzJYI/AAAAAAAAACM/1cXKDqpX0jU/s72-c/healthcenterfrontpage.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4266388600963991311.post-347007197348001068</id><published>2009-05-08T14:30:00.007+01:00</published><updated>2009-05-08T14:44:44.802+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ulimit'/><category scheme='http://www.blogger.com/atom/ns#' term='health center'/><title type='text'>More Health Center features</title><content type='html'>In a &lt;a href="http://hollycummins.blogspot.com/2008/09/ibm-monitoring-and-diagnostic-tools-for.html"&gt;previous post&lt;/a&gt;, I described a new IBM tool, IBM Monitoring and Diagnostic Tools for Java - Health Center. We've added some new features to the &lt;a href="https://www14.software.ibm.com/iwm/web/cc/earlyprograms/ibm/ibmmdtjhc/"&gt;Health Center beta&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Ever wondered what the classpath of that application which is behaving strangely is? Or why all the core files are truncated? The environment perspective provides details of the Java version, Java classpath, boot classpath, environment variables, and system properties. This can be really handy for debugging problems, particularly problems on remote systems or systems where you don't control the configuration. It also shows the ulimit, which is a common cause of strange behaviour on linux and unix systems. If the Health Center detects misconfigured applications, it will provide recommendations on how to fix it. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_CzL4MgtWqlE/SgQ2SEyMPxI/AAAAAAAAAB8/vQKo7mPEdvU/s1600-h/environment.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 500px; height: 300px;" src="http://3.bp.blogspot.com/_CzL4MgtWqlE/SgQ2SEyMPxI/AAAAAAAAAB8/vQKo7mPEdvU/s400/environment.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5333447542863314706" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Another new feature is the ability to export and import data. This means one person can collect the data, and if there's a problem, they can send it to someone else for more analysis. For example, if a method is unusually hot in the method profile, a system operator could send the exported data to the developer responsible for that area of the code. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_CzL4MgtWqlE/SgQ2-JQJExI/AAAAAAAAACE/luam3-_U_cQ/s1600-h/export.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 204px; height: 186px;" src="http://4.bp.blogspot.com/_CzL4MgtWqlE/SgQ2-JQJExI/AAAAAAAAACE/luam3-_U_cQ/s400/export.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5333448299976921874" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4266388600963991311-347007197348001068?l=hollycummins.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hollycummins.blogspot.com/feeds/347007197348001068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4266388600963991311&amp;postID=347007197348001068' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/347007197348001068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/347007197348001068'/><link rel='alternate' type='text/html' href='http://hollycummins.blogspot.com/2009/05/more-health-center-features.html' title='More Health Center features'/><author><name>Holly Cummins</name><uri>http://www.blogger.com/profile/08367229042550909996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://4.bp.blogspot.com/_CzL4MgtWqlE/SNqPSjfV_nI/AAAAAAAAAAM/76ic7gbFfrw/S220/cumminsholly.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_CzL4MgtWqlE/SgQ2SEyMPxI/AAAAAAAAAB8/vQKo7mPEdvU/s72-c/environment.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4266388600963991311.post-4589422000510603199</id><published>2008-10-08T10:43:00.001+01:00</published><updated>2008-10-08T10:43:00.455+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='garbage collection'/><title type='text'>Garbage collection flavours</title><content type='html'>In my previous post, I described the basic garbage collection algorithms. Within these basic categories, there are many variants, or flavours.&lt;br /&gt;&lt;h2&gt;Generational collectors&lt;/h2&gt;Generational collectors exploit the observed properties that most objects tend to die young, and that young objects are more likely to reference old objects than the reverse. Together these are known as the weak generational hypothesis.&lt;br /&gt;&lt;br /&gt;Generational collectors divide the heap up into multiple generations. Young generations can be collected without collecting old generations. These partial collections are quicker than full heap collections, and are likely to produce a good return of free space relative to the area collected, since most objects die young. At least the younger generations tend to employ copying collectors, since these collectors are very efficient in heaps with high attrition rates.&lt;br /&gt;&lt;br /&gt;Objects which survive a given number of collections are tenured and move up to an older generation. In order to avoid collecting objects in younger generations which are referenced by older generations, a remembered set is maintained of references from old generations to young generations. A write barrier between the generations is used to catch changes to these references.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Incremental collection&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Incremental collectors allow single collections to be divided into smaller collections. This allows pause times to be limited. Incremental techniques almost always require one of a write barrier or a read barrier to prevent changes to the object connectivity graph mid-way through a collection causing the reachability results to be incorrect.&lt;br /&gt;&lt;h2&gt;Concurrent collection&lt;/h2&gt;A concurrent collector is one which can execute concurrently with a mutator thread. Even on moderately multi-processor systems, it usually does not make sense to dedicate an entire processor to running garbage collection. Therefore the typical concurrent collection is perhaps more accurately described as a highly incremental collection; each thread is assigned small units of garbage collection work to do along with its application work, so the garbage collection work is finely interleaved with application work. One way of thinking of this garbage collection work is as a 'tax' - threads have to do some garbage collection work in exchange for being able to allocate. As with incremental techniques, concurrent collections need a write- or read-barrier.&lt;br /&gt;&lt;h2&gt;Parallel collection&lt;/h2&gt;A parallel collector is one which divides the collection work so that multiple collector threads are collecting concurrently. This is counter-productive on single-threaded processors, but increasingly necessary as the number of processors in a system increases. On systems with many processors a single-threaded collector is unable to keep up with the amount of garbage the processors can produce.&lt;br /&gt;&lt;br /&gt;Similar techniques are used to achieve incrementality, concurrency, and parallelism, so many collectors which have one of these properties also have some of the others.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4266388600963991311-4589422000510603199?l=hollycummins.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hollycummins.blogspot.com/feeds/4589422000510603199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4266388600963991311&amp;postID=4589422000510603199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/4589422000510603199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/4589422000510603199'/><link rel='alternate' type='text/html' href='http://hollycummins.blogspot.com/2008/10/garbage-collection-flavours.html' title='Garbage collection flavours'/><author><name>Holly Cummins</name><uri>http://www.blogger.com/profile/08367229042550909996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://4.bp.blogspot.com/_CzL4MgtWqlE/SNqPSjfV_nI/AAAAAAAAAAM/76ic7gbFfrw/S220/cumminsholly.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4266388600963991311.post-6697253228627928933</id><published>2008-10-07T18:44:00.002+01:00</published><updated>2008-10-07T18:44:00.064+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='garbage collection'/><title type='text'>Garbage collection algorithms</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;p&gt;Garbage collection has been the subject of much academic research . In particular, the volume of new techniques with various claimed properties is high enough that it is tempting to coin the phrase &lt;a href="http://en.wikipedia.org/wiki/Another"&gt;YAGA (Yet Another GC Algorithm)&lt;/a&gt;. For a pointer to many of these articles, see &lt;a href="http://www.cs.kent.ac.uk/people/staff/rej/gcbib/gcbibP.html"&gt;Richard Jones' garbage collection bibliography.&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;Garbage collection algorithms&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;Despite the large number of variants, most garbage collection algorithms fall into a few simple categories.&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;Reference counting&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;Yes, reference counting is a form of garbage collection. It's sometimes seen as an alternative to garbage collection, and sometimes even as a morally superior alternative to garbage collection, but really, it's just a type of garbage collection algorithm.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Reference counting garbage collectors track the number of references to each object. Often the count is maintained in and by the object itself. When a new reference to an object is added, the reference count is incremented. When a reference is removed, the count is decremented. When the count reaches zero, the object is destroyed and the memory released. Reference counting fails when objects reference one another in a cycle. In these cases each object will be seen to be referenced and will never be freed, even if nothing references the cyclic structure. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Reference counting is unable to deal with cycles unless augmented with occasional invocations of another form of garbage collection. Reference counting has a number of other disadvantages, mostly to do with performance and bounding of work, and so it is rarely used in modern garbage collection systems. However, smart pointers in C++, while not traditionally considered a form of garbage collection, do make use of reference counting. Ad hoc garbage collectors introduced to manage object reachability in complex environments also tend to use reference counting since it is easily implemented in a hostile environment.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;Tracing collectors&lt;/h2&gt;&lt;p&gt;Most garbage collectors perform some sort of tracing to determine object liveness. Tracing does not have the same problem with collecting cycles as reference counting does. However, tracing collectors are more sensitive to changes in the object graph and usually require the suspension of the application threads or close monitoring of application activity to ensure correctness.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Mark-sweep&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Mark-sweep collectors collect in two phases. In the first phase, all reachable objects are traced, begining from a set of roots. The roots are all objects which are guaranteed reachable, including objects referenced from the stack and static variables. Every object directly or indirectly reachable from a root is marked. Objects which do not end up marked are unreachable and therefore cannot be used again by the application, so they may safely be freed.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In the second phase of a mark-sweep collection, all unmarked objects are added to a free-list. Contiguous areas of free memory are merged on the free list.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Mark-compact collectors&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Mark-compact mark live objects using identical techniques to those used by mark-sweep collectors. However, mark-compact collectors do not use a free list. Instead, in the second phase all reachable objects are moved so that they are stored as compactly as possible. New allocation is then performed from the empty area of the heap.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Many collectors hybridise these two approaches, combining frequent sweeping with occasional compaction.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Copying collectors&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Copying collectors divide the heap into two areas, a to-space and from-space. All objects are allocated in the to-space. When the new space is full, a collection is performed and the spaces are swapped. All reachable objects in the to-space are copied to the from-space, which is declared the new to-space. New allocation is then performed in the new to-space.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Copying collectors have a number of advantages over marking collectors. Because copying is done&lt;br /&gt;in the same phase as tracing, it is not necessary to maintain a space-consuming list of which objects have been marked. Because no sweep is performed, the cost of the collection is proportional only to the amount of live data.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If most objects are unreachable, a copying collecton can be very efficient. The corollary is that if most objects remain reachable, or if some very large objects remain reachable, the collection will be woefully inefficient, because a large amount of memory will need to be copied every collection.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p style="text-align: justify;"&gt;Copying collectors also keep the heap very compact, and this can boost allocation and application performance. However, because a completely empty from-space must be maintained at all times, copying collectors are not space-efficient. Modern collectors tend to estimate an object death-rate and maintain less than half the heap for the from-space accordingly. Copying collectors are also known as semispace collectors.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For a good overview of how this relates to the IBM JVM's garbage collection, see Mattias Persson's &lt;a href="http://www.ibm.com/developerworks/java/library/j-ibmjava2/"&gt;developerWorks article&lt;/a&gt;. &lt;/p&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4266388600963991311-6697253228627928933?l=hollycummins.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hollycummins.blogspot.com/feeds/6697253228627928933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4266388600963991311&amp;postID=6697253228627928933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/6697253228627928933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/6697253228627928933'/><link rel='alternate' type='text/html' href='http://hollycummins.blogspot.com/2008/10/garbage-collection-algorithms.html' title='Garbage collection algorithms'/><author><name>Holly Cummins</name><uri>http://www.blogger.com/profile/08367229042550909996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://4.bp.blogspot.com/_CzL4MgtWqlE/SNqPSjfV_nI/AAAAAAAAAAM/76ic7gbFfrw/S220/cumminsholly.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4266388600963991311.post-2343198652401296668</id><published>2008-10-05T18:29:00.004+01:00</published><updated>2008-10-06T11:03:23.567+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='garbage collection'/><title type='text'>Garbage collection myths</title><content type='html'>I've been lucky enough in my work to learn a fair bit about garbage collection. One of the things I've discovered is how many myths and half-truths exist about garbage collection. Part of the reason these myths have sprung up is that garbage collection has some pretty paradoxical properties.  The first myth is that garbage collection is only suitable for the incompetent, unskilled, or lazy. In fact garbage collection offers many architectural and software engineering advantages, even to the skilled developer. The second myth is that garbage collection is all about about collecting garbage. It seems obvious from the name, but it's not true! Garbage collectors also include an allocation component, which, along with their powers of object rearrangement,  can make a significant difference to application performance. Thirdly, criticisms of garbage collection often focus on the pause times, and responses to these criticisms often focus exclusively on reducing pause times, in the mistaken belief that small pause times guarantee good application response times. Pause times are also often used as a metric of general application performance, and an increase in pause times is taken as an indicator of worsened performance, when in fact the opposite the opposite is often true. Paradoxically, even the total amount of time spent paused for garbage collection is not a good predictor of the impact of garbage collection on application performance. Finally, the sixth myth is that garbage collection has a disastrous performance impact. While garbage collection can hurt application performance, it can also help application performance to the point where it exceeds the performance with manual memory management. I'll go through each of these in detail in later posts.&lt;br /&gt;&lt;br /&gt;But, to start off with, what is garbage collection? Garbage collection is a system of automatic memory management. Memory which has been dynamically allocated but which is no longer in use is reclaimed for future re-use without intervention by the application. Garbage collection solves the otherwise difficult problem of determining object liveness by freeing memory only when it becomes unreachable. &lt;br /&gt;&lt;br /&gt;Garbage collection is pretty ubiquitous in modern languages. Garbage collected languages include Java, the .Net languages, Lisp, Python, Perl, PHP, Ruby, Smalltalk, ML, Self, Modula-3, and Eiffel. Some languages which are not traditionally garbage collected offer garbage collection as a pluggable or configurable extension. For example, collectors are available for C++, and Objective-C was recently extended to allow garbage collection. Understanding the garbage collector is an important part of performance tuning in these languages.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4266388600963991311-2343198652401296668?l=hollycummins.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hollycummins.blogspot.com/feeds/2343198652401296668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4266388600963991311&amp;postID=2343198652401296668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/2343198652401296668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/2343198652401296668'/><link rel='alternate' type='text/html' href='http://hollycummins.blogspot.com/2008/10/garbage-collection-myths.html' title='Garbage collection myths'/><author><name>Holly Cummins</name><uri>http://www.blogger.com/profile/08367229042550909996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://4.bp.blogspot.com/_CzL4MgtWqlE/SNqPSjfV_nI/AAAAAAAAAAM/76ic7gbFfrw/S220/cumminsholly.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4266388600963991311.post-4635644991481375266</id><published>2008-09-24T20:13:00.001+01:00</published><updated>2009-05-11T14:40:00.976+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='health center'/><title type='text'>IBM Monitoring and Diagnostic Tools for Java™ - Health Center™ is now available</title><content type='html'>I'm part of a team in IBM's Java Technology Centre which develops diagnostic tools, and we've just released a brand new tool. It's called IBM Monitoring and Diagnostic Tools for Java™ - Health Center™ and it's available as an early access beta  &lt;a href="https://www14.software.ibm.com/iwm/web/cc/earlyprograms/ibm/ibmmdtjhc/"&gt;download&lt;/a&gt; from developerWorks. We're really excited about the diagnostic insights it can offer. It allows running JVMs to be observed, health-checked, and tuned.  At the moment it gives insight into general system health, application activity, and garbage collection activity. There are visualizations and also recommendations, so you don't have to be an expert to improve the performance of your application.&lt;br /&gt;&lt;br /&gt;One of the nice things about the Health Center is that it presents different kinds of information in one place. There's a status page which shows at a glance what's going well and what might need attention:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CzL4MgtWqlE/SNqgVSLn2tI/AAAAAAAAABI/Znf4aFGRpGM/s1600-h/frontpage.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_CzL4MgtWqlE/SNqgVSLn2tI/AAAAAAAAABI/Znf4aFGRpGM/s400/frontpage.gif" alt="" id="BLOGGER_PHOTO_ID_5249684603172018898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Garbage collection is one of the first and easiest things to check when tuning an application. Sometimes garbage collection can benefit from a bit of tuning, and sometimes looking at what the garbage collection is doing can highlight application problems. Is your application using more memory than seems reasonable? Is it leaking memory? The Health Center will suggest a command line, diagnose when garbage collection is causing performance problems, and point out memory leaks:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_CzL4MgtWqlE/SNqgp47_ztI/AAAAAAAAABQ/Y5UxDuI6U1k/s1600-h/gc.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_CzL4MgtWqlE/SNqgp47_ztI/AAAAAAAAABQ/Y5UxDuI6U1k/s400/gc.gif" alt="" id="BLOGGER_PHOTO_ID_5249684957172846290" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Synchronization can be a big performance bottleneck for applications on multi-CPU systems, and it can be difficult to identify hot locks or even assess the impact of locking. The Health Center has always-on lock monitoring which identifies the objects which are most contended and provides guidance about whether synchronization is hurting performance:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_CzL4MgtWqlE/SNqg1bEmKOI/AAAAAAAAABY/p25SXD7jbT0/s1600-h/locking.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_CzL4MgtWqlE/SNqg1bEmKOI/AAAAAAAAABY/p25SXD7jbT0/s400/locking.gif" alt="" id="BLOGGER_PHOTO_ID_5249685155314280674" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Last, but not least, the Health Center includes a nice sampling method profiler. This can be really valuable in diagnosing applications which are using high CPU. Because it's low overhead, there's no need to specify in advance which parts of the application should be profiled. It works without recompilation or byte code instrumentation. It shows where the application is spending its time and gives full call stacks for all sampled methods. Because of the call stacks, this kind of profiling isn't just for performance problems - sometimes it can give surprising functional insight:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_CzL4MgtWqlE/SNqhAcE9xWI/AAAAAAAAABg/gRndtmObs7o/s1600-h/profile.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_CzL4MgtWqlE/SNqhAcE9xWI/AAAAAAAAABg/gRndtmObs7o/s400/profile.gif" alt="" id="BLOGGER_PHOTO_ID_5249685344562824546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The way the Health Center is able to get so much information without much overhead is that it's closely linked to the JVM, so there are minimum system requirements. The absolute minimum requirement is an IBM JVM, version 5.0 or higher. This will give locking information and some GC information. To get profiling Java 5 SR8 or Java 6 SR1 is required. The fullest GC information is available in Java 6 service refresh 2. IBM JVMs can be downloaded from &lt;a href="http://www.ibm.com/developerworks/java/jdk/"&gt;developerWorks&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4266388600963991311-4635644991481375266?l=hollycummins.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hollycummins.blogspot.com/feeds/4635644991481375266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4266388600963991311&amp;postID=4635644991481375266' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/4635644991481375266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/4635644991481375266'/><link rel='alternate' type='text/html' href='http://hollycummins.blogspot.com/2008/09/ibm-monitoring-and-diagnostic-tools-for.html' title='IBM Monitoring and Diagnostic Tools for Java™ - Health Center™ is now available'/><author><name>Holly Cummins</name><uri>http://www.blogger.com/profile/08367229042550909996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://4.bp.blogspot.com/_CzL4MgtWqlE/SNqPSjfV_nI/AAAAAAAAAAM/76ic7gbFfrw/S220/cumminsholly.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_CzL4MgtWqlE/SNqgVSLn2tI/AAAAAAAAABI/Znf4aFGRpGM/s72-c/frontpage.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4266388600963991311.post-246710251502556650</id><published>2007-09-17T19:57:00.001+01:00</published><updated>2008-10-06T11:03:48.279+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><title type='text'>How to download EVTK?</title><content type='html'>EVTK can be downloaded as a plug-in to the &lt;a href="http://www-01.ibm.com/software/support/isa/"&gt;IBM Support Assistant&lt;/a&gt;. Download ISA first, and then choose EVTK from the list of available tools. Both are free.&lt;br /&gt;&lt;br /&gt;An &lt;a href="http://www.ibm.com/developerworks/forums/dw_thread.jsp?forum=1030&amp;amp;thread=158867&amp;amp;cat=10"&gt;EVTK forum&lt;/a&gt; is available on developerWorks. The forum is pretty quiet at the moment but it has links to installation instructions for EVTK. It would also be great to have more traffic on the forum itself.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;EDIT:&lt;/b&gt; EVTK has has a name change! It's now known as IBM Monitoring and Diagnostic Tools for Java - Garbage Collection and Memory Visualizer. Different name, same tool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4266388600963991311-246710251502556650?l=hollycummins.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hollycummins.blogspot.com/feeds/246710251502556650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4266388600963991311&amp;postID=246710251502556650' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/246710251502556650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/246710251502556650'/><link rel='alternate' type='text/html' href='http://hollycummins.blogspot.com/2007/09/how-to-download-evtk.html' title='How to download EVTK?'/><author><name>Holly Cummins</name><uri>http://www.blogger.com/profile/08367229042550909996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://4.bp.blogspot.com/_CzL4MgtWqlE/SNqPSjfV_nI/AAAAAAAAAAM/76ic7gbFfrw/S220/cumminsholly.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4266388600963991311.post-134234881191994670</id><published>2007-09-16T21:41:00.000+01:00</published><updated>2007-09-16T22:02:28.071+01:00</updated><title type='text'></title><content type='html'>I've just got back from speaking at JavaZone in Oslo. I'll post links to the presentation videos when they're available. The feedback on my presentation and on the Extensible Verbose Toolkit gc analysis tooling I demonstrated was really positive, which was nice.&lt;br /&gt;&lt;br /&gt;One of the main things I discussed in my talk is that care is required in interpreting garbage collection pauses. Even though pauses stop an application doing work, which is obviously bad, there's not necessarily any correlation between shorter garbage collection pauses and better application performance. Sometimes shorter pauses give better performance, sometimes longer pauses give better performance.  This is pretty uncontroversial if the quality of service requirement is better throughput. It's a lot more contentious if response times are the critical performance metric.  After my talk a few people told me about their applications, for which longer garbage collection pauses  &lt;span style="font-style: italic;"&gt;definitely&lt;/span&gt; meant longer response times and &lt;span style="font-style: italic;"&gt;definitely&lt;/span&gt; mattered a lot. I certainly wasn't going to tell them they were wrong, either! I think the number of cases where there's a strong correlation between garbage collection pause times and response times - or, at least, maximum response times - is pretty high. What I was trying to get across is that there are also at least &lt;span style="font-style: italic;"&gt;some&lt;/span&gt; cases where the gc pause times are only a small contributor to the maximum response times.  It would be unfortunate to minimise pause times without ever checking back against response times if your application happened to be one of the ones where pause times aren't so important.&lt;br /&gt;&lt;br /&gt;The whole subject of performance tuning is fascinating because there are so many different system configurations and so many different performance requirements that coming up with a single answer is impossible. Even coming up with a single coherent set of heuristics is pretty tricky.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4266388600963991311-134234881191994670?l=hollycummins.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hollycummins.blogspot.com/feeds/134234881191994670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4266388600963991311&amp;postID=134234881191994670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/134234881191994670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4266388600963991311/posts/default/134234881191994670'/><link rel='alternate' type='text/html' href='http://hollycummins.blogspot.com/2007/09/ive-just-got-back-from-speaking-at.html' title=''/><author><name>Holly Cummins</name><uri>http://www.blogger.com/profile/08367229042550909996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://4.bp.blogspot.com/_CzL4MgtWqlE/SNqPSjfV_nI/AAAAAAAAAAM/76ic7gbFfrw/S220/cumminsholly.jpg'/></author><thr:total>0</thr:total></entry></feed>
