On Wed, Jan 20, 2010 at 9:03 AM, Stefan Koenig <[email protected]> wrote:
> Hey everyone, > > I'm very new to lift, so maybe this is just some "production"-flip I > don't know about, but I made a few performance tests Lift vs. Rails > and I was a bit surprised that with my configuration Rails won (for a > high number of requests). > > As I said I'm new to Lift, but am using Rails since late 2005 and have > various projects in production, also managing a few of my own servers. > So what I want to say is: Compared to Rails I know nothing about > deploying applications effective in Lift. So that's obviously unfair. > > For testing I used two very basic "hello world"-like applications, > trying to serve the same HTML, with a little layout handling on both > sides. > For Rails I chose Thin server which is more or less on par with > Passenger+NginX stack I use in production (and I know Thin is being > used in production environment). For Lift I took the Jetty server > which came out of the box and I read Jetty is often being chosen over > Tomcat for production. (I couldn't find any obvious deploy guide.) > > After Testing: > > Lift is indeed faster (+ ~93%) in a low number of requests <7000, but > something happens between 7000 and 8000 requests which puts lift into > trouble (Threadpool full?). > Without all the parameters of your test (what JVM, what OS, what JVM flags (memory size, garbage collection flags, etc.), how you were making the requests), it's hard to diagnose the difference. Plus, as Ross points out, you have to run 100,000 requests through the pipeline before the JVM optimizes the JITed code. But, my best guess as to what's happening is that you're making requests without passing the session ID, so Lift is creating 7,000-8,000 separate sessions. Lift keeps sessions in memory and a typical server (unless you're FourSquare) is unlikely to have 7,000 people logged in at the same time. The sessions take up memory and the CPU is consumed with doing garbage collection once you get to 80%+ of RAM taken up by session information. > > Another finding is that the CPU usage of Lift was much higher, than > the one of Rails, even in a low number of requests. (I added > screenshots of the CPU usage in the repository) > > So basically my questions: Did I do something wrong? What happens > between 7000 and 8000 requests? > > You can find all of the data here: http://github.com/koenig/testlift/ > > Thank you, > Stefan Koenig > > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<liftweb%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
