title: Optimising memory consumption for Grails applications deployed on Raspberry Pi
body: <p>I have developed an application using Grails 2.1.1 and I am trying to deploy it on a Raspberry Pi (latest mode B with 512MB RAM) with java 1.8.0-ea + Tomcat7. But when I start the tomcat server, it takes about 30mins to deploy the application and then the response time of the server is very long. I checked the memory and there is around 10MB left, but I guess my application actually consume more RAM than that.</p>
  
  <p>The free memory when the pi bootup is about 387MB. I have tried to deploy a clean app with nothing in it but whatever generated by the default "grails create-app myapp", and the free memory drop to 107MB. Because I need Spring-security-core and Spring-security-ui plugins, so I also tried a clean app with those plugins. In this case, the free memory drops to 88MB.</p>
  
  <p>So is there any way (optimising the code or deployment) to manage the memory consumption of a grails app to around 200MB as I also need to deploy some other things on the same Pi? I also used Hibernate, searchable-plugin and quartz in the application. Or should I give up as it's not possible?  </p>