<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Xceptance Blog &#187; Java</title>
	<atom:link href="http://blog.xceptance.com/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.xceptance.com</link>
	<description>Passionate Testing</description>
	<lastBuildDate>Sat, 21 Jan 2012 11:29:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Spurious wakeup &#8211; the rare event</title>
		<link>http://blog.xceptance.com/2011/05/06/spurious-wakeup-the-rare-event/</link>
		<comments>http://blog.xceptance.com/2011/05/06/spurious-wakeup-the-rare-event/#comments</comments>
		<pubDate>Fri, 06 May 2011 00:12:08 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Object]]></category>
		<category><![CDATA[threads]]></category>
		<category><![CDATA[wait]]></category>
		<category><![CDATA[wakeup]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=628</guid>
		<description><![CDATA[After hunting for quite some for a strange application behavior, I finally found the reason. The Problem The Java application was behaving strangely in 4 out of 10 runs. It did not process all data available and assumed that the data input already ended. The application features several producer-consumer patterns, where one thread offers preprocessed data [...]]]></description>
			<content:encoded><![CDATA[<p>After hunting for quite some for a strange application behavior, I finally found the reason.</p>
<h3>The Problem</h3>
<p>The Java application was behaving strangely in 4 out of 10 runs. It did not process all data available and assumed that the data input already ended. The application features several producer-consumer patterns, where one thread offers preprocessed data to the next one, passing it into a buffer where the next thread reads it from.</p>
<p>The consumer or producer fall into a wait state in case no data is available or the buffer is full. In case of a state change, the active threads notifies all waiting threads about the new data or the fact that all data is consumed.</p>
<p>On 2-core and 8-core machines, the application was running fine but when we moved it to 24-cores, it suddenly started to act in an unpredictable manner.</p>
<h3>The Cause</h3>
<p>After a lot of debugging I found out that threads wake up without having been notified by their partner thread. In this case the consumer was woken up despite the fact that data was unavailable aka the producer has not delivered and therefore not notified anyone. But the consumer was awake&#8230;</p>
<p>The debugging nightmare finally revealed a rare behavior of any POSIX based application. This is the quote from the JDK6 doc:</p>
<blockquote><p>A thread can also wake up without being notified, interrupted, or  timing out, a so-called <em>spurious wakeup</em>.  While this will rarely  occur in practice, applications must guard against it by testing for  the condition that should have caused the thread to be awakened, and  continuing to wait if the condition is not satisfied.  In other words,  waits should always occur in loops.</p></blockquote>
<h3>The Verdict</h3>
<p>So never trust your notification chains. Threads might wake up even though nobody directly notified it. Additionally you should never exclude the possibility that the move from a small box to a big box does not influence the application behavior. More cores mean more trouble.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2011/05/06/spurious-wakeup-the-rare-event/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How does Garbage Collection work?</title>
		<link>http://blog.xceptance.com/2011/04/11/how-does-garbage-collection-work/</link>
		<comments>http://blog.xceptance.com/2011/04/11/how-does-garbage-collection-work/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 11:46:37 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[garbage collection]]></category>
		<category><![CDATA[gc]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=611</guid>
		<description><![CDATA[Just found two nice blog entries by Chaotic Java which explain nicely how Java Garbage Collection works. Might be still too much if you have never dealt with the topic before, but good reading for the others. Parallel and concurrent garbage collectors How does garbage collection work? Enjoy reading.]]></description>
			<content:encoded><![CDATA[<p>Just found two nice blog entries by <em>Chaotic Java</em> which explain nicely how Java Garbage Collection works. Might be still too much if you have never dealt with the topic before, but good reading for the others.</p>
<ul>
<li><a title="Permanent Link to Parallel and concurrent garbage collectors" href="http://chaoticjava.com/posts/parallel-and-concurrent-garbage-collectors/">Parallel and concurrent garbage collectors</a></li>
<li><a title="Permanent Link to How does garbage collection work?" href="http://chaoticjava.com/posts/how-does-garbage-collection-work/">How does garbage collection work?</a></li>
</ul>
<p>Enjoy reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2011/04/11/how-does-garbage-collection-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XLT &#8211; Garbage Collector details visualized</title>
		<link>http://blog.xceptance.com/2011/02/17/xlt-garbage-collector-details-visualized/</link>
		<comments>http://blog.xceptance.com/2011/02/17/xlt-garbage-collector-details-visualized/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 04:00:29 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[XLT]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[gc]]></category>
		<category><![CDATA[JVM]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=535</guid>
		<description><![CDATA[Today we want to give you a small preview of an upcoming XLT feature. Most of you probably know that XLT features agent statistics. These statistics help you to keep an eye on the health of the test execution engines (agents) to ensure that you do not influence the test results by providing insufficient hardware [...]]]></description>
			<content:encoded><![CDATA[<p>Today we want to give you a small preview of an upcoming XLT feature. Most of you probably know that XLT features agent statistics. These statistics help you to keep an eye on the health of the test execution engines (agents) to ensure that you do not influence the test results by providing insufficient hardware or by applying no or incorrect settings.</p>
<p>Most modern programming languages are virtual machine based and these machines have knobs you can turn to adjust their behavior according to your requirements. XLT runs on Java and so all the things you might have already learnt from tuning your Java-based servers apply to XLT as well. If you do not have experience in tuning your Java-based servers, you will learn a lot that can be applied to your servers and help you to increase performance.</p>
<p>So, let&#8217;s take a look at the upcoming XLT feature that provides you with more details about garbage collection (GC) without the need to use any external tool to monitor or analyze logs or JVMs runtime behavior.</p>
<div id="attachment_536" class="wp-caption aligncenter" style="width: 210px"><a rel="lightbox" href="/wp-content/uploads/2011/02/xlt-memory-and-gc-charts-good.png"><img class="size-thumbnail wp-image-536   " title="Example of XLT agent memory details - good example" src="/wp-content/uploads/2011/02/xlt-memory-and-gc-charts-good-200x200.png" alt="" width="200" height="200" /></a><p class="wp-caption-text">Perfect GC behavior</p></div>
<p>This is a chart displays nice memory statistics that indicate absolutely no problems with the garbage collection. As you can see the memory usage (first chart in the image) is alternating but never touching the upper limit. The second chart gives you the times when full garbage collection occurred, basically these are the bad events. Events that block the virtual machine from continuing to run. We should avoid these at any cost&#8230; nearly, because a full GC is costly. There was only one full GC right at the beginning at the test. This is a normal JVM behavior. So we seem to have done a pretty good job. No major collection of garbage. Sweat!</p>
<p>There are still the minor collections. Minor collections occur frequently and they reclaim small portions of memory with short living objects. The third charts shows us, that minor collection took about 10 to 30 ms, some spikes up to 70 ms. This is acceptable.</p>
<div class="wp-caption aligncenter" style="width: 210px"><a rel="lightbox" href="/wp-content/uploads/2011/02/xlt-memory-and-gc-charts-bad.png"><img title="Example of XLT memory example with bad data" src="/wp-content/uploads/2011/02/xlt-memory-and-gc-charts-bad-200x200.png" alt="" width="200" height="200" /></a><p class="wp-caption-text">GC with Issues</p></div>
<p>Ok, let&#8217;s have a bad example in comparison. It runs with almost default VM settings. This means just min and max heap were set (Xms256MB/Xmx512MB). You can see clearly that a lot of major collections were running for up to 800 ms each. Also the minor collections were longer.</p>
<p>Clearly, the new charts help you see and fix misbehavior quickly. &#8220;What about the settings?&#8221; you might ask now. Yes, this example is not very helpful without revealing the difference between both test runs. So, we will give you the settings of the good one. The bad run had only Xms and Xmx set, as mentioned before.</p>
<blockquote>
<pre>## Set minimum memory to use
-Xms512m

## Set maximum permitted memory
-Xmx512m

## Enable concurrent old GC to avoid sudden long pauses
-XX:+UseConcMarkSweepGC

## When to start GC for the tenured/old area of the memory.
## This has to be low enough to avoid that threads need
## memory and can not get any before the GC has finished.
## This will lower the wait time.
-XX:CMSInitiatingOccupancyFraction=70
</pre>
</blockquote>
<p>That&#8217;s really all. The use of the Concurrent-Mark-Sweep-Collector (CMS) is the most important setting. The CMS does not block the main VM worker threads, but collects the garbage concurrently. Because there might be situations were the CMS collector is not fast enough in cleaning up, this means the old space runs out of free memory, we give the CMS a hint with the last line. This line explicitly tells the CMS to start early with the clean up. In this case at a 70% fill level. The default is 96% and way too high.</p>
<p>One last thing. Setting Xms and Xmx to the same number helps the VM to relax because it will not try to get back to the minimal memory limit (Xms) and so it cleans less aggressively.</p>
<p>If you want to lean more about Java Garbage Collection, take a look at this Oracle documents: <a href="http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html">GC Tuning</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2011/02/17/xlt-garbage-collector-details-visualized/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is the state of the G1 Garbage Collector?</title>
		<link>http://blog.xceptance.com/2010/07/31/what-is-the-state-of-the-g1-garbage-collector/</link>
		<comments>http://blog.xceptance.com/2010/07/31/what-is-the-state-of-the-g1-garbage-collector/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 18:39:36 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[XLT]]></category>
		<category><![CDATA[G1]]></category>
		<category><![CDATA[garbage collection]]></category>
		<category><![CDATA[gc]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=465</guid>
		<description><![CDATA[Because I do not know what is the current state of the Java G1 Garbage Collector, I decided to try G1 with JDK6u20. Somehow I was disappointed because after a short moment of predictable GC performance, the entire VM stopped and some major collection was running. You can easily see that in the charts of [...]]]></description>
			<content:encoded><![CDATA[<p>Because I do not know what is the current state of the Java G1 Garbage Collector, I decided to try G1 with JDK6u20. Somehow I was disappointed because after a short moment of predictable GC performance, the entire VM stopped and some major collection was running. You can easily see that in the charts of that run. Right around 20:09:45, the threads were stopped and the entire VM behaved ugly.</p>
<p><a rel="lightbox" href="/wp-content/uploads/2010/07/SearchResult.png"><img class="aligncenter size-medium wp-image-466" title="The G1 stop the world" src="http://blog.xceptance.de/wp-content/uploads/2010/07/SearchResult-300x100.png" alt="The G1 stop the world" width="300" height="100" /></a></p>
<p>So, the G1 is not yet ready for production, of course nobody stated that it is ready for production. If I read the release notes of JDK6u21 correctly, it delivers plenty of G1 changes, so I might try that soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2010/07/31/what-is-the-state-of-the-g1-garbage-collector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse und Ubuntu 9.10</title>
		<link>http://blog.xceptance.com/2010/01/05/eclipse-und-ubuntu-9-10/</link>
		<comments>http://blog.xceptance.com/2010/01/05/eclipse-und-ubuntu-9-10/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 10:39:57 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Things went wrong]]></category>
		<category><![CDATA[XLT]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[gdk]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=380</guid>
		<description><![CDATA[Wer seine eigene Eclipse-Installation unter Ubuntu 9.10 betreibt bzw. ältere Versionen von Eclipse im Einsatz hat, der kennt evenutell Probleme mit Buttons. Diese lassen sich oft mit der Maus nicht klicken oder anwählen. Nur mit Hife der Tastatur kann man noch etwas ausrichten. Das Ganze ist ein bekanntes Problem seit Ubuntu 9.10 und sollte mit [...]]]></description>
			<content:encoded><![CDATA[<p>Wer seine eigene Eclipse-Installation unter Ubuntu 9.10 betreibt bzw. ältere Versionen von Eclipse im Einsatz hat, der kennt evenutell Probleme mit Buttons. Diese lassen sich oft mit der Maus nicht klicken oder anwählen. Nur mit Hife der Tastatur kann man noch etwas ausrichten. </p>
<p>Das Ganze ist ein bekanntes Problem seit Ubuntu 9.10 und sollte mit Eclipse 3.5.1 weg sein. Wenn das aber keine Lösung ist, dann muss man seine Umgebung mit diesem Parameter anpassen:</p>
<blockquote><p>
GDK_NATIVE_WINDOWS=true
</p></blockquote>
<p>Danach funktioniert es wieder. Die Lösung habe ich hier gefunden: <a href="http://www.widdix.de/2009/12/01/eclipse-unter-ubuntu-9-10/">Widdix &#8211; Eclipse unter Ubuntu 9.10</a> und <a href="http://www.norio.be/blog/2009/10/problems-eclipse-buttons-ubuntu-910">hier gibt es mehr dazu in Englisch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2010/01/05/eclipse-und-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java-GC unter die Haube schauen</title>
		<link>http://blog.xceptance.com/2009/11/16/java-gc-unter-die-haube-schauen/</link>
		<comments>http://blog.xceptance.com/2009/11/16/java-gc-unter-die-haube-schauen/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 19:01:02 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[entwicklung]]></category>
		<category><![CDATA[gc]]></category>
		<category><![CDATA[optimierung]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=359</guid>
		<description><![CDATA[Diese Optionen für das JDK6 sollte man kennen, wenn man dem Garbage Collector bei der Arbeit zusehen will. Speziell für das GC-Tuning sind diese Optionen unerlässlich: -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintReferenceGC Details zu den Optionen und zur Auswertung kann man unter GC Tuning oder in der Liste der JDK-Optionen finden.]]></description>
			<content:encoded><![CDATA[<p>Diese Optionen für das JDK6 sollte man kennen, wenn man dem Garbage Collector bei der Arbeit zusehen will. Speziell für das GC-Tuning sind diese Optionen unerlässlich:</p>
<blockquote>
<pre>
-verbose:gc
-XX:+PrintGCDetails
-XX:+PrintGCTimeStamps
-XX:+PrintGCApplicationStoppedTime
-XX:+PrintReferenceGC</pre>
</blockquote>
<p>Details zu den Optionen und zur Auswertung kann man unter <a href="http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html">GC Tuning</a> oder in der <a href="http://blogs.sun.com/watt/resource/jvm-options-list.html">Liste der JDK-Optionen</a> finden.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2009/11/16/java-gc-unter-die-haube-schauen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java zeichnet langsam unter Windows</title>
		<link>http://blog.xceptance.com/2009/04/09/java-zeichnet-langsam-unter-windows/</link>
		<comments>http://blog.xceptance.com/2009/04/09/java-zeichnet-langsam-unter-windows/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 14:03:43 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[grafik]]></category>
		<category><![CDATA[optimierung]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=200</guid>
		<description><![CDATA[Wer das Problem hat, dass seine Java-Anwendung &#8211; zum Beispiel Freemind oder Visual GC &#8211; unter Windows wie in Zeitlupe die Fensterinhalte malt, der sollte mal diesen Parameter ausprobieren: -Dsun.java2d.noddraw=true Mehr dazu findet sich bei Sun unter Graphics Performance Improvements.]]></description>
			<content:encoded><![CDATA[<p>Wer das Problem hat, dass seine Java-Anwendung &#8211; zum Beispiel Freemind oder Visual GC &#8211; unter Windows wie in Zeitlupe die Fensterinhalte malt, der sollte mal diesen Parameter ausprobieren:</p>
<pre>-Dsun.java2d.noddraw=true</pre>
<p>Mehr dazu findet sich bei Sun unter <a href="http://java.sun.com/products/java-media/2D/perf_graphics.html">Graphics Performance Improvements</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2009/04/09/java-zeichnet-langsam-unter-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Singletons auf die faule Art</title>
		<link>http://blog.xceptance.com/2009/03/24/singletons-auf-die-faule-art/</link>
		<comments>http://blog.xceptance.com/2009/03/24/singletons-auf-die-faule-art/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 19:36:20 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[entwicklung]]></category>
		<category><![CDATA[fehler]]></category>
		<category><![CDATA[parallelität]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[programmierung]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=197</guid>
		<description><![CDATA[Wir hatten heute eine kurze Diskussion über Singletons und die Art und Weise ihrer Erzeugung, speziell wenn man sie faul (lazy) erzeugen möchte. Die Wikipedia hat dazu diesen schönen Eintrag &#8211; On Demand Holder Idiom: In software engineering, the Initialization on Demand Holder idiom (design pattern) is a lazy-loaded singleton. The idiom can be implemented [...]]]></description>
			<content:encoded><![CDATA[<p>Wir hatten heute eine kurze Diskussion über Singletons und die Art und Weise ihrer Erzeugung, speziell wenn man sie faul (lazy) erzeugen möchte. Die Wikipedia hat dazu diesen schönen Eintrag &#8211; <a href="http://en.wikipedia.org/wiki/Initialization_on_demand_holder_idiom">On Demand Holder Idiom:</a></p>
<blockquote><p>In software engineering, the Initialization on Demand Holder idiom (design pattern) is a lazy-loaded singleton. The idiom can be implemented in both single-threaded/serial and concurrent environments, but care must be taken to correctly implement the idiom under concurrent conditions.</p></blockquote>
<p>Ganz besondern wichtig ist die Erklärung, warum Lazy in diesem Fall so und nicht anders funktioniert:</p>
<blockquote><p>The implementation relies on the well-specified initialization phase of execution within the Java Virtual Machine (JVM); see section <a class="external text" title="http://java.sun.com/docs/books/jls/third_edition/html/execution.html#44557" rel="nofollow" href="http://java.sun.com/docs/books/jls/third_edition/html/execution.html#44557">12.4 of Java Language Specification</a> (JLS) for details.</p>
<p>When the class <strong>Something</strong> is loaded by the JVM, the class goes through initialization. Since the class does not have any static variables to initialize, the initialization completes trivially. The static class definition <strong>LazyHolder</strong> within it is <strong>not</strong> initialized until the JVM determines that <strong>LazyHolder</strong> must be executed. The static class <strong>LazyHolder</strong> is only executed when the static method <strong>getInstance</strong> is invoked on the class <strong>Something</strong>, and the first time this happens the JVM will load and initialize the <strong>LazyHolder</strong> class.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2009/03/24/singletons-auf-die-faule-art/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>G1 &#8211; Garbage First Collector</title>
		<link>http://blog.xceptance.com/2009/02/14/g1-garbage-first-collector/</link>
		<comments>http://blog.xceptance.com/2009/02/14/g1-garbage-first-collector/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 23:25:43 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Quotations]]></category>
		<category><![CDATA[gc]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=160</guid>
		<description><![CDATA[Für das Sun JDK deutet sich ein neuer Garbage Collector an, der ein anderes Herangehen hat und damit lange  Pausen noch deutlicher als der CMS vermeiden soll. Dem geneigten Leser sei dieser Artikel empfohlen: The Garbage First Collector! Im JDK 6v14 könnten wir ihn vielleicht sehen. Ich bin schon ganz aufgeregt, da ich mittlerweile oft [...]]]></description>
			<content:encoded><![CDATA[<p>Für das Sun JDK deutet sich ein neuer Garbage Collector an, der ein anderes Herangehen hat und damit lange  Pausen noch deutlicher als der CMS vermeiden soll. Dem geneigten Leser sei dieser Artikel empfohlen: <a href="http://www.fasterj.com/articles/G1.shtml">The Garbage First Collector!</a></p>
<p>Im JDK 6v14 könnten wir ihn vielleicht sehen. Ich bin schon ganz aufgeregt, da ich mittlerweile oft und viel mit GC-Internas hantiere&#8230; keine Wunder bei Lasttests gegen 120 CPUs mit Java drauf.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2009/02/14/g1-garbage-first-collector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java und Virtuelle Server (VPS)</title>
		<link>http://blog.xceptance.com/2008/10/28/java-und-virtuelle-server-vps/</link>
		<comments>http://blog.xceptance.com/2008/10/28/java-und-virtuelle-server-vps/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 08:04:11 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[heap]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[probleme]]></category>
		<category><![CDATA[speicher]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=78</guid>
		<description><![CDATA[Wer sich einen virtuellen Server gemietet hat und sich quält, Java vernünftig zum Laufen zu bringen, dem sei dieser Artikel ans Herz gelegt: Java Web Hosting HowTo &#8211; vServer memory and Java heap size trouble. Java Virtual Machines and Linux virtual Servers do not play well with each other all the time. Some tweaking and [...]]]></description>
			<content:encoded><![CDATA[<p>Wer sich einen virtuellen Server gemietet hat und sich quält, Java vernünftig zum Laufen zu bringen, dem sei dieser Artikel ans Herz gelegt: <a href="http://www.groovygrails.de/blog/groovygrails/entry/low_cost_grails_java_web2">Java Web Hosting HowTo &#8211; vServer memory and Java heap size trouble.</a></p>
<blockquote><p>Java Virtual Machines and Linux virtual Servers do not play well with each other all the time. Some tweaking and configuration will be necessary to get it working and optimize the use of the (memory) resources.</p></blockquote>
<p>Die VPS / Virtuellen Server haben leider die Angewohnheit, den Speicher als zu gross zu melden. Sie melden den Gesamtspeicher des Hosts und nicht den Speicher des Virtuellen Servers. Deswegen schlägt Java gnadenlos zu, und versucht sich reinzuoptimieren. Die einzige Lösung ist die Limitierung des Speichers schon beim Start von Java mit <em>-Xm</em>s und <em>-Xmx</em>, um die Selbstoptimierung von Java zu umgehen.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2008/10/28/java-und-virtuelle-server-vps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Softreferenzen gehen jederzeit</title>
		<link>http://blog.xceptance.com/2008/10/22/softreferenzen-java-gc/</link>
		<comments>http://blog.xceptance.com/2008/10/22/softreferenzen-java-gc/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 06:00:08 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[gc]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=71</guid>
		<description><![CDATA[Softreferenzen (soft references) in Java sind eine tolle Sache, denn es lassen sich tolle Caches und Notfallszenarien damit bauen. Was kaum jemand weiß, dass Softreferenzen nicht nur im Falle von akuter Speicherknappheit freigegeben werden, sondern durchaus auch früher. Letzteres kann zu unerwarteten Nebenwirkungen führen, speziell mit Blick auf Caching. Soft references are kept alive longer [...]]]></description>
			<content:encoded><![CDATA[<p>Softreferenzen (soft references) in Java sind eine tolle Sache, denn es lassen sich tolle Caches und Notfallszenarien damit bauen. Was kaum jemand weiß, dass Softreferenzen nicht nur im Falle von akuter Speicherknappheit freigegeben werden, sondern durchaus auch früher. Letzteres kann zu unerwarteten Nebenwirkungen führen, speziell mit Blick auf Caching.</p>
<blockquote><p>Soft references are kept alive longer in the server virtual machine than in the client.  The rate of clearing can be controlled with the command line option <kbd>-XX:SoftRefLRUPolicyMSPerMB=&lt;N&gt;</kbd>, which specifies the number of milliseconds a soft reference will be kept alive (once it is no longer strongly reachable) for each megabyte of free space in the heap.</p>
<p>The default value is 1000 ms per megabyte, which means that a soft reference will survive (after the last strong reference to the object has been collected) for 1 second for each megabyte of free space in the heap.  Note that this is an approximate figure since soft references are cleared only during garbage collection, which may occur sporadically.</p></blockquote>
<p>Quelle: <a href="http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html#other_considerations">JDK 6 Garbage Collection Tuning Guide</a></p>
<p>Nachtrag: Erwähnenswert ist auch dieser <a href="http://jeremymanson.blogspot.com/2009/07/how-hotspot-decides-to-clear_07.html">Blogeintrag von Jeremy Manson</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2008/10/22/softreferenzen-java-gc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MAT &#8211; Eclipse Memory Analyzer</title>
		<link>http://blog.xceptance.com/2008/06/26/mat-eclipse-memory-analyzer/</link>
		<comments>http://blog.xceptance.com/2008/06/26/mat-eclipse-memory-analyzer/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 13:52:55 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=16</guid>
		<description><![CDATA[Vom Eclipse-Projekt gibt es jetzt auch einen Memory-Analyzer. Ich probiere das Ding gleich mal aus. Es soll grosse Hprof-Dumps effizient analysieren können. Das wäre genau richtig, schliesslich quälen wir uns oft mit 1-2 GB Files rum.]]></description>
			<content:encoded><![CDATA[<p>Vom Eclipse-Projekt gibt es jetzt auch einen <a href="http://www.eclipse.org/mat/">Memory-Analyzer</a>. Ich probiere das Ding gleich mal aus. Es soll grosse Hprof-Dumps effizient analysieren können. Das wäre genau richtig, schliesslich quälen wir uns oft mit 1-2 GB Files rum.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2008/06/26/mat-eclipse-memory-analyzer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sparen beim String bauen</title>
		<link>http://blog.xceptance.com/2008/06/14/sparen-beim-string-bauen/</link>
		<comments>http://blog.xceptance.com/2008/06/14/sparen-beim-string-bauen/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 15:23:22 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[garbage collection]]></category>
		<category><![CDATA[optimierung]]></category>
		<category><![CDATA[programmierung]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=12</guid>
		<description><![CDATA[Viele Java-Programmiere denken oft beim Schreiben Ihres Codes wenig über Müll nach. Natürlich nimmt man zum Bauen eines Strings aus vielen kleinen Puzzleteilen einen StringBuilder. Den StringBuffer nimmt man nicht mehr, weil der im Regelfall unnötig synchronisiert ist. Schliesslich löst das im Java Memory Model ab JDK 5 eine Synchronisation mit dem Hauptspeicher aus (JSR-133), [...]]]></description>
			<content:encoded><![CDATA[<p>Viele Java-Programmiere denken oft beim Schreiben Ihres Codes wenig über Müll nach. Natürlich nimmt man zum Bauen eines Strings aus vielen kleinen Puzzleteilen einen StringBuilder. Den StringBuffer nimmt man nicht mehr, weil der im Regelfall unnötig synchronisiert ist. Schliesslich löst das im Java Memory Model ab JDK 5 eine Synchronisation mit dem Hauptspeicher aus (JSR-133), die wir überhaupt nicht wollen.</p>
<p>Einen kleinen Trick für unnötige Objekt-Erzeugung und damit für weniger Müll im System, gerade wenn immer wieder Strings gebaut werden müssen, ist die korrekte initiale Größe des StringBuilders. Ein <em>new StringBuilder()</em> reserviert zunächst nur ein Array mit 16 Characters. Wenn wir also recht viel zusammenbauen, muss mehrmals eine neues grösseres Array (2 * ggw. Grösse + 1) erzeugt und der Inhalt umkopiert werden.</p>
<p>Wer also weiss, dass er ca. 100 Zeichen aneinanderhängt, der lässt sich gleich einen StringBuilder mit Grösse 120 geben &#8211; <em>new StringBuilder(120)</em> &#8211; und spart damit das Anlegen von drei Arrays und drei Copy-Operation ein. Gerade bei intensiven Operationen mit Strings macht das eine Menge aus.</p>
<p>Wer würde schon bei einem Umzug zuerst mit dem kleinsten Karton anfangen und dann wegwerfen, weil nicht alles reinpasst? Man schätzt doch am Anfang schon vernünftig ab, wie groß der Karton sein sollte.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2008/06/14/sparen-beim-string-bauen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Concurrency &#8211; A Tutorial</title>
		<link>http://blog.xceptance.com/2008/06/09/java-concurrency-a-tutorial/</link>
		<comments>http://blog.xceptance.com/2008/06/09/java-concurrency-a-tutorial/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 14:41:04 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[parallelität]]></category>
		<category><![CDATA[programmierung]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=11</guid>
		<description><![CDATA[Heute habe ich eine wunderbare Webseite zum Thema Java Concurrency gefunden. Jakob Jenkov hat hier viele interessante Themen zur parallelen Programmierung mit Java zusammengefasst. Ein Bookmark wert und in einer ruhigen Minute unbedingt mal lesen. Java Concurrency &#8211; A Tutorial Java was one of the first languages to make multithreading easily available to developers. Java [...]]]></description>
			<content:encoded><![CDATA[<p>Heute habe ich eine wunderbare Webseite zum Thema Java Concurrency gefunden. Jakob Jenkov hat hier viele interessante Themen zur parallelen Programmierung mit Java zusammengefasst. Ein Bookmark wert und in einer ruhigen Minute unbedingt mal lesen.</p>
<p><a title="Java Concurrency Tutorial" href="http://tutorials.jenkov.com/java-concurrency/index.html">Java Concurrency &#8211; A Tutorial</a></p>
<blockquote><p>Java was one of the first languages to make multithreading easily available to developers. Java had multithreading capabilities from the very beginning. Therefore, Java developers often face the problems described above. That is the reason I am writing this trail on Java concurrency. As notes to myself, and any fellow Java developer whom may benefit from it.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2008/06/09/java-concurrency-a-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LinkedIn-Architektur</title>
		<link>http://blog.xceptance.com/2008/06/05/linkedin-architektur/</link>
		<comments>http://blog.xceptance.com/2008/06/05/linkedin-architektur/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 08:36:13 +0000</pubDate>
		<dc:creator>Rene</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[architektur]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[lucene]]></category>

		<guid isPermaLink="false">http://blog.xceptance.de/?p=10</guid>
		<description><![CDATA[Wer gern mal wissen möchte, wie moderne grosse Webseiten laufen, der kann sich hier die LinkedIn-Architecture anschauen und durchlesen. Und wieder ist Lucene die Search-Engine der Wahl. Interessant ist der LinkedIn-Network-Graph, der in Memory gehalten wird&#8230; 12 GB RAM. Einzig die Behauptung Garbage Collection pauses were killing them. [LinkedIn said they were using advanced GC's, [...]]]></description>
			<content:encoded><![CDATA[<p>Wer gern mal wissen möchte, wie moderne grosse Webseiten laufen, der kann sich hier die <a href="http://cookiesareforclosers.com/blog/2008/06/linkedin-architecture">LinkedIn-Architecture</a> anschauen und durchlesen. Und wieder ist Lucene die Search-Engine der Wahl. Interessant ist der LinkedIn-Network-Graph, der in Memory gehalten wird&#8230; 12 GB RAM.</p>
<p>Einzig die Behauptung</p>
<blockquote><p>Garbage Collection pauses were killing them. [LinkedIn said they were using advanced GC's, but GC's have improved since 2003; is this still a problem today?]</p></blockquote>
<p>kann ich nicht glauben. Deswegen wurde die Graph-Engine in C geschrieben. Ich denke mal, da war komplett etwas falsch, wenn der GC austickt.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xceptance.com/2008/06/05/linkedin-architektur/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

