How should GCache size be determined for PXC?

I am running a 3-node Percona XtraDB Cluster on Kubernetes, where the PV size is selected dynamically by the user on the dashboard (minimum 50GB).

What is the recommended approach for determining gcache.size?

Is there a recommended formula or guideline for calculating gcache.size when the workload is not known in advance?

This blog post: https://www.percona.com/blog/calculate-correct-size-percona-xtradb-clusters-gcache/ should provide you the information you are looking for.

Detailed calculation method:

However, because the cluster needs to be upgraded, in general, it is set to 2G.