<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How much memory does my ColdFusion variable really use? – Part III</title>
	<atom:link href="http://bloginblack.de/2010/03/how-much-memory-does-my-coldfusion-variable-really-use-%e2%80%93-part-iii/feed/" rel="self" type="application/rss+xml" />
	<link>http://bloginblack.de/2010/03/how-much-memory-does-my-coldfusion-variable-really-use-%e2%80%93-part-iii/</link>
	<description>Protecting the web from bad ColdFusion code (since 2003)</description>
	<lastBuildDate>Thu, 09 Feb 2012 08:37:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Joel Spriggs</title>
		<link>http://bloginblack.de/2010/03/how-much-memory-does-my-coldfusion-variable-really-use-%e2%80%93-part-iii/comment-page-1/#comment-23613</link>
		<dc:creator>Joel Spriggs</dc:creator>
		<pubDate>Fri, 19 Nov 2010 14:00:39 +0000</pubDate>
		<guid isPermaLink="false">http://bloginblack.de/?p=1241#comment-23613</guid>
		<description>I spoke to soon, problem is I run CF standalone.  So the jar goes to /Applications/Coldfusion9/runtime/lib instead of /Applications/Coldfusion9/lib and the jvm argument to add into jvm.config was -javaagent:{application.home}/lib/CFMemoryAgent.jar

Thanks!</description>
		<content:encoded><![CDATA[<p>I spoke to soon, problem is I run CF standalone.  So the jar goes to /Applications/Coldfusion9/runtime/lib instead of /Applications/Coldfusion9/lib and the jvm argument to add into jvm.config was -javaagent:{application.home}/lib/CFMemoryAgent.jar</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel Spriggs</title>
		<link>http://bloginblack.de/2010/03/how-much-memory-does-my-coldfusion-variable-really-use-%e2%80%93-part-iii/comment-page-1/#comment-23610</link>
		<dc:creator>Joel Spriggs</dc:creator>
		<pubDate>Fri, 19 Nov 2010 13:51:47 +0000</pubDate>
		<guid isPermaLink="false">http://bloginblack.de/?p=1241#comment-23610</guid>
		<description>Did anyone ever figure out the jvm arguments to correctly initialise the env? I&#039;ve tried the suggestions and keep getting java.lang.IllegalStateException: Instrumentation environment not initialised.</description>
		<content:encoded><![CDATA[<p>Did anyone ever figure out the jvm arguments to correctly initialise the env? I&#8217;ve tried the suggestions and keep getting java.lang.IllegalStateException: Instrumentation environment not initialised.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kai</title>
		<link>http://bloginblack.de/2010/03/how-much-memory-does-my-coldfusion-variable-really-use-%e2%80%93-part-iii/comment-page-1/#comment-3043</link>
		<dc:creator>kai</dc:creator>
		<pubDate>Sun, 25 Apr 2010 02:43:32 +0000</pubDate>
		<guid isPermaLink="false">http://bloginblack.de/?p=1241#comment-3043</guid>
		<description>Hi Jay, thx for pointing jVisualVM out. There are a few tools around that do stuff like that and also look deeper into things like garbage collection etc.

I agree - those settings are not something you constantly would want to run in production.</description>
		<content:encoded><![CDATA[<p>Hi Jay, thx for pointing jVisualVM out. There are a few tools around that do stuff like that and also look deeper into things like garbage collection etc.</p>
<p>I agree &#8211; those settings are not something you constantly would want to run in production.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay</title>
		<link>http://bloginblack.de/2010/03/how-much-memory-does-my-coldfusion-variable-really-use-%e2%80%93-part-iii/comment-page-1/#comment-2969</link>
		<dc:creator>Jay</dc:creator>
		<pubDate>Thu, 22 Apr 2010 22:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://bloginblack.de/?p=1241#comment-2969</guid>
		<description>Kai, thank you for replying.  it actually works now.  I added it again to the args in order to test it before I send you the information here and now it works.  perhaps I had a typo yesterday and that&#039;s why it didn&#039;t work.

while I was still trying to get it to work yesterday, I found the jVisualVM monitor that comes with the JDK.  you need to start the JVM with the switches below (which might not be a good idea for a production server), but then you can generate thread and heap dumps and look deep into the results to find out memory allocations etc.  pretty cool tool.  I thought that your readers might find it useful.

Jay


java.args: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9500 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

then launch jVisualVM from the JDK\bin folder and connect to localhost:9500 (or whatever port you used in the switches)</description>
		<content:encoded><![CDATA[<p>Kai, thank you for replying.  it actually works now.  I added it again to the args in order to test it before I send you the information here and now it works.  perhaps I had a typo yesterday and that&#8217;s why it didn&#8217;t work.</p>
<p>while I was still trying to get it to work yesterday, I found the jVisualVM monitor that comes with the JDK.  you need to start the JVM with the switches below (which might not be a good idea for a production server), but then you can generate thread and heap dumps and look deep into the results to find out memory allocations etc.  pretty cool tool.  I thought that your readers might find it useful.</p>
<p>Jay</p>
<p>java.args: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9500 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false</p>
<p>then launch jVisualVM from the JDK\bin folder and connect to localhost:9500 (or whatever port you used in the switches)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kai</title>
		<link>http://bloginblack.de/2010/03/how-much-memory-does-my-coldfusion-variable-really-use-%e2%80%93-part-iii/comment-page-1/#comment-2943</link>
		<dc:creator>kai</dc:creator>
		<pubDate>Thu, 22 Apr 2010 08:59:33 +0000</pubDate>
		<guid isPermaLink="false">http://bloginblack.de/?p=1241#comment-2943</guid>
		<description>Jay, have you figured out the javaagent issue? Are you on Windows or Linux/Mac - I wonder if it&#039;s an issue how to specify the path in Windows. Anything in logs and can you provide a bit more info on your setup? The suggestions for the Java code changes are good - the solution discussed here is really just a proof of concept at this stage - I&#039;ll work those changes in a further release, thx!</description>
		<content:encoded><![CDATA[<p>Jay, have you figured out the javaagent issue? Are you on Windows or Linux/Mac &#8211; I wonder if it&#8217;s an issue how to specify the path in Windows. Anything in logs and can you provide a bit more info on your setup? The suggestions for the Java code changes are good &#8211; the solution discussed here is really just a proof of concept at this stage &#8211; I&#8217;ll work those changes in a further release, thx!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay</title>
		<link>http://bloginblack.de/2010/03/how-much-memory-does-my-coldfusion-variable-really-use-%e2%80%93-part-iii/comment-page-1/#comment-2929</link>
		<dc:creator>Jay</dc:creator>
		<pubDate>Wed, 21 Apr 2010 23:15:10 +0000</pubDate>
		<guid isPermaLink="false">http://bloginblack.de/?p=1241#comment-2929</guid>
		<description>cleanup suggestion for the CF object:  add a static array of strings for the types-to-ignore, then use the Arrays.asList( String[] ).contains( ) ) method to test if the type is in the list.  this will allow to easily add more items to the list in the future:

  public static String[] ignoreTypes;

  static {

      ignoreTypes = new String[] {
          
          &quot;coldfusion.runtime.NeoPageContext&quot;,
          &quot;coldfusion.runtime.CfJspPage&quot;,
          &quot;coldfusion.monitor.memory.MemoryTrackable&quot;,
          &quot;coldfusion.monitor.sql.QueryStat&quot;,
          &quot;coldfusion.monitor.memory.MemoryTrackerProxy&quot;,
          &quot;javax.servlet.ServletContext&quot;
      };
  }


then in the internalSizeOf() method, replace all the type tests with

  !Arrays.asList( ignoreTypes ).contains( field.getType().getName() )</description>
		<content:encoded><![CDATA[<p>cleanup suggestion for the CF object:  add a static array of strings for the types-to-ignore, then use the Arrays.asList( String[] ).contains( ) ) method to test if the type is in the list.  this will allow to easily add more items to the list in the future:</p>
<p>  public static String[] ignoreTypes;</p>
<p>  static {</p>
<p>      ignoreTypes = new String[] {</p>
<p>          &#8220;coldfusion.runtime.NeoPageContext&#8221;,<br />
          &#8220;coldfusion.runtime.CfJspPage&#8221;,<br />
          &#8220;coldfusion.monitor.memory.MemoryTrackable&#8221;,<br />
          &#8220;coldfusion.monitor.sql.QueryStat&#8221;,<br />
          &#8220;coldfusion.monitor.memory.MemoryTrackerProxy&#8221;,<br />
          &#8220;javax.servlet.ServletContext&#8221;<br />
      };<br />
  }</p>
<p>then in the internalSizeOf() method, replace all the type tests with</p>
<p>  !Arrays.asList( ignoreTypes ).contains( field.getType().getName() )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay</title>
		<link>http://bloginblack.de/2010/03/how-much-memory-does-my-coldfusion-variable-really-use-%e2%80%93-part-iii/comment-page-1/#comment-2928</link>
		<dc:creator>Jay</dc:creator>
		<pubDate>Wed, 21 Apr 2010 23:03:11 +0000</pubDate>
		<guid isPermaLink="false">http://bloginblack.de/?p=1241#comment-2928</guid>
		<description>I keep getting an error: &quot;Instrumentation environment not initialised&quot;

I realize that this is because the -javaagent switch is not configured properly.  I have tried to put it in the jvm.config under 
  java.args=-server -javaagent:[path on my server]/MemoryCounterAgent.jar [more args follow...]
but I keep getting th error.

any ideas?

tia,

Jay</description>
		<content:encoded><![CDATA[<p>I keep getting an error: &#8220;Instrumentation environment not initialised&#8221;</p>
<p>I realize that this is because the -javaagent switch is not configured properly.  I have tried to put it in the jvm.config under<br />
  java.args=-server -javaagent:[path on my server]/MemoryCounterAgent.jar [more args follow...]<br />
but I keep getting th error.</p>
<p>any ideas?</p>
<p>tia,</p>
<p>Jay</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kai</title>
		<link>http://bloginblack.de/2010/03/how-much-memory-does-my-coldfusion-variable-really-use-%e2%80%93-part-iii/comment-page-1/#comment-1875</link>
		<dc:creator>kai</dc:creator>
		<pubDate>Tue, 09 Mar 2010 23:56:27 +0000</pubDate>
		<guid isPermaLink="false">http://bloginblack.de/?p=1241#comment-1875</guid>
		<description>@Hendrik Sorry for the broken link, had a typo in the file name. It works now.</description>
		<content:encoded><![CDATA[<p>@Hendrik Sorry for the broken link, had a typo in the file name. It works now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hendrik Kramer</title>
		<link>http://bloginblack.de/2010/03/how-much-memory-does-my-coldfusion-variable-really-use-%e2%80%93-part-iii/comment-page-1/#comment-1873</link>
		<dc:creator>Hendrik Kramer</dc:creator>
		<pubDate>Tue, 09 Mar 2010 22:48:41 +0000</pubDate>
		<guid isPermaLink="false">http://bloginblack.de/?p=1241#comment-1873</guid>
		<description>Very interesting article. I&#039;ll try it within the next days on some parts of our codebase. But the link to the zip is not working (yet)? Link returns &quot;not found&quot; here.</description>
		<content:encoded><![CDATA[<p>Very interesting article. I&#8217;ll try it within the next days on some parts of our codebase. But the link to the zip is not working (yet)? Link returns &#8220;not found&#8221; here.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

