Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Your Sever Stats 1

Status
Not open for further replies.

vionca

MIS
Nov 19, 2003
60
US
Hi there,

I was wondering who here is running Coldfusion on an win2k server and what processor, ram, types, speeds, etc you are using.

I need help building a suitable coldfusion server and I'm not sure what type of hardware specs I should be looking into.

The minimum RAM and Processor spead is what I am using on my test server and that is far from enough. Complex code really grinds the server to a hault.

Does anyone have any suggestions for me?

Vionca
 
We've found that available RAM affects performance far more than processor speed. Under Windows, RAM becomes a little like black science, though. Sure, you can physically put 2GB of RAM in your box... but, out-of-the-box, chances are Windows will grab all of that RAM anyway, and only offer 128MB or something to ColdFusion. Make sure Windows is configured correctly to give ColdFusion all available RAM... otherwise it's a moot point how much is physically in the box.

But, for our Win2K box, we're running quad XEON's running at 2.4GHz I believe. The multi-processors actually don't do a whole lot for you... it's just how the box was when we bought it. 4GB of RAM.

For our Solaris boxes, we're running 1.2GHz Sparc III's, with 8GB of RAM.


Of course... we've also had a major project for the last 6 months to optimize our code. The idea being to take the "complex" out of "complex code". Making sure all our queries are cached, caching UI elements as much as possible, using user-defined functions and CFC's rather than Custom Tags, and really poking into what's really happening on a page by fully analyzing ColdFusion's debug output and stream-lining every process that appears.

This code optimization has done far more to increase our page performance than anything we ever did to our hardware.


-Carl
 
Do have any suggestions as to where to look for a newbie to study code optimization??

I really don't know where to start,
and thanks so much for all that valuable info!

Vionca
 
Well... we started with technotes from Macromedia's knowledgebase.

Like I said, caching was probably the biggest panacia for our pages. Either adding "CACHEDWITHIN" attributes to our CFQUERY tags:
Code:
   <CFIF CompareNoCase(URL.cacheclear,&quot;yes&quot;)>
      <CFSET tsCacheSpan = 0>
   <CFELSE>
      <CFSET tsCacheSpan = CreateTimeSpan(0,8,0,0)>
   </CFIF>
  
   <CFQUERY ... cachedwithin=&quot;#tsCacheSpan#&quot;>
       :

or saving elements to the APPLICATION scope:
Code:
<CFSET sNavBar = &quot;&quot;>
<CFLOCK timeout=&quot;30&quot; throwontimeout=&quot;No&quot; type=&quot;READONLY&quot; scope=&quot;APPLICATION&quot;>
   <CFIF StructKeyExists(APPLICATION.navcache,navid)>
       <CFSET sNavBar = APPLICATION.navcache[navid]>
   </CFIF>
</CFLOCK>

<CFIF Len(Trim(sNavBar)) LTE 0>
   <CFSAVECONTENT variable=&quot;sNavBar&quot;>
        :
       build nav html here
        :
   </CFSAVECONTENT>
   <CFLOCK timeout=&quot;30&quot; throwontimeout=&quot;No&quot; type=&quot;EXCLUSIVE&quot; scope=&quot;APPLICATION&quot;>
     <CFSET APPLICATION.navcache[navid] = sNavBar>
   </CFLOCK>
</CFIF>

Also, using things like
Code:
Compare()
and
Code:
CompareNoCase()
when comparing strings rather than using &quot;EQ&quot;, &quot;NEQ&quot;, etc... and treating booleans as booleans rather than strings:
Code:
  <CFSET bMyBoolean = true>
     :
  <CFIF bMyBoolean>
        :
  </CFIF>
instead of
Code:
  <CFSET bMyBoolean = &quot;true&quot;>
     :
  <CFIF bMyBoolean EQ &quot;true&quot;>
        :
  </CFIF>

Also, making sure all accesses of APPLICATION, SERVER and SESSION scopes are CFLOCKed (properly). Non-locked accesses make for memory leaks (moreso in CF 5.0... but even in MX)... which will eat up your RAM faster than you can say &quot;where's my coldfusion admin?&quot;

There are others... just takes a couple of hours of digging through the knowledgebase. Testbeds for different solutions are a good idea, too; use
Code:
GetTickCount()
to time your processing, and choose the fastest alternative.



-Carl
 
Carl, once again, you've paved the road for me! I'm digging at the macromedia web site right now. I did a couple of searches there prior to submitting this post, but I think I was too vague with the search criteria.

Thanks!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top