<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Piotr Gabryanczyk's Blog &#187; jvm</title>
	<atom:link href="http://piotrga.wordpress.com/category/jvm/feed/" rel="self" type="application/rss+xml" />
	<link>http://piotrga.wordpress.com</link>
	<description>Java, Refactoring, AOP, Spring, DDD, TDD, etc.</description>
	<lastBuildDate>Mon, 29 Jun 2009 09:47:45 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='piotrga.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/d2a4bd750e12ba6846cb9ee2dea2ea8e?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Piotr Gabryanczyk's Blog &#187; jvm</title>
		<link>http://piotrga.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://piotrga.wordpress.com/osd.xml" title="Piotr Gabryanczyk&#8217;s Blog" />
		<item>
		<title>IntelliJ idea.exe.vmoptions revised for version 7 and JDK 6</title>
		<link>http://piotrga.wordpress.com/2007/06/26/intellij-ideaexevmoptions-revised-for-version-7-and-jdk-6/</link>
		<comments>http://piotrga.wordpress.com/2007/06/26/intellij-ideaexevmoptions-revised-for-version-7-and-jdk-6/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 10:38:51 +0000</pubDate>
		<dc:creator>Piotr Gabryanczyk</dc:creator>
				<category><![CDATA[intellij]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jvm]]></category>

		<guid isPermaLink="false">http://piotrga.wordpress.com/2007/06/26/intellij-ideaexevmoptions-revised-for-version-7-and-jdk-6/</guid>
		<description><![CDATA[IntelliJ 7 was a bit unstable with JDK 1.6 on previous set of options I presented on this blog so I decided to tweak it again.
Here are the options I ended up with:
-Xms256m
-Xmx256m
-XX:MaxPermSize=150m
-XX:MaxGCPauseMillis=10
–XX:MaxHeapFreeRatio=70
-XX:+UseConcMarkSweepGC
–XX:+CMSIncrementalPacing
-Didea.no.jdk.check=true
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=piotrga.wordpress.com&blog=595023&post=20&subd=piotrga&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>IntelliJ 7 was a bit unstable with JDK 1.6 on <a href="http://piotrga.wordpress.com/2006/12/12/intellij-and-garbage-collection/">previous set of options</a> I presented on this blog so I decided to tweak it again.</p>
<p>Here are the options I ended up with:</p>
<p>-Xms256m<br />
-Xmx256m<br />
-XX:MaxPermSize=150m<br />
-XX:MaxGCPauseMillis=10<br />
–XX:MaxHeapFreeRatio=70<br />
-XX:+UseConcMarkSweepGC<br />
–XX:+CMSIncrementalPacing<br />
-Didea.no.jdk.check=true</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/piotrga.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/piotrga.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/piotrga.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/piotrga.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/piotrga.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/piotrga.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/piotrga.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/piotrga.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/piotrga.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/piotrga.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/piotrga.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/piotrga.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=piotrga.wordpress.com&blog=595023&post=20&subd=piotrga&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://piotrga.wordpress.com/2007/06/26/intellij-ideaexevmoptions-revised-for-version-7-and-jdk-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d9b2bf89a10d0dfd765c2e95e8435bd8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Piotr Gabryanczyk</media:title>
		</media:content>
	</item>
		<item>
		<title>Closures in Java &#8211; catching up with Smalltalk?</title>
		<link>http://piotrga.wordpress.com/2007/03/31/closures-in-java-catching-up-smalltalk/</link>
		<comments>http://piotrga.wordpress.com/2007/03/31/closures-in-java-catching-up-smalltalk/#comments</comments>
		<pubDate>Sat, 31 Mar 2007 00:46:19 +0000</pubDate>
		<dc:creator>Piotr Gabryanczyk</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[jvm]]></category>

		<guid isPermaLink="false">http://piotrga.wordpress.com/2007/03/31/closures-in-java-catching-up-smalltalk/</guid>
		<description><![CDATA[I was recently very happy to discover that there is proposal for closures in java. I have been waiting for this to happen since I haven&#8217;t even started programming in java in 1998, when I learned Smalltalk and wrote quite a useful system within two weeks in it.
I like most of the ideas in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=piotrga.wordpress.com&blog=595023&post=17&subd=piotrga&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I was recently very happy to discover that there is <a href="http://www.javac.info/closures-v05.html">proposal for closures in java</a>. I have been waiting for this to happen since I haven&#8217;t even started programming in java in 1998, when I learned Smalltalk and wrote quite a useful system within two weeks in it.</p>
<p>I like most of the ideas in the proposal &#8211; good job gentelman! (no ladies participated yet&#8230;)</p>
<p>One thing which I find annoying is the declaration of types for the parameters of the closure, i.e.<br />
<code><br />
runWithinTransaction(){<br />
  <strong>Transaction txn, Session s</strong> =&gt;<br />
  ...<br />
}<br />
</code></p>
<p>It seams to me that if runWithinTransaction() accepts {Transaction txn, Session s =&gt; boolean} closure type, it is kind of redundant to repeat the types of parameters in the closure itself. So I would appreciate a bit of syntactic sugar here (or actually lack of it)  and do it as follows:<br />
<code><br />
runWithinTransaction(){<br />
  txn, s =&gt;<br />
  ...<br />
}<br />
</code></p>
<p>Or even like other languages (Smalltalk, Ruby):<br />
<code><br />
runWithinTransaction(){  |txn, s| ... }<br />
</code></p>
<p>I know I might sound like an ignorant here. The compiler writers will have more difficult job with guessing types of the parameters.<br />
Purists might also start crying about lack of explicity here, as you can&#8217;t see the parameters type at the first sight&#8230; Come on it is no worse than casts when using collections in java under 1.5.</p>
<p>I wish we will see closures in java soon!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/piotrga.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/piotrga.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/piotrga.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/piotrga.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/piotrga.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/piotrga.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/piotrga.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/piotrga.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/piotrga.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/piotrga.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/piotrga.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/piotrga.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=piotrga.wordpress.com&blog=595023&post=17&subd=piotrga&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://piotrga.wordpress.com/2007/03/31/closures-in-java-catching-up-smalltalk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d9b2bf89a10d0dfd765c2e95e8435bd8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Piotr Gabryanczyk</media:title>
		</media:content>
	</item>
		<item>
		<title>IntelliJ and Garbage Collection</title>
		<link>http://piotrga.wordpress.com/2006/12/12/intellij-and-garbage-collection/</link>
		<comments>http://piotrga.wordpress.com/2006/12/12/intellij-and-garbage-collection/#comments</comments>
		<pubDate>Tue, 12 Dec 2006 12:28:32 +0000</pubDate>
		<dc:creator>Piotr Gabryanczyk</dc:creator>
				<category><![CDATA[intellij]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jvm]]></category>

		<guid isPermaLink="false">http://piotrga.wordpress.com/2006/12/12/intellij-and-garbage-collection/</guid>
		<description><![CDATA[I recently read the article about garbage collection (here) and decided to tweak my IntelliJ settings.
I am using IntelliJ 6.0.2 and JDK 1.5.0_08.
I ended up with the following settings:
-Xms256m
-Xmx512m
-XX:MaxPermSize=200m
-XX:MaxGCPauseMillis=10
–XX:MaxHeapFreeRatio=70
-XX:+UseConcMarkSweepGC
–XX:+CMSIncrementalPacing
Let&#8217;s explain them:
Heap size
-Xms256m
-Xmx512m
The more the better&#8230;
Perm size
IntelliJ likes a lot of memory for caching references and class meta information. That is why we need to make [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=piotrga.wordpress.com&blog=595023&post=11&subd=piotrga&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I recently read the article about garbage collection (<a href="https://java.sun.com/j2se/reference/whitepapers/memorymanagement_whitepaper.pdf" target="_blank">here</a>) and decided to tweak my IntelliJ settings.</p>
<p>I am using <span style="font-weight:bold;">IntelliJ 6.0.2</span> and <span style="font-weight:bold;">JDK 1.5.0_08</span>.</p>
<p>I ended up with the following settings:</p>
<p>-Xms256m<br />
-Xmx512m<br />
-XX:MaxPermSize=200m<br />
-XX:MaxGCPauseMillis=10<br />
–XX:MaxHeapFreeRatio=70<br />
-XX:+UseConcMarkSweepGC<br />
–XX:+CMSIncrementalPacing</p>
<p>Let&#8217;s explain them:</p>
<h2>Heap size</h2>
<p><strong>-Xms256m<br />
-Xmx512m</strong></p>
<p>The more the better&#8230;</p>
<h2>Perm size</h2>
<p>IntelliJ likes a lot of memory for caching references and class meta information. That is why we need to make sure that cache is not purged. Cache is stored in &#8220;Old Generation&#8221; space  which size is determined by the following option</p>
<p><strong> -XX:MaxPermSize=200m</strong></p>
<p>200m is good for the size of project I am using. General rule is to observe memory indicator after using <em>find symbol </em>option with <em>include non project files </em>selected. If it doesn&#8217;t move you have chosen enough memory.</p>
<h2>Maximum Pause</h2>
<p><strong>-XX:MaxGCPauseMillis=10</strong></p>
<p>We ask GC to pause the application for no more then 10 milliseconds.</p>
<h2>Proportion of free space</h2>
<p><strong>-XX:MaxHeapFreeRatio=70</strong></p>
<p>We ask GC to kick off when more than 30% of memory is occupied, so when we start compilation GC will not interfere because it will be enough memory free.</p>
<h2>Concurrent Mark-Sweep (CMS) Collector</h2>
<p><strong>-XX:+UseConcMarkSweepGC </strong></p>
<p>We want GC to run in parallel with other threads without freezing the application. This option doesn&#8217;t stop GC from freezing the application but it reduces it significantly.</p>
<h2>Incremental Mode</h2>
<p><strong>–XX:+CMSIncrementalPacing</strong></p>
<p>We don&#8217;t wont to freeze the application so we do GC incrementally with breaks so the application can take a breath. We use Pacing so GC can learn how to use CPU based on application CPU usage.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/piotrga.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/piotrga.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/piotrga.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/piotrga.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/piotrga.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/piotrga.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/piotrga.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/piotrga.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/piotrga.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/piotrga.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/piotrga.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/piotrga.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=piotrga.wordpress.com&blog=595023&post=11&subd=piotrga&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://piotrga.wordpress.com/2006/12/12/intellij-and-garbage-collection/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d9b2bf89a10d0dfd765c2e95e8435bd8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Piotr Gabryanczyk</media:title>
		</media:content>
	</item>
	</channel>
</rss>