Performance Tuning

I’m running ACF 9.01 on an AWS micro instance using tomcat. Now I know this isn’t a great spec; this is a dev server, hence me only wanting to pay 2c an hour!

The issue I have is that my coldbox app is running like a one legged dog. The CF administrator is fine, actually quite zippy – so tomcat/CF can handle such a low spec machine. I’ve setup 1GB of swap, and on the whole the app server seems fine.

The issue seems to arise in my application, now whether that’s me, or Colbox itself, I’m struggling to find out.

Is there any performance tuning I can do in Coldbox – such as turning off logging etc. which might help?

Anyone any experience with AWS micro instances?

Thanks,

Tom.

Tom,

The basics of the framework are very simple and zippy. There could be some lag if you have certain flags turned off or on, especially auto reload which mimics first requests. I would suggest you post your configuration file. Also, what version are you using of ColdBox? What JDK are you using?

Have you tried to run any of the application templates and see how they perform?

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

There are few things you can do to help identify the issue(s).

  1. First, turn off ColdBox debug mode if it is on. If that fixes things, you may have solved the issue. Debug mode can slow things down.

  2. If ColdBox debug mode did not fix things, turn it on and look at the process. You should see the time taken to perform various tasks such as the preProcess interceptor. This may give you a clue about slow areas in your application.

  3. Turn on Request Debugging in the ColdFusion Administrator. You’ll see the time taken to process various CFC/CFM files. The longest should be something like Application.cfc’s onRequestStart method, followed by a ColdBox method or two that wrap around other processes. Don’t look at the first few files and flip out that it’s ColdBox. Look down farther in the list and you should see the real culprits

  4. You can use the ColdBox Timer plugin once you’ve identified a large part of the application you think is slow (like a service, handler or interceptor). The timer plugin basically sets a start tick and end tick and lets you assign a label. Then, stores all this information within a Query you can dump to find performance issues within the code you have written.

  5. Finally, swap space is going to be slow–and, is probably a big part of your problem. Any time memory pages need to be transferred from disk back to memory back to disk, well, I’m sure you get the point. Try getting as much into memory as you can. Especially if you have a DB within that same instance you are just getting crazy. If you only use this development machine to share you development branch with others it is probably not such a big deal. If your using it frequently you should just adopt a bigger instance as time is money.
    Hope this helps.

Aaron Greenlee
http://aarongreenlee.com/