Hi Everyone,

I've noticed that CPU occasionally spikes when creating an
HTTPSession.  It only seems to happen when it's been awhile since an
app has been accessed or when an app is initially deployed.

For example, I created a simple test servlet that creates a session
and and writes a response:

protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
   req.getSession();
   PrintWriter writer = resp.getWriter();
   writer.write("Test Complete");
   writer.flush();
   writer.close();
}

When I deploy the app and invoke the servlet for the first time, I see
the following in the admin console:
09-15 05:57AM 29.487 /test 200 7184ms 4381cpu_ms 65api_cpu_ms 0kb
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/
2009011913 Firefox/3.0.6 (.NET C

Note the high CPU and long response time.

Subsequent session creations are much faster.  If I delete my cookies
and re-invoke the servlet, CPU is approx. 70-80ms.

Now, if I leave the app for awhile (let's say an hour) and hit the
servlet again, CPU is once again through the roof for the initial
GET.

Any thoughts about what's going on here?  I know that Google's session
management involves memcache and the datastore.  Could the high CPU be
a side-effect of some initialization routine, etc...?

Thanks for the feedback,
Jamie

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to