Skip navigation
Sasha365i
Currently Being Moderated

Coldfusion 9 random slowness

Jul 19, 2012 11:19 AM

Hi guys and gals,

 

I have a Coldfusion 9 installation with MySQL 5.5 on Windows Server 2008 R2 that is about 2 years old. Mostly problem free. Reasonably well configured with very fast page loading times.

 

Recently it began experiencing intermittent slowdowns. It would run fast for days (both peak days and weekends) with practically no CPU consumption (in low teens usually), then all of a sudden it would spike up to 80-100% and would run like that for days (both peak and weekends). Then after being slow for days it would return back to normal on its own.

 

I've been trying to isolate the problem with MySQL, but all queries are optimized and debug output shows then as executing in 0 seconds or being cached. Yet page loading times are high.

 

The logs in C:\ColdFusion9\runtime\logs show nothing unusual. Memory tracking in server monitor is turned OFF.

 

Any suggestions how to hunt down and troubleshoot this random slowness would be greatly appreciated!

 

Many thanks

 

Sasha.

 
Replies
  • Currently Being Moderated
    Jul 19, 2012 6:22 PM   in reply to Sasha365i

    Sasha, It is JRun.EXE that is utilising the 80-90% of CPU?

     

    You say CF Server Monitor is present so I expect Enterprise licence. Without Memory Tracking enabled, Server Monitor > Statistics > Memory Usage > Memory Usage Summary is still available and while it is not showing all the CF JVM memory spaces or provide much detail on garbage collection it may provide a hint if there is some kind of New or Old memory issue. Perhaps you can attach a picture how Memory Usage Summary looks when system is operating normal versa when CPU is bound.

     

    You could try JVM logging to get some more details and see if there is a garbage collection or memory problem with one of the New, Old or Permanent memory spaces. Let me know if you want to take the time to enable that and need some know how then I will post details.

     

    HTH, Carl.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 19, 2012 9:36 PM   in reply to Sasha365i

    Not sure CF Mon Memory Tracking is going to assist so I will leave that to other responders to thread case there is something to gain.

     

    Some questions CF9 update level and hotfix? 64 or 32 bit? CF Java version eg 1.6.0_17?

     

    So on to JVM logging. Backup or take copy of JVM.CONFIG file. Edit JVM CONFIG and add this syntax without CR/LF to Arguments  section (copy pasting to from forum page can be odd take care):

     

    -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -verbose:gc -Xloggc:cfjvmGC.log

     

    Restart CF application service for JVM.CONFIG to be re-read and logging to commence.

     

    Creates a log file in ColdFusion9\runtime\bin\cfjvmGC.log Jrun4\bin\ in case multiserver. The log details can be a bit hard to understand so use a tool eg GCViewer to graphically examine the log file contents:

     

    http://www.tagtraum.com/gcviewer.html

     

     

    I suspect GCViewer display of log file from when system is working normally to when CPU is bound will look significantly different so post back your findings. If not then likely not a CF JVM issue, something you can discount as issue, move on for other causes and at worst something learned. Remember to switch logging off when you are finished with it by removing syntax from JVM.CONFIG and restarting CF.

     

    JVM.CONFIG syntax example only with JVM logging turned on:

     

    # Arguments to VM

    java.args=-server -Xmx512m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -verbose:gc -Xloggc:cfjvmGC.log -Dcoldfusion.rootDir=etc

     

    HTH again, Carl.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 30, 2012 3:02 PM   in reply to Sasha365i

    Fair enough you don't want to muck about with the internals of CF / Java however seems from the CF Monitor Overview the Reports JVM (used /max) 472 is close to 512M which could be leading to a lot of garbage collections causing Jrun to accumulate CPU time and GC pausing (full GC being a Java stop all process) applications.

     

    From CF Monitor the Memory Usage Summary diagram would be interesting to look at when the response times drop?

     

    Is Windows and CF 32 or 64 bit?

     

    Without evidence (logs) it can be hard to say do this or that. Guessing makes me think you might just need to define a bit more memory to heap. So that is :

     

    Server Settings > Java and JVM

    Maximum JVM Heap Size (MB)

    1024 in place of 512

     

    Well that is a long way from CF Java tuning and there is the Server Settings > Java and JVM > JVM Arguments > XX:MaxPermSize= to consider but if the larger heap gets you out of trouble then fine.

     

    HTH, Carl.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 30, 2012 4:06 PM   in reply to Sasha365i

    JVM max is 1024 odd when the CF MON Summary says 472 of 512, I would expect the max to increase. A picture of CF MON memory summary would be good to know. What is Server Settings > Java and JVM > Minimum JVM Heap Size (MB) value?

     

    Maybe you can try Server Settings > Java and JVM > JVM Arguments > -XX:PermSize=192m -XX:MaxPermSize=256m in place of -XX:MaxPermSize=192m

     

    Sasha asks logs – that’s me referring to JVM logging to get a look at what is happening. I would rather make an informed suggestion at what to change rather than having a guess at it.

     

    What does CFadmin > System Information (i button) say about Java Version and Java VM Name?

     

    Regards, Carl.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 30, 2012 6:41 PM   in reply to Sasha365i

    Yes and place 512 in the "Minimum JVM Heap Size (MB)" as well.

    >Are you suggesting

    -server -Dsun.io.useCanonCaches=false -XX:PermSize=192m -XX:MaxPermSize=256m -XX:+UseParallelGC -Xbatch etc as a new string?

    It would be fair to say CF9 is not "patched up" being 9.0.0 with no update level where as current being 9.0.2. CF9.0.0 could have updater1 or cumulative hotfix 2 applied or both plus some security fixes. Perhaps more noteworthy is the Java version. CF9.0.2 and CF10 both use 1.6.0_29 and 1.6.0_33 is current so you can see 1.6.0_14 is old. Having said all that I don't know if your CFM application even works beyond CF9.0.0 so you may not want to apply any CF9 updates or patches without performing acceptance testing. Read as I don't want you to say since Carl said use CF9.0.1 + CHF2 etc now my CFM application does not work.

    Regards, Carl.

     

    
     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 3:34 PM   in reply to carl type3

    have you considered scheduled restarts for your CF service? a simple batch script can eliminate a lot of memory consumption issues

     

    Rohit S

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points