Also keep in mind that Python and Java differ here. Unless Google brushed the dust off an old JVM with green threads, Java threads are OS-native threads and will timeslice even cpu-bound operations. This isn't necessarily a good or bad thing.
Jeff On Sun, Oct 16, 2011 at 2:32 PM, Brandon Wirtz <[email protected]> wrote: > There is no such thing as “parallel” there is sliced and unsliced. You > would have to ask GOOG how it is implemented, but my understanding is that > process A executes, and process b executes during process A’s wait states. > > > > If you have no wait states the thread sits paused until the other thread has > finished. > > > > > > > > From: [email protected] > [mailto:[email protected]] On Behalf Of Andrei Cosmin > Fifiita > Sent: Sunday, October 16, 2011 12:47 PM > To: [email protected] > Subject: Re: [google-appengine] Maximum concurrent user requests > > > > Well, the requests are independent form each other (threadsafe) and are only > related to datastore (each request also triggers task creation for different > log writes). Should't all request that arrive "at the same time" be resolved > in parallel ? > > > > On 16 October 2011 20:34, Brandon Wirtz <[email protected]> wrote: > > Concurrency isn't as "concurrent" as a lot of people think it is. Just like > Multi-Tasking. > > If your App does "Calculate the pi to the power of X and return the > Significant Digit in Y position" Your App will consume 100% of the CPU and > you get 0 Concurrent request. If it does so fast enough the Pending Latency > may allow a single instance to respond to a bunch of requests that arrive at > the same time, but they will process in Serial. > > If your app does "Fetch X URL and return bytes 1234 through 4321" Most of > the time will be spent in the FetchURL Api, and while that is happening > other requests can execute. > > Because of this My APP that uses about 98% CPU from API's has HUGE > concurrency on Python 2.7. but Huge is still something like 8 not 80. But > when you pay for instances, not consumed CPU this saved me a lot of money. > > In any event, your answer is: It depends on how you are using the CPU > Cycles, and how you use API's or other things that would create a wait > state, along with what the pending latency is. > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Ice13ill > Sent: Sunday, October 16, 2011 9:25 AM > To: Google App Engine > Subject: [google-appengine] Maximum concurrent user requests > > Hello, i know that you can allow concurrent user requests, for example, in > java, by specifying threadsafe = true in your appengine- web.xml, but how > many requests can be actually executed by a servlet in parallel ? > For example, if N users make a request at the same moment, will there be a > number of requests put into wait ?. Let's say M user requests will be > treated (M < N ) and M-N requests will wait ? > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" 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/google-appengine?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" 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/google-appengine?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" 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/google-appengine?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" 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/google-appengine?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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/google-appengine?hl=en.
