Playback server memory usage

I installed Play on OSX 10.6 and wanted to test the use of basic memory. I read the deployment documentation and noticed that it was suggested to run the game behind a reverse proxy. What I saw when I started play run myApp , which basically prints a hello world, is this:

 Initial memory usage when started is: 10345 java user 0.1 22 71.5 MB Intel (64 bit) after a few several thousand hits, it grows substantially to: 10345 java user 0.1 26 123.7 MB Intel (64 bit) Which is fine and all, but it slowly creeps up to 140MB after few thousand more test requests. 

My question is aimed at the aforementioned amount of memory, and if these numbers are normal. I looked at the amount of java-memory of playapps.com and according to my conclusions, says that my HelloWorld application will not correspond to the basic plan of 64 MB.

How can it be? Is there a production version of play run myApp that doesn't include development-related features?

+4
source share
2 answers

Have you tried to run the application using the -Xmx64m switch (set "jvm.memory = -Xmx64m" in application.conf). I recently analyzed a lot of Java memory analysis, and it is often lazy in garbage collection. If the maximum memory size is not limited, it does not always struggle to maintain a low memory size.

Running in prod mode will help, since it does not have compiler overhead.

The website is played back on the smallest playapps server, which is 64 MB, and it is much more complicated than the greeting example you give. So the smallest playapps should be good!

+9
source

yes, you can start playback in production mode by configuring:

 %production.application.mode=prod 

or through the command line:

 play run --%production <project> 

I know (this is in some post in the Google Play Framework Google group) that the official page of the project is launched in a small copy of Playapps.net and amounts to 100,000 visits per day (something like this, my memory may be faulty!), and it works great, as you can appreciate.

+2
source

All Articles