How resource pools work?
To better understand how resource pools in vSphere work, consider the following example (image source: VMware):
In the picture above you can see that the root resource pool is a standalone ESXi host Svr001. It has 12,000 Mhz of CPU and 4GB of RAM. A child resource pool named Engineering pool has been created, with the CPU reservation of 1,000 Mhz, the CPU limit of 4,000 Mhz, and the Expandable reservation parameter set. Two VMs are added to the Engineering pool: Eng-Test VM and Eng-Prod VM. Note that Eng-Prod VM has more shares (2000) than Eng-Test VM (1000). This means that, in the case of contention, Eng-Prod VM will get more CPU than Eng-Test VM.
However, keep in mind that the resource allocation occurs at each level in the hierarchy. In this case, Eng-Prod VM will receive 66% of the Engineering pool CPU shares, not the total number of CPU shares on the ESXi host. For example. if we create another resource pool and assign 1000 CPU shares to it, the total number of CPU shares available for VMs in the Engineering pool will be reduced. Here you have an explanation of the proportional share system used in vSphere.