ColdFusion is racecar fast according to the document. It discusses ColdFusion performance best practices and tuning based on the experience of Webapper, a company that co-founded in 2001 by former Allaire consultants. They share settings for optimizing ColdFusion performance including memory, thread settings, JVM configuration, and monitoring tools to identify bottlenecks. Live load testing is demonstrated on AWS to show how tuning ColdFusion can achieve high request per second throughput without slowdowns.
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
Cold fusion is racecar fast
1. ColdFusion is
Racecar Fast!
(Or, ColdFusion Performance Best Practices)
The Adobe ColdFusion Summit 2014 - Las Vegas
2. We are Webapper
● Co-founded in 2001 by two former members
of Allaire Consulting Services
● Speakers today:
o Mike Brunt: Co-Founder, Director of Performance
Engineering Services
o Rex Aglibot: Senior Performance Engineer
o Patrick Quinn: Co-Founder, CTO
8. ‘Splain the session title, please?
● Indy 500
o World’s largest auto race
o We’ve been tuning it in traditional hosting
environment for 5 years
● New hosting infrastructure and site migration
in 1 week! (~8 individual domains)
● Adobe case study: http://adobe.ly/1r9hULg
● And, well, ColdFusion is fast!
9. Results
● 50 r/s X 8 servers (max)
● AWS Auto-scaling
● Zero bottlenecks (literally)
● Zero slowdowns
● Active/passive data tier (SQL Server)
10. The Webapper Way
● How to tune/troubleshoot a ColdFusion
server
o Empirical
o ~ 5 different data sets (logs, memory/thread
profiling, monitoring tools)
● PASS
● How to prioritize “TNT” problems
11. Today
● Good general settings for ColdFusion
o Memory and thread settings
o The ColdFusion connector!
● Live load
● Q&A
24. Recommended Thread Settings
● workers.properties:
worker.{instance}.max_reuse_connections=500
worker.{instance}.connection_pool_size=500
worker.{instance}.connection_pool_timeout=60
(Notes: connection_pool_timeout is in seconds;
must be the same as server.xml's connectionTimeout)
Reference: http://blogs.coldfusion.com/post.cfm/tuning-coldfusion-10-iis-connector-
configuration
31. Contact Us
● via Twitter: @IamSigmund (Patrick),
@cfwhisperer (Mike), @superex2000 (Rex)
● via Email: patrick@webapper.com
● Amazon Web Services:
aws@webapper.com
● www.coldfusionsupport.net
www.webapper.com
www.seefusion.com
Notas del editor
AWS = world’s first ColdFusion consultancy? ~40 of us (many of whom are here today!), in the field as an extension of engineering team.
“PE” (performance engineering services) are our flagship offering (founded in 2001). PE = a continuation of ACS offerings.
We’ll be speaking today the same way we work--collaboratively.
Apologies to Steve Jobs, but…
...biggest news from Webapper of late is our new AWS managed services hosting. Still finalizing w/ Adobe. Coming soon!
Important: What we’re talking about today is not specific to AWS, but we will refer to it in places.
Case study about AWS, but this talk’s recommendations can be applied anywhere.
We’ve seen a lot of ColdFusion. We know it’s incredibly fast and stable, when you do things the right way.
Our TNT work is very empirical - we typically look at ~5 different data sets when tuning/troubleshooting a server.
We don’t just apply generic settings every time. The settings end up being similar, often, but always based on app- and server-specific data.
Today, however, we’ll try to share some good general settings, averaged over hundreds of engagements and thousands of ColdFusion servers.
Our TNT work is very empirical - we typically look at ~5 different data sets when tuning/troubleshooting a server.
We don’t just apply generic settings every time. The settings end up being similar, often, but always based on app- and server-specific data.
Today, however, we’ll try to share some good general settings, averaged over hundreds of engagements and thousands of ColdFusion servers.
-Xms4096m -Xmx4096m - This increases the overall heap size to 6GB and added a start size of the same size.
-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -verbose:gc -Xloggc:webapperGC219.log - These enable verbose GC logging.
-XX:NewRatio=4 -XX:SurvivorRatio=8 - These are added to increase the size of the Young Generation and to relate its size to the overall heap, which will help to reduce the number of shortlived objects getting move to the Old/Tenured generation too soon.
-XX:+UseCompressedOops - This relates directly to Java running on 64 bit systems.
-Xss256k - This resizes the default thread size down to 256k per thread which is typically more efficient in our experience.
-XX:+CMSClassUnloadingEnabled - Use this if you see this entry in your logs, as it indicates suboptimal performance of your existing settings: "Please use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled in the future."
-XX:+UseParNewGC - This changes the Young Generation collector to one more suited to work with the CMS collector.
-XX:+DisableExplicitGC - This will prevent any unnecessary Full GC's from occurring.
-XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 -XX:CMSFullGCsBeforeCompaction=1 - These are all enhancements used over the past 2-3 years by our team for 64-bit systems and developed from a lot of analysis and load testing. XX:+UseCMSInitiatingOccupancyOnly and XX:CMSInitiatingOccupancyFraction=68 are typically used together and are used to start the concurrent collection earlier; in this case the collection will start when the Old/Tenured’s heap size reaches 68% used. This should reduce the number of Full GC's. -XX:+CMSScavengeBeforeRemark will force a collection of the New/Young space prior to a CMS remark as this should reduce its size and thereby the time spent in remark.
-XX:+UseConcMarkSweepGC - This changed the garbage collector from the parallel collector to concurrent mark sweep or CMS collector which is better for 64-bit systems.
-XX:PermSize=192m -XX:MaxPermSize=256m - The permanent generation is where ColdFusion stores its classes; we often observe that this space is getting used up quickly, so we add a start size and increase maximum size also.
At Webapper, we have a service that we call TNT which stands for Tuning and Troubleshooting… and we have a 55-point checklist where we check various settings in the operating system, in the web server and the application server,
these are checks for performance and security
for example we check what ports are open via nmap, and some things as low-level as hard drive free space
we had a server go down and we were checking different things, we were pinging it, memory was ok, we can RDP into it and we were checking if the CF and webserver services were up, so what’s going on? it turns out that theres no more drive space!
who knew that would be an issue?!
for IIS things like compression and application pool recycling settings
and CFAdmin optimizations
but of course
Now on to threads settings
thread optimization is a crucial performance aspect of your servers… for example I was doing some load tests on my local development system, and I couldn’t for the life of me go past 10 concurrent requests
I tweaked all the settings that can be tweaked, put them up to 10,000 then it turns out,
non-server versions of windows have a request limit
like win7 ultimate’s IIS is limited to 10 concurrent requests…
I had to learn that the hard way
imagine if that was a limit on your server, so don’t learn it the hard way like I did
To optimize thread settings, there are 3 areas that all work together, 3 areas or POOLS, and are controlled by different things.
that link explains the thread limitations, it just illustrates that there are pitfalls to avoid in thread settings
First is tomcat’s server xml file…
this is located under each of your instance’s /runtime/conf directory…
so if you have an instance called instance01, it would be under C:\ColdFusion10\instance01\runtime\conf\
this is the tomcat thread pool allotment for the web connector…
there’s also an executor maxthreads setting, and we also set that to the same one, but not for the internal webserver, but for the catalina executor
this is the workers.properties file, which controls the thread pool for IIS.
This is specific to a web connection…
but this file is under the C:\ColdFusion10\config\wsconfig directory then you would see multiple numbered directories under there, depending on how many websites you have connected to ColdFusion
All these settings are referenced in that adobe blogpost
This is CFAdmin’s thread settings, located under Server Settings > Request Tuning.
The way we do it, we can run load tests against the application
and optimize and tune these settings,
or we analyze thread metrics whether via metrics logging, SeeFusion DB logging or FusionReactor logging,
but we analyze the threads and for example
if we see that the max you can get is 50 and you have thread starvation, we raise that limit.
Or if we see that you are already at 250, and your max is 110, then we lower that to 125, just so that we can put those resources back into the stack
but if you don’t have that luxury, just raise the defaults by a factor of 5 or 10
So with the server.xml file, I’ve seen maxThreads where if you change it, it changes the setting in CFAdmin too.
it’s also known as the wsconfig tool… who uses the web server connector…
that’s great… most people during installation would just configure ALL sites to use CF, please don’t do that. Use the webconnector post-installation of ColdFusion
one rule of thumb, please run it as ADMINISTRATOR, even if you are logged in as Administrator
if you are using multiple instances, you HAVE to use the individual directory’s connector
also if you are using clustered instances, you use the webconnector to connect to whatever instance or cluster you want
I mentioned that during installation of CF, to not configure the webserver but to use the connector after installation.
When you do use it, do not use ALL…
do create connections for each website, just so that you have different connector pool settings,
but you do have to aggregate those swimming pool settings into the server.xml…
Here’s a PROTIP… For trouble shooting why CF is not working with your webserver (IIS, Apache), do this...
just click on ADVANCED here and enable VERBOSE LOGGING and you can also set some thread settings there
so now I turn you over back to the everlovable future President of the US 2024, PAT QUINN