Google

Wednesday, June 27, 2007

Server Monitoring Rocks!

I promised to write about CFThread….but not finding enough time due to the hectic QA work. I am assigned to guage the performance of ColdFusion 8 and this is taking away all my time. Well performance testing is not all bad. It does throw you some cool challenges! And here is one such challenge I faced I like to share....And guess what, my story is a use-case for SERVER MONITORING! SERVER MONITORING helped me debug a serious problem with my performance testing setup! Well, rather easily!

I was assigned the task to compare performance of ColdFusion MX 7 and ColdFusion 8 using a customer application (don’t ask me which application I chose:) ). I used JMeter to simulate a 30VU load. I noticed something really bad. The jrun process working set increased linearly as the test progressed. When the memory hit the threshold (defined by the xmx java arg in jvm.config), the throughput would start dropping drastically. Perf numbers would sway wildly. I was puzzled. I tried increasing xmx but that didn’t help much. It just postponed my throughput drop by a few minutes. I was pretty sure that ColdFusion wouldn’t be the culprit (optimist as I am :) and started to suspect the application (Oh!).

Server Monitoring came to my rescue. I switched ON MEMORY TRACKING on SM for one of the runs to find out memory usage. I was startled to see that the culprit was session memory. A huge number of sessions were getting created. It was not difficult to figure out that each request was creating a new session. This means my cookie settings on the JMeter tool was improper. The culprit was actually me doing a wrong configuration setting on JMeter. I hadn't enabled Cookie Manager in JMeter. I enabled the HTTP Cookie Manager on JMeter and voila! Everything worked fine and as expected! The session memory didn’t increase and stabilized at some point. This should be because one session is created per virtual user which is what the case should be! It couldn’t have been that easy to isolate the problem if not server monitor. SERVER MONITORING ROCKS!

Sunday, June 10, 2007

CF 8 New Features - cfloop enhancements!


I plan to introduce the new features of Coldfusion 8. To start it off, here are the enhancements to cfloop. The simple-to-use cfloop has just got richer. Now, you can loop through files and arrays using cfloop!


  • Read file using cfloop


  • <html>
    <head><title>CFLoop over a file</title></head>

    <cfset fileName = ExpandPath('./') & "tempFile.txt">
    <cfif fileExists(fileName)>
    <cfset fileDelete(fileName)>
    </cfif>

    <cfset fileObj = FileOpen(fileName,"Append")>
    <cfloop from="1" to="10" index="i">
    <cfset content = "Line Number " & i>
    <cfset FileWriteLine(fileObj, content)>
    </cfloop>

    <cfset i = 0>
    <---If you want to read 'caracters' instead of 'lines', use the "characters" attribute!--->
    <cfloop file="#fileName#" index="line">
    <cfoutput>#line#<br></cfoutput>
    <cfset i++>
    </cfloop>
    <cfoutput>#i# lines of code were read<br></cfoutput>

    <cfdump var="#getFileInfo(fileName)#">

    <cfset FileClose(fileObj)>

  • Read array using cfloop


  • <cfset adbeStruct = {quoteName="adbe", price="43.01"}>
    <cfset msftStruct = {quoteName="msft", price="30.3"}>
    <cfset googStruct = {quoteName="goog", price="513.5"}>
    <cfset yhooStruct = {quoteName="yhoo", price="53.1"}>
    <cfset aaplStruct = {quoteName="aapl", price="115.4"}>

    <cfset arr1 = [adbeStruct, msftStruct, googStruct, yhooStruct, aaplStruct]>

    <cfloop array=#arr1# index="quoteData">
    <cfoutput>
    <table width=25% border=1>
    <tr>
    <td width=75%>#quoteData.quoteName#</td>
    <td width=25%>#quoteData.price#</td>
    </tr>
    </table>
    </cfoutput>
    </cfloop>


Isn't that simple yet powerful? My next post would talk about the new rocking tag - cfthread.

Thursday, June 7, 2007

Welcome to my world!

<cfoutput>Hello World!</cfoutput>

Is this a sufficient introduction???
Well, this is Manjukiran. I am a graduate in Computer Science. I work as a QA Lead in the ColdFusion product team at Adobe! Yes...Now you get it? My passions are ColdFusion and testing. This is my "Hello World" blog. OK...thts my work....My personal interests include painting, movies and sports! I will be writing about all these in my blogs..............

Oh! Wait a minute! ColdFusion is on the verge of a major release...We have just released the ColdFusion 8 public Beta! Yes, you guessed it right...I will be writing more about coldfusion to start with....Hope you find this space interesting!