Reputation: 12350
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.
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.
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?
Upvotes: 0
Views: 817
Reputation: 2383
I would not recommend running any non-"Hello World" style Grails application on Raspberry Pi.
In general, 512MB of RAM would be a minimum, in order to have a decent performance on a medium to smaller application.
Tomcat memory usage + your app memory usage on 512MB of RAM doesn't look good on Raspberry Pi to me...
See the second answer from Igor on this related SO question.
Please consider other alternatives Spring MVC or something more lightweight(Not too many proxies, low amount of reflection in the Web Framework, etc.).
Upvotes: 0