"Number of executors" parameter setting of creating a node

Hello,I’m currently confused when creating nodes.Assume that I create two nodes A and B. They are connected to the controller through SSH (Launch agents via SSH). Node A and node B are connected to the same machine. That is, the Host parameter is the same. The Number of executors of node A and node B is set to the number of CPUs of the machine. What is the difference between creating a node C and connecting to a node C and setting Number of executors to 2 x CPUs?

You could assign different labels for the 2 nodes that run on the same machine. We also have this with one node having only 1 executor which is doing CPU intensive stuff and a second node that has several executors but different labels running some simple scripts that don’t need much CPU.
Another thing might be that the 2 nodes are running in different directories that are on different partitions.
if labels and root dir are the same then I see no reason why to have 2 nodes

I’d like to ask how these two methods affect the CPU utilization of the machine. When introducing the Number of executors parameter, it is recommended that the number of CPUs be set to the number of CPUs of the machine. However, I can run normally after setting the number to 50, and the performance is not affected.

I would not set the number of executors to the number of CPU. The number of executors determines how many Jenkins jobs run in parallel on a machine. So it strongly depends on what those jobs are doing. Usually compiling something will use more than one CPU, e.g. we build a large C++ project and a single build will consume all CPUs (80) and almost all memory.
You also need to consider IO and memory usage of the things you run in a job. If your machine has 20 CPUs and 64GiB memory, but a single build will use 8GiB memory you can’t run 20 builds in parallel.
As stated earlier when labels are identical for 2 nodes that connect to the same machine as the same user then there is no difference to a single node with the double executors. It is even worse as you then have 2 java client processes running.
What you should not do is have 2 nodes with the same root on the same machine, this will cause problems when both nodes try to build the same job