Copy link to clipboard
Copied
Hi,
I have a question regarding licensing/cores.
Say, for whatever reason, ColdFusion 2021 was installed on an 8 core VM, but is only licensed for 4 cores (2 x Standard licenses). Is it possible to limit the number of cores CF uses by some mechanism other than reducing the number of cores the VM has? I'm thinking Java startup parameters, or something similar. Or is the only way to get CF to use four cores by reducing the VM core count to 4?
Many thanks!
Mike.
I don't think that ActiveProcessorCount JVM parameter is going to prevent the JVM from using all of the cores. Instead, use "affinity" on Windows, or cgroup or a similar thing on Linux.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
I'll say that I'm not aware of any such jvm or cf config option, so that limiting the VM (or machine) core number would be the only solution.
Copy link to clipboard
Copied
Thanks for the response, Charlie. I certainly couldn't find anything CF-specific either.
Since posting, I have found mention of a JVM parameter:
-XX:ActiveProcessorCount=n
where 'n' is the number of processors required. This sounded promising, but apparently it may only limit the number of threads generated, rather than actually limit CPU usage. I need to do some more reading around that.
I also found information on setting the process affinity on the executable (so limiting at the OS level), which sounds promising. Again, I need to research this more.
In the meantime, if anyone has any experience with either of the two approaches above, I'd be very grateful if you could share!
Many thanks!
Mike.
Copy link to clipboard
Copied
I don't think that ActiveProcessorCount JVM parameter is going to prevent the JVM from using all of the cores. Instead, use "affinity" on Windows, or cgroup or a similar thing on Linux.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
I would second Dave's idea. I think that, as far as the Operating System is concerned, the ColdFusion installation would still be 8-core even if you reduced the ActiveProcessorCount to less than 8.
If you rented an 8-room house, your rents would still be for the 8 rooms, even if you only occupied four. In any case, that's the way I see it.
A fundamental principle in software is to assign responsibility to the artefact, module or class best equipped to fulfill it. I think the responsibility of limiting the number of cores belongs to the Operating System. Hence, I too would recommend affinity (in the case of Windows).
Copy link to clipboard
Copied
Thanks so much for the feedback, everyone, that pretty much confirms the conclusion I'd come to after researching both.
Now, that brings up follow-up question: would setting the affinity of the ColdFusion service(s) to four be recognized by Adobe as a four-core installation, or would it still be seen as eight cores? I realize I can ask Adobe licensing directly, but just wondered if anyone has come across this question previously before I do.
Once again, thanks for your extremely helpful replies!
Cheers,
Mike.
Copy link to clipboard
Copied
I recommend you don't engage with Adobe licensing for a definitive answer, because I don't think you'll get one. If you allocate four processors, and CF uses four processors, then you shouldn't have to ask people how many processors you need to pay for.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
Thanks Dave, appreciate the recommendation.