• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Limit the number of cores ColdFusion uses?

Community Beginner ,
May 04, 2023 May 04, 2023

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.

TOPICS
Server administration

Views

407

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 04, 2023 May 04, 2023

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

Votes

Translate

Translate
Community Expert ,
May 04, 2023 May 04, 2023

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. 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 04, 2023 May 04, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 04, 2023 May 04, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2023 May 05, 2023

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). 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 05, 2023 May 05, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 06, 2023 May 06, 2023

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 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 08, 2023 May 08, 2023

Copy link to clipboard

Copied

LATEST

Thanks Dave, appreciate the recommendation.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation