Deployment bottlenecks

11 views
Skip to first unread message

Mahmoud Sakr

unread,
Aug 31, 2010, 6:51:05 PM8/31/10
to play-fr...@googlegroups.com
I am deploying my play application on a dedicated server. I have updated the mode to prod, and kept everything else the same as it was during dev.

However, I am getting HUGE peaks as soon as I start (or run) my server. Are there any options I should be changing for production environment to avoid performance issues? Database for example?

I am using the built-in play HTTP server.

Mahmoud Sakr

unread,
Aug 31, 2010, 6:56:34 PM8/31/10
to play-fr...@googlegroups.com
This is a snapshot of the process list as soon as I run the server (before making any requests)
Screen shot 2010-09-01 at 1.52.40 AM.png

green

unread,
Aug 31, 2010, 9:37:08 PM8/31/10
to play-fr...@googlegroups.com
when you start play app in "prod" mode, it will compile all java code in your app folder (including template files) and then bootup. After the server started up (listening on a port), the performance should be no worse than in "dev" mode.

Probably you can run "play precompile" and then deploy to your prod server.

On Wed, Sep 1, 2010 at 8:56 AM, Mahmoud Sakr <m...@sakr.me> wrote:
This is a snapshot of the process list as soon as I run the server (before making any requests)

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Mahmoud Sakr

unread,
Sep 1, 2010, 7:04:13 AM9/1/10
to play-fr...@googlegroups.com
Does play store my bytecode on my filesystem, or does it use my memory?

I am testing this thoroughly, and as you've said my CPU peaks are temporarily during compilation. However when I use prod mode and right after my compilation is over, my memory % peaks and stays constant. (Attached screenshot, near the end, @memory percentage: 20.8)

I feel hosting this on using a different frontal-end HTTP server will not help because this seems an issue of how play does its back-end work.

My application is presumably large scale, with my app dir exceeding 3.5MBs. I fear this might mean play does not scale well with larger applications?

Is there a way to work around this issue?
Screen shot 2010-09-01 at 1.57.08 PM.png

Julien Tournay

unread,
Sep 1, 2010, 7:37:19 AM9/1/10
to play-fr...@googlegroups.com
Hi,

That's not necessarily a problem. 
Your java process is using 192Mo, that doesn't mean that Play is using it, just that the JVM has allocated that amount of mem.
Play! does scale well with large app, but if you want to run a really large app, 1GB of ram is definitively not much.

Julien.

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.



--
Real Programmers don't need comments-- the code is obvious.

Mahmoud Sakr

unread,
Sep 24, 2010, 8:43:42 AM9/24/10
to play-fr...@googlegroups.com
I've tried hosting my application on a trial slot on playapps.net, and the meters don't seem to indiciate a problem.

I thought the problem may have been in the db storage medium and deployment mode. I have switched to prod mode, used an MySQL database and the performance is still an issue. I am getting high peaks (28%) from java, still.

How does playapps host the applications on its servers? I don't mind seeking a more advanced solution as far as it solves the issue.

Julien Tournay

unread,
Sep 24, 2010, 9:43:33 AM9/24/10
to play-fr...@googlegroups.com
Hi,

You said the performance is a problem, but have you tried to run load tests? What are the results ?
CPU peaks, and the mem allocated by the JVM don't mean anything about performances, or ability to scale.

jto.

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

Mahmoud Sakr

unread,
Sep 24, 2010, 8:39:56 PM9/24/10
to play-fr...@googlegroups.com
The performance issues I am facing are regarding memory usage.

The speed of the application is not a problem -- the load time is very fast indeed. As I said, my main problem is with memory usage and how that could be reduced.

Guillaume Bort

unread,
Sep 25, 2010, 8:01:18 AM9/25/10
to play-fr...@googlegroups.com
> How does playapps host the applications on its servers? I don't mind seeking a more advanced solution as far as it solves the issue.

Pretty standard:

Debian 5 + A standard HotSpot JVM running with 64Mo of heap + MySQL + Lighttpd

> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
>

--
Guillaume Bort, http://guillaume.bort.fr

For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com

Reply all
Reply to author
Forward
0 new messages