You can increase the amount of RAM to be made available to SNAP as suggested here:
- S2 export into tiff - NaturalRGB or Falso color infrared RGB
- S1 TOPS Coregistration error - Java heap space error?
- Problem creating image from a band
In your case, setting -xmax to 8G seems reasonable.
But please be a aware that a PCA can take very long even with high performance computers. Please check the discussion here: Normalized Eigenvalues in PCA
How much bands do you use for the PCA and what are their dimensions?