BlogCFC, PostgreSQL and Bluedragon

In my description of this blog I wrote that I converted BlogCFC to work with PostgresSQL. It did not take much to make the conversion and the code is still fully compatible with the other versions of databases that are officially supported. There is absolutely no reason why PostgreSQL should not be supported.

So here are some examples of the changes I made. Most of the changes had to due with date functions and in most cases can be spotted in the code by looking for db type "PGSQL".

In the file blog.cfc version 5.9.002

First add PostgreSQL as a valid db type.

[More]

Why PostgreSQL

Many people ask me why I am using PostgreSQL.  I tell them I've been using it for many years and found it to be much better than MySQL is many ways back in those days. Today MySQL has caught up on most fronts and PostgreSQL has gotten the led out and is much faster than ever before. The full details are here [http://www.postgresql.org/about/] and the interesting [history is here].

It used to be that MySQL didn't have support for transactions and rollbacks, stored procedures, triggers, or referential integrity and much more.  From what I hear these issues are resolved in the current versions, however back when I needed these features PostgreSQL provided me the solution.  Plus the power and speed is phenomenal.  I see no reason to switch to any other ORDBMS now or any time in the future.

[More]

See all applications and their sessions

Someone at House of Fusion was asking how to see the sizes of sessions in CF7.  While CF8 has a built in Monitoring API but it can have dangerous overhead load on your application, CF7 does not even have that. 

I had run across the need to see all the applications running on our servers and then all the sessions of each application so I wrote a quick little script that uses the java objects "coldfusion.runtime.ApplicationScopeTracker" and "coldfusion.runtime.SessionTracker" to get all the data I was trying to see.

So here is that little  "Random Tool".  (Click on the Download Icon below.)

*Note: When I write little tools like this I'm usually writing it because there is something I absolutely need to see in order to complete another project. These little tools are not written as projects themselves and therefore may not be very pretty or as full featured as something that I was writing as a complete project. I just needed to get some code running that gave me back the data I needed to see. There are no warranties or promises. If you find is useful then great. If not, oh well. I know the code works on CF8 at the moment. It used to work on CF7, but I do not have a CF7 server anymore so I can not be certain.

How to Tune the JVM Part 2

How to Tune the JVM for High Availability Coldfusion Servers: Part 2 Memory

In Part 1 we covered why you needed to tune your JVM and installing the updated JVM.  Now we are going to tune it for performance.  We are going to rewrite the java.args line to accomplish this.

First we are going to set the size in memory of your JVM.  On 32bit OS'es your going to be limited by the 32bit addressing more than the physical server memory.  We found that even though you should be able to address upto 2.1Gb of memory the maximum realistic stable JVM size is going to be around 1Gb.  Depending on the size of your application and the amount of data you store in memory you may never need a large amount of memory space.  So lets start building the “jvm.args” line.  Xmx and Xms are the max and min size of the JVM memory space.  These need to be the same number (did you back up your original file?).  In the example below we are setting the JVM memory space to be 1Gb.  The default setting as shipped from Adobe is 512m. Also note that much of the jvm.args line is path information.  We'll be saving that to put back on when we are done tuning.  Also I am assuming your server has plenty of physical memory is a multi-CPU/core beast.  If your server only has 1Gb of physical RAM then don't set your JVM heap to 1Gb. Better yet, upgrade your server. Memory is cheap.

[More]