A default amount of RAM is configured based on the selected guest OS. The specified RAM is the memory the OS will present to its system; it's also the maximum amount of RAM the VM can claim from the physical memory installed on the host.
Assigning memory to the virtual machine does not automatically mean that the amount of memory will no longer be available on the ESXi hypervisor level. If the virtual machine is not accessing the memory (see the active memory used performance metric), memory over-commitment techniques can be used to spin more virtual machines.
Note that if you are using over-commitment techniques for memory, you should carefully monitor the active memory used, so it does not exceed the total available amount of memory on the ESXi hypervisor. Otherwise, swapping might occur, affecting the performance of the virtual machines.
Memory optimization techniques are mostly the same as they were in previous versions of VMware vSphere, but with one significant difference. From vSphere 6.0, in Transparent Page Sharing (TPS), page sharing is enabled by default within VMs (intra-VM sharing), but is enabled between VMs (inter-VM sharing) only when those VMs have the same salt value. This change was made to ensure the highest security between VMs.
In vSphere 6.7, a VM supports a maximum of 6,128 GB of RAM (with the latest virtual hardware versions).