As zh writes, the total memory usage is a complicated function of a lot of parameters, not just the number of atoms. Each element has a different number of valence electrons, which is what matters rather than the number of atoms. Also, we have to consider at least also the basis set size (which is what really matters in determining the matrix sizes), the mesh cut-off, and the k-point sampling.
However, I believe another point is most crucial in your case. If your 8 CPUs share this memory, and you run 8 MPI processes on the machine, the amount of memory available is effectively only 4 Gb, because each MPI process uses the same amount of RAM. So, to test how "large" system you can run, start by using only one CPU, and monitor the memory usage. If, for instance, the job takes 10 Gb, then you can only use 2 MPI processes.