Copy link to clipboard
Copied
Hey,
trying to setup CF 2023 / Java 17 to run properly on Kubernetes and while trying to setup jvm.config and setting
-XX:MaxRAMPercentage=70 -XX:InitialRAMPercentage=70
rather than something like
-Xms1024m -Xmx1024m
as it is much easier to manage regarding the pods memory requests, Service is starting just fine but the "Java and JVM" admin console is broken with error
Element JDKPATH is undefined in FORM. The specific sequence of files included or processed is: /opt/coldfusion/cfusion/wwwroot/CFIDE/administrator/settings/jvm.cfm, line: 227
My guess is that console is trying to read -Xms and -Xmx values in a non safe way and should fail gracefully or even better deal with XX:MaxRAMPercentage and XX:InitialRAMPercentage (and others).
Also, would love to know if anybody has more experience on running CF 2023 in Kubernetes and some best practices for it. Really interested on Garbage Collection settings for example.
Copy link to clipboard
Copied
First, I suspect you've surmised the situation well, about the error.
And I would recommend that your next step should be to file a bug report at tracker.adobe.com, as I can confirm from my searching there just now that no one else has done so yet. (That's better than hoping someone at Adobe will see this here, plus it gets it considered and tracked for resolution.) Indeed, please share the ticket id/url, and we can add votes to help raise its profile and track any progress from Adobe or thoughts from others. You could also point to the URL for this thread, for added context.
Second, this need not be a showstopper for you or anyone using cf containers. Obviously, you can use all other aspects of cf and the CFAdmin fine. And some would point out how it's frowned upon in the container world to make changes to a running container anyway since they're ephemeral.
But maybe you're making these changes just to get things "setup". Maybe you put in that jvm arg change and THEN got the error. As you may know though, there are several solutions to getting a container setup without need of going into the CF Admin within the container:
Indeed, I discuss and/or demonstrate such things about working with CF images/containers which I've done in various presentations or blog posts on my site, carehart.org. Perhaps better still, I show examples of each of the above 3 things (among dozens of other cf container setup variants) which I offer at my github repo, awesome-cf-compose. I realize you're using k8s, but as I note there anyone can use kompose to convert those to kubernetes manifests. I even show a Dockerfile variant for those preferring neither compose nor k8s.
Finally, to your last question about GC settings, I'd argue that there's generally no need to tweak them for most folks. It's often done as a case of the tail wagging the dog, in my opinion: if there's gc problem, the solution is rarely in tweaking GC settings (or even changing cf from its default parallelgc algorithm), at least I've not found it to be the solution in thousands of CF troubleshooting engagements, even involving heap issues.
Instead, the focus in that case should be on finding and fixing what's CAUSING pressure on the heap, which may be about server config (total memory and heap size), unexpected traffic, cf admin config, coding practices, etc. Here again, I have various resources discussing that, or I have helped folks deal with their specific situations--either here in the community or via an online, very short-term consulting engagement.
Long-winded answer to your issue, I realize, but I hope it may help you or others. 🙂
Copy link to clipboard
Copied
Thank you Charlie!
You are right it does not matter that much in the Docker/Container world but I suspect someone would like to use other memory settings than -Xms and -Xmx, I will log a bug and report back here.
As for the immutability of a container, I could not find a way to get pre-installed modules, having those installed at first start is less than ideal.
I had a look at your compose collection and this is really helpful. I need to dig in the cfsetup CLI tool as I used to have a CFM script from CF 2018 and it feels clunky at best.
As for Garbage Collection, well, it all depends on the memory usage. By default CF is using parallel GC and I guess for most people it will be OK, but for large application with significant number of users having memory going over 4GB would not be surprising. It also depends if you are looking for response time over throughput.
I actually also want to experiment with the Z Collector, but at the end all JVM tuning is black magic and really depends on your application and what it does.
See Java 17 documentation https://docs.oracle.com/en/java/javase/17/gctuning/available-collectors.html#GUID-414C9D95-297E-4EE3...
Copy link to clipboard
Copied
Hi Tex,
I have been liking Z collector -XX:+UseZGC and have switch some loads over to it permanently. After trialling Z with JMX and Java logging having known metrics formerly with ParallelGC or G1GC (which I normally apply), GC pause times are very low less than milliseconds typically.
Though loads are not running in containers nor have I trialled XX:MaxRAMPercentage XX:InitialRAMPercentage settings to add meaningful commentary.
Regards, Carl.
Copy link to clipboard
Copied
Hi @NicoTexas ,