How to modify total memory of existing nodes?

Looking closer you will set MEM_LIMIT to the size of the container RAM for the elasticsearch node. The MAX Best practice is 64GB, and then Elasticsearch will compute the optimmum JVM Heap size. That is good. So Set MEM_LIMIT to 64GB.

64GB = 64*1024^3 = 68719476736

MEM_LIMIT=68719476736

Warning if you are using the 3 node Docker Cluster you will need at least 196GB of RAM on that host plus extra from OS and Kibana etc....

Also that same setting is used for Kibana which is not needed so in the docker-compose.yml I would just set the Kibana mem_limit to say 4GB

Or create a new variable in the .env file like

KB_MEM_LIMIT= 4073741824

and in the kibana section of the compose

mem_limit: ${KB_MEM_LIMIT}