Grails / Java Web Hosting - critical parameters for memory saving hosting environments
Benchmarking memory consumption - how low can you go?
In my quest for the hosting environment with the least memory requirements for grails and java web application hosting I did some benchmarks over the last time and I want to publish and discuss my results in a series of blog entries. The ultimate goal is to find a hosting environment for one or more Grails and Java web applications as cheap as PHP/MySQL hosting today. The cheapest, but not the easiest one, at the moment is a Linux virtual server with Java and Jetty/Tomcat standard packages installed. My server for example runs with 320 mb fixed memory and another 320 mb dynamic memory for 10 euro per month. Tomcat runs with a maximum heap space of 192 mb. A 640mb hosting would be at 16 euro per month. There are other providers (in germany) who offer 384 mb fixed memory for a 8,85 euro per month (March/2009). Since memory is the main factor for virtual server pricing it seems valuable to seek for the best, memory saving environment.
Parameters of grails / java web hosting environments
I assume hosting will happen on a Linux system on a virtual server. The question is what can I do to keep the memory requirements low and which parameters are relevant? Here is my answer:
- JVM vendor
- JVM version (Java 5 or Java 6)
- JVM heap space and other JVM memory parameters
- 32-bit or 64-bit version for 32-bit or 64-bit OS
- client or server JVM mode
- Servlet container
- Jetty-6.1 (standalone)
- Jetty-6.1 (Grails embedded)
- Tomcat 5.5 (with or without manager application)
- Tomcat 6.0 (with or without manager application)
- Glassfish v3
- Grails Web App oder similiar Java Web App
- Groovy version (1.6.0 versus 1.5.7)
- Grails version (1.1 versus 1.0.x)
Do new Groovy and Grails versions help?
My new series of benchmark results were further motivated through the release of new versions of Groovy and the Grails framework recently. I thought I would know the best combination in advance but I was in for some surprises. Stay tuned.

Hello,
One more hosting solution in France (OVH) : http://www.ovh.com/fr/produits/offres_rps.xml . This is a private server with 512mb RAM (for 9,9€/month).
Good luck
Benjamin
Gesendet von Benjamin Henriet am March 16, 2009 at 11:28 AM CET #
Hello, I've been trying to optimize Grails I/O performance (and buffer memory usage) under high load. Take a look at this JIRA: http://jira.codehaus.org/browse/GRAILS-4315 . It would be cool If you have a chance to test the chances and comment on this JIRA. It might not help to lower memory requirements, but any help is appreciated. :) Regards, Lari
Gesendet von Lari H am March 19, 2009 at 08:01 PM CET #
What is your provider and what are the other providers you talk about?
> There are other providers (in germany) who offer 384 mb fixed memory for a 8,85 euro per month (March/2009)
Gesendet von Stijn am April 28, 2009 at 02:46 PM CEST #
I've been in production with 512mb for well over a year. Only a few out-o-memory issues. Big performance jumps with groovy 1.6.
Gesendet von doyle am June 01, 2009 at 02:22 PM CEST #