How to allocate memory for OpenMRS

Hi everyone! I have installed openmrs 2.4.2 on Ubuntu 20.04 with java 11, tomcat 8 and mysql 8. I have installed tomcat on /var/lib directory using “sudo apt-get install tomcat8”. The computer has 8GB RAM and I am looking at openmrs system information on the Administration page and I see that memory information is Total memory 248 MB Free memory 50MB Maximum Heap Size 1931 MB I have try to read Troubleshooting Memory Errors - Documentation - OpenMRS Wiki trying figure out if I can increase the memory. Is there somewhere else I am supposed to change the settings to increase the memory?