You only get the benefit of threads if you have unused CPU cycles. If you
are only spending .1% of the time waiting on API's than you don't have any
"Spare" CPU to start on the next task.

 

Your app will perform as you said, instances will queue up and the first
request will take the same amount of time as it did before, the second
request will take twice as long, and so your average will be 50% longer than
it was on 2.5.

You might test F2 instances with thread safe. In some cases we have found
these to be Significantly faster for Request 1.

 

With F1 and thread safe you would see 

 

100Ms for 1st request
200MS (100+100) for 2nd request.
Average 150ms


With F1 With out thread safe



2 instances would handle requests in 95ms

 

F2 With Thread Safe 

50MS for 1st Request
100MS for 2nd Request
Average 75MS

 

This F2 Time is As a Result Faster, and The same Price if not Cheaper than
the F1's with out thread safe.

 

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Felippe Bueno
Sent: Thursday, March 08, 2012 3:35 PM
To: [email protected]
Subject: Re: [google-appengine] My expirencie with python 2.7 and others

 

Thanks for your answer Brandon.

 

Let me see if I understand.

 

I'm like only 0.1% API calls CPU.

You are saying that threadsafe is not a good idea to me ?

 

I mean, instances were cuted to half, but latency was the double of python
2.5.

 

 

Thanks again.

 

 

On Thu, Mar 8, 2012 at 7:27 PM, Brandon Wirtz <[email protected]> wrote:

>I need to choose between, save money (half of instances) or run fast. That
should make sense, but in my opinion, 

>python 2.7 should comes to save us money, running at same speed of python
2.5.

>Am I wrong ?

 

Yes you are wrong.  Thread safe only saves you money if you are waiting on
API's enough to save money.

 

If you look at your Dashboard and 85% of your CPU usage is API's you will
likely go faster and save money with Thread safe.


if you are 85% CPU, unless you always have 10 instances you may save a
little money but you will go slower.

 

If you are at 50% API's and always have 20 instances, thread safe will make
you a lot faster and cut your bill in half.

 

 

-- 
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]
<mailto:google-appengine%[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.

Reply via email to