title: How can I configure the heap size when starting a Spring Boot application with embedded Tomcat?
body: <p>I am trying to deploy a <a href="https://projects.spring.io/spring-boot/" rel="noreferrer">Spring Boot</a> powered web app to production. The app is built with Spring Boot 1.0.1 and has the default Tomcat 7 embedded as application server. I want to allocate larger memory to the app when start the app with <code>java -jar myapp.jar</code> command line.</p>
  
  <p>Should I use <a href="https://en.wikipedia.org/wiki/Java_virtual_machine" rel="noreferrer">JVM</a> parameter such as <code>-Xms -Xmx</code> or use environment variable such as <code>JAVA_OPTS</code>? I have tried to look for the answer in documentation or google it, but I did not get an answer. Can anyone give some hints?</p>