Note that there are some explanatory texts on larger screens.

plurals
  1. POPlay framework on Mac, performance issue
    primarykey
    data
    text
    <p>I have installed Play framework on my Macbook pro. Play 1.2.4 on the latest 10.7.3. I have 8 GB memory and i7 Quad core cpu (shows 8 cores).</p> <p>This is all extremely cool and I am having fun coding in play. But then I just wanted to see what a performance I should be getting in production, so I changed the application config like this :</p> <pre><code>prod.application.mode=prod </code></pre> <p>My application class only has 1 method</p> <pre><code>public static void index() { String theman = "You are the man"; render(theman); } </code></pre> <p>and my application template for index is this :</p> <pre><code>#{extends 'main.html' /} #{set title:'Home' /} The man is ${theman} </code></pre> <p>Thats all.</p> <p>When I run apache benchmark on this like :</p> <p>ab -n 1 -c 1 <a href="http://localhost:9000/">http://localhost:9000/</a></p> <p>I get good numbers, but if I got to -n 10 everything just hangs and my computer goes to 100% load on 1 core and just stays there for ever.</p> <p>I used to get HEAP errors but I set this as an environmental variable :</p> <pre><code>export _JAVA_OPTIONS="-Xms800m -Xmx1500m" </code></pre> <p>And now I no longer get any errors, anywhere.</p> <p>My co-worker tried my app which I tarred and gzipped before sending over, he can easily do -n 10000 -c 1000 an dit just runs and finished in no time at all, almost instantaniously.</p> <p>So my question is, do I have to set any other system variables or what do I need to do to make my Play app run on my mac ?</p> <p>Just to clear things, my mac is totally up to date by today, everything is 99% as it came from the factory, probably closer to 100%, except that I do have xcode and such installed.</p> <p>My java is :</p> <pre><code>java version "1.6.0_29" Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11D50b) Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode) uname -sa Darwin xxx.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload