...
On each worker node, the Node Manager reserves a portion of the available machine memory and CPUs for running YARN containers. For example, on a Dataproc cluster, if your worker nodes are n1-standard-4 VMs (4 cpuCPU, 15gb 15 GB memory), each Node Manager will reserve 4cpus 4 CPUs and 12gb 12 GB memory for running YARN containers. The remaining 3gb 3 GB of memory is left for the other Hadoop services running on the node.
...