The memory size allocated by YARN to the Container in the Hadoop system can be set by the parameter yarn.app.mapreduce.am.resource.mb.