ColdFusion Muse

A Case for a Higher Default "Simultaneous Request" Setting

Mark Kruger May 4, 2006 6:45 PM Coldfusion Optimization, Coldfusion MX 7 Comments (3)

In a technote titled Coldfusion Performance Tuning that was last updated on March 7th 2003, the following advice was given regarding the "simultaneous request" setting in the Coldfusion administrator. The writer indicates that this setting has the largest impact on scalability, and then goes on to recommend a setting of 3 times the number of processors as a "starting point". This number has been oft stated as the "rule of thumb". I've heard as 2 to 3 requests per processor and I've often heard the number of 4 to 5 per processor, although I was unable to locate that recommendation in any online documents. I think this baseline recommendation should be changed to as high as 7 to 10 per processor for a CFMX server on a modern server (P4 or Xeon).

Read More
  • Share:

Jrun Processor Pegging Issues and Solutions

Mark Kruger May 2, 2006 4:58 PM Coldfusion MX 7, Coldfusion Troubleshooting Comments (5)

Lately I've been involved in a couple of troubleshooting sessions where JRUN on a CFMX server was causing 95% to 100% processor utilization. Unfortunately I have not yet stumbled onto a magic bullet for this. Tweaking memory settings, changing garbage collection routines, modifying the threads for the scheduler and the simultaneous requests all seem to help, and in some cases solve the problem. I have never found one single solution that solves this problem. It usually comes down to either JVM arguments or an external process (a database, queue, COM, FTP etc) that is causing a hanging request.

Today, however, I stumbled upon a solution that seemed to solve the problem immediately. If your processor spike is due to this specific issue then this seems to fix it. Keep in mind, that I'm basing that opinion on the fact that taking the following steps seems to have fixed a production server in my care - so take it for what it's worth.

Read More
  • Share:

Coldfusion MX and Mqseries Revisited

Mark Kruger April 24, 2006 10:38 PM Coldfusion MX 7, Coldfusion Upgrading Comments (0)

In my previous post on the topic of integrating MQSeries with Coldfusion MX I included some sample code for sending and retrieving messages to "put" and "get" queues using an MQManager object. This post has a correction and addition to that original sample code.

Read More
  • Share:

Configuring CF 7 Multiserver Instances - Including Custom JVM Settings

Mark Kruger April 17, 2006 10:31 PM Coldfusion MX 7 Comments (41)

Multi-server Installation have some distinct advantages. Process isolation is the one that makes the most sense to me. Many, maybe most servers house more than 1 web site. Even Intranet servers seem to have more than 1 site configured. A "single site" server is pretty rare - at least outside of a cluster. Having a way to isolate 1 site from another on the server itself is an ideal way of keeping bad code or database connections on one site from dragging down another. It's not for everyone. It certainly adds another layer of complexity to your server. Still, it's an excellent solution in some cases. Consider this scenario.

Read More
  • Share:

Working With IBM's MQSeries and Coldfusion MX

Mark Kruger April 11, 2006 11:59 AM Coldfusion MX 7, Coldfusion Upgrading Comments (7)

This post may be one that very few of my readers will care about. But if you are the 1 reader in 1000 that needs to know how to connect to MQSeries version 6 using coldfusion then this post may prove a life saver. You can benefit from the 50 hours of my life I spent figuring this out that I will never get back. Here's the scoop. We have a client who needs to upgrade a Coldfusion installation running on CF 5. The current installation uses COM. Under a load it becomes unresponsive.

NOTE: There is an update to this post that was entered on 4/24.

Read More
  • Share:

Server-side Vs. Client-side Validation Revisited

Mark Kruger March 16, 2006 10:11 AM Coldfusion MX 7, Coldfusion Tips and Techniques Comments (12)

CF Muse Reader Asks:
You suggest both client and server side should be used for validation. Just to check - I should code so that js picks up the errors first using event code or onsubmit then let server side pick up the errors on submit using cfinput validate/required etc. Or do I recode all the stuff to be event driven such as onchange etc.

This question refers to the previous post on form validation. From the way the question is phrased I believe the reader is probably proficient at JavaScript. There are some amazing things you can do with JavaScript, and I'm in favor of creating intuitive interfaces that help your user cope with the complexity of your application. Obviously JavaScript is or can be a big part of that solution. If your concern is to provide a better user experience then JavaScript is helpful and necessary. If your concern is to validate your data for accuracy and security then you must use server side code to check your form inputs.

Read More
  • Share:

CFMX and the Dot Operator - Migrating From CF 5 to CFMX

Mark Kruger March 14, 2006 11:23 AM Coldfusion MX 7, Coldfusion Tips and Techniques Comments (4)

If you come from the old "Coldfusion 4-5" days (in fact many or our customers are still running CF 5) then you might remember how those earlier versions handled variables with periods in the name. If you created a variable with a period in the name CF simply treated the period as if it were part of the variable name. For example, if you did the following in CF 5:

<cfset var1.var2.var3 = "My Dotty Variable">

You would not have created anything more than a primitive variable named "var1.var2.var3". If you tried to use <cfdump ...> to dump out var1 it would generate an error - var1 not found. If you intended for var1 to be a structure containing a structure var2 containing a primitive var3 then you would have to rewrite the code like this:

<cfset var1 = structNew()>
   <cfset var1.var2 = structNew()>
   <cfset var1.var2.var3 = "My Dotty Variable">
Fast forward to CFMX.

Read More
  • Share:

Number Formatting in Coldfusion - a look "Under the Hood"

Mark Kruger February 18, 2006 3:24 PM Coldfusion MX 7, Coldfusion Tips and Techniques Comments (5)

Formatting numbers is a pain. It would be great if our little human pea brains could read a number without commas in it to group the hundreds (or periods for my European readers). Sadly, we find ourselves unable to cope without the commas, so a good deal of display code regarding numbers is written to simply output them in the correct format. Most CF programmers use numberFormat( ) or decimalFormat( ) to control the output. Decimal format seems handy because it doesn't require a mask and produces the typical format you would expect. The 2 functions are quite different however and it may cause some perplexity when you are working with large numbers. Let me explain.

Note: Examples provided by Russ "Snake" Michaels from the CFGURU list :)

Read More
  • Share: