Application deployed on Network/Remote Path – Identifying Network Latency – Improve Performance

Many a time, ColdFusion application code is deployed on a network path when your ColdFusion deployments are of large-scale and mandated to use network paths.

After setting up the server for the first time, if there is any performance hit, as the first thing you would want to cross-check few things. One of the things to determine is if there is any network latency.

Though you would have got same network within your organization same as earlier, your OS version also would have changed.

Follow the steps below to see if the performance hit is due to network latency-

When the server is under moderate or full load(with at least 8-10 requests under process), take 2 or 3 thread dumps with 30 seconds interval.

It is not appropriate to take thread dump when the server has negligible load and anlyze that as there may not be any in-process requests.

If you are not sure how to take thread dump, you can simply follow the following blog.

( Taking Thread Dumps From ColdFusion Server Programmatically )

Open the thread dump file:

Under moderate or full load server conditions, if you see more than 5-8% of running ColdFusion threads containing “WinNTFileSystem” in the thread’s stack trace –> It means that there is lot of time being spent in trying to resolve the application file paths.

Following are the sample threads having WinNTFileSystem in its dump.

"ajp-bio-8014-exec-6861" Id=13898 in RUNNABLE
 java.lang.Thread.State: RUNNABLE
 prio=5 blockedtime=28963 blockedcount=6819 waitedtime=421762 waitedcount=115
    at java.io.WinNTFileSystem.getBooleanAttributes(Native Method)
    at java.io.File.isFile(File.java:876)

 

"ajp-bio-8014-exec-6861" Id=13898 in RUNNABLE (running in native)
 java.lang.Thread.State: RUNNABLE
 prio=5 blockedtime=28961 blockedcount=6814 waitedtime=421762 waitedcount=115
    at java.io.WinNTFileSystem.canonicalize0(Native Method)
    at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:414)
    at java.io.File.getCanonicalPath(File.java:618)

 

(Note: ColdFusion threads can be identified by the name starting with "ajp-" )

For Example, if there are 50 threads with thread name starting "ajp-bio-" in the thread dump, if you see WinNTFileSystem in more than 2-3 threads, it is the time you start looking at minimizing the network latency.

 

Once you know there is latency, you would want to know how much is the latency when compared to the application existing locally.

Created a very basic network latency test program to validate this.

You can take the jar from here.

And run it from command prompt as follows:

> C:ColdFusion11jrebinjava -jar <Path of NetworkPathsTest.jar> <Network or Local Directory Path >

If the network path (Ex:- \orgserverd$) is accessible only to the ColdFusion service user, open command prompt as that user ( runas /user:<cfserviceaccount domainname>cfserviceusername CMD )

 

Examples:

Path Arguments can be one or more. More Path arguments is a good measure to see the difference clearly.

C:ColdFusion11jrebinjava -jar C:ColdFusion11NetworkPathTest.jar \orgserverd$deploycfm

C:ColdFusion11jrebinjava -jar C:ColdFusion11NetworkPathTest.jar \orgserverd$deploycfm \orgserverd$deploycfmapi

Try the same paths keeping the content same on the local machine and see the time differences.

For the same paths on local and remote, the difference in time should not be exponential.

These tests are to be performed on your ColdFusion server machine.

Once you have validations and found any latencies, it is the time to call for network optimization expertise.

 

 

Taking Thread Dumps from ColdFusion Server Programmatically

Many times you would want to tweak the performance of the ColdFusion server or want to debug the bottlenecks that make the server unresponsive.

To analyze this, ideally you would want to have Thead dumps and Server memory snapshot(Heap Space, Eden Space, Survivor Space, Old Gen, Perm Gen).

While you can use JDK tools like jstack to get the dumps, it is tedious to install it and schedule the thread dumps.

So, programmatically thread dumps and memory snapshots are are triggered and can be configured as a scheduler task and can be triggered on-demand as well.

Download the following zip file and move it to the server where you want to take thread dumps.

 

threaddump.zip

This zip file contains two files. One is threaddump.jar file.

Place this file under: C:ColdFusion11cfusionwwwrootWEB-INFlib and restart the server for it to load.

And the other file is the cfm file takethreaddump.cfm where the call to ThreadDump class is made and the path where the dump content should be written.

By default it is dumped to the file #GetTempDirectory()#/threaddump<Day>-<Month>-<Year>.log

(Depending on the server location it translates similar to C:ColdFusion11cfusionruntimeworkCatalinalocalhosttmpthreaddump12-8-2015.log)

You can change this to any other convenient path in the cfm file.

You can call this cfm on-demand at point of time or configure a new scheduled task to schedule it at some interval.

More number of Thread dumps are more helpful for problem analysis. So, it is better to take at some interval.

On every new day, dump is rotated automatically to a new file name.

 

Setting up ColdFusion in distributed envionment

You might want to set up ColdFusion in a distributed environment where ColdFusion is running on one machine and Web server is running on a different machine.

Following are the set of steps that have to be performed to achieve this (less error-prone):

This applies to both ColdFusion 10 and ColdFusion 11.

1) Have ColdFusion server installed in a machine.

2) Next thing is to download and install VC Runtime.

             – The version of VC Runtime that you have to install depends on the version of ColdFusion.

                Say, ColdFusion 11 needs VC Runtime 2012

                 (32-bit VC Runtime for 32-bit Web server and 64-bit VC Runtime for 64-bit Web server.

                  If you are not sure, you can install both)

                 (https://www.microsoft.com/en-in/download/details.aspx?id=30679)

                and ColdFusion 10 needs VC Runtime 2010

 

3) Copy the following contents from the machine where ColdFusion is running to the machine where Web server is running at the same location.

 C:ColdFusion11jre

 C:ColdFusion11runtimelibwsconfig.jar

 C:ColdFusion11runtimeconfserver.xml

C:ColdFusion11configinstances.xml

C:ColdFusion11configcluster.xml

 

4) Open a Command prompt and run wsconfig tool

   C:ColdFusion11>jrebinjava -jar cfusionruntimelibwsconfig.jar

    It will open a configuration window where you have to provide AppServer Host as the ColdFusion Server IP.

    Configure the connector.

Distributed environment is ready for use. Send requests to the Web server's URL with cfm files under web server root and same files under ColdFusion's Web root.

Web server would redirect these to ColdFusion, which is on some other machine.

 

 

ColdFusion Splendor Public Beta E-seminar Series

We have a series of e-seminars lined up that gives you a good understanding of the various features of ColdFusion Splendor, which is now in public beta. If you haven’t downloaded ColdFusion Splendor already, here is the link where you download the public beta.

Here are the list of e-seminars:

1. Title- Public Beta E-seminar: ColdFusion Splendor Overview Date: 1st April Time: 8 am pacific. Find the recording for the e-seminar here

2. Title- Public Beta E-seminar: Everything about Mobile Application Development Date: 10th April Time 8 am pacific. Find the recording for the e-seminar here

3. Title- Public Beta E-seminar: Delicious Language Enhancements in ColdFusion Splendor Date: 12nd April Time 8 am pacific. Find the recording for the e-seminar here 

4. Title- Public Beta E-seminar: Pixel Perfect PDFs in ColdFusion Splendor Date: 24th April Time 8 am pacific. Find the recording for the e-seminar here

 

 

 

Public Beta for ColdFusion and ColdFusion Builder is now available!

In case you haven’t already noticed,the public beta for the major version of ColdFusion codenamed Splendor and for the next major version of ColdFusion Builder Thunder is now available.

Here is where you can get access to the public beta for both the products on Adobe Labs – http://labs.adobe.com/technologies/coldfusion/

You can quickly go over what’s new in ColdFusion Splendor here. There are also a couple of videos on the video tab that gives you a quick introduction to what’s new in ColdFusion. The link for the documentation home page is at – https://wikidocs.adobe.com/wiki/display/coldfusionen/Home

There are lots of new features and enhancements in Splendor and in Thunder. We look forward to hearing your feedback during the public beta.

 

 

 

 

Amazon Web Services Webinar – Leverage the power of Adobe ColdFusion on AWS

Amazon is organizing a webinar on the 18th of September at 10 am PT titled ‘Leverage the power of Adobe ColdFusion on AWS’. You can register for this AWS webinar here

Learn about the AWS offering from,

Tom Laszewski, Solutions Architect, Amazon Web Services

Chandan Kumar, Computer Scientist, Adobe

Akhila K. Srinivas, Software Engineer, Adobe

 

Applying Updates on a Locked down ColdFusion 10 Server

Note: This is valid from
Hotfix 9 onwards.

Depending on the user account that you have used to Lock down your server, you might need to consider the following few more steps for providing appropriate permissions to be able to apply the updates from ColdFusion Administrator.

Hotfix
needs two things to be installed properly from ColdFusion Administrator.

The user that is configured for ColdFusion Service should be permitted to
Start/Stop the service. More on this to setup is explained below.

Setting up the ColdFusion Service user:

Down load and Install Windows tool named SubInACL.exe (Installer name is SubInACL.msi)
to give service start/stop permissions from

http://www.microsoft.com/en-us/download/confirmation.aspx?id=23510

Once you install it, the tool subinacl.exe gets installed
under

C:Program Files (x86)Windows Resource KitsTools

Then, run the tool as follows from command prompt by
replacing <MachineName> and <username> with your username and machine
name.

a)
For machine’s local user

C:Program Files (x86)Windows Resource KitsTools>subinacl.exe /service “\<MachineName>ColdFusion 10
Application Server” /grant=<username>=TO

b) If the user is a Domain user you have to replace <Domainname> as well along
with <MachineName>, <username> in the following command.

C:Program Files (x86)Windows Resource KitsTools>subinacl.exe /service “\<MachineName>ColdFusion 10
Application Server” /grant=<Domainname><username>=TO

More details on this are explained in the below
resource.

http://support.microsoft.com/default.aspx?scid=kb;en-us;288129

This is a one-time setup that you have to do.

Once this is done -> Restart ColdFusion service
-> Open ColdFusion server Administrator -> Apply Update  -> You
should be able to apply the Hotfix successfully now.

Normal
0

false
false
false

EN-US
X-NONE
X-NONE

 

ColdFusion – Clarification to David Wadhwani’s comment

David’s comment on the TechCrunch article about Enterprise developers and backend tools is not targeted at ColdFusion, but towards other products that Adobe announced in 2011

There has been no reduction in investments in ColdFusion over last few years. We see exciting opportunities driving the future of ColdFusion and we will continue to make investments that the opportunities demand or need. 

 

 

IDC Whitepaper on Adobe ColdFusion – Turning up the heat with ColdFusion

A new whitepaper from IDC on ColdFusion is now available within the ColdFusion Community Portal (Details of the portal here). The whitepaper from the analyst descirbes the value proposition of ColdFusion, powerful capabilities of the platform, future directions and customer case studies.

 

 

Announcing the new ColdFusion Community Portal

 

Here’s the all new ColdFusion Community portal launched by Adobe : http://coldfusion.adobe.com

The community portal is one centralized access point for information on the latest in ColdFusion. It also provides our partners and consultants to showcase their capabilities and latest innovations with the platform. It is also a User Group hub where ColdFusion developers can find information related to various User Groups and their events.

We are pleased to announce the launch of ColdFusion Community portal with the aim to make it a go-to place for the ColdFusion community. The idea is to integrate ColdFusion content created not just by the product team at Adobe, but also by our partners and you the community. We believe such content will be of immense use to everyone in the ColdFusion community. 

Please go through the portal and let us know how we can further improve it. You can send an email with your inputs/comments to Kishore Balakrishnan kishore@adobe.com , Marketing Manager for ColdFusion.

The portal is built using the popular Mura CMS!