On Jul 21, 4:50 pm, Tomas <tomas.ada...@gmail.com> wrote: > I use spring in work for other projects which runs on full java stack (but > thats just Tomcat/Jetty) and when I run the "new" librarist equivalent code > on Micro instance on AWS (which is like 600MB ram and 1.8Ghz - I might be > wrong here a little bit), the startup is 2-3 secs and I can serve all my > traffic with it with load at max 0.5. > > When I run the similar code on GAE, I get 45+ secs startup... > > Okay thats cool, I can understand the GAE is different and basically it > could be used just for small projects where you write everything by > yourself and don't use any normal stuff like Dependency Injection / > Proxying and similar. But my biggest question for GAE guys would be this - > why the hell the startup takes so long simply I don't get what is actually > the issue here: > > - is it loading of the jars from the network (virtual drive) when the gae > loads each class as separate file > - is it the scanning of the classes (annotations etc) > - is it java reflections > - is it creating of proxies
One (small) reason why GAE is slower is just that instances are smaller than comparable AWS instances. An AWS Micro is 613mb RAM and can temporarily use 2 ECU of CPU (looking at Amazon docs, they claim that 1 ECU is equal to a 1 ghz 2007 opteron). A GAE F1 is 128 mb of RAM and 600mhz. I bet that the major reason is just network I/O, for the GAE servers to find an available server, transfer a copy of the application +libraries to that server, and start up the servlet runner. It would explain why even simple apps have long startup times: it's not that the frameworks and libraries are taking a long time, it's just the overhead of moving all those libraries into place initially. This also suggests a simple solution to the problem: just integrate a copy of commonly used libraries (spring, guice, twitter4j, etc) into the servlet runner. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.