Kaan, thanks for the clarification, I blanked on that part of resident. 
Since he mentioned he was moving to modules, I focused only on that. In any 
case, to explain why your shown instances are greater than your billed, 
it's because we don't charge for idle, so it's to be expected.

But yeah, your explanation and troberti are EXACTLY right. The scheduler is 
a bit "black-boxy", so you need to test it and find what is right for your 
app.

Everything said is definitely on par with the behavior of the scheduler. I 
would drop max_concurrent_requests a bit, make sure you don't have too many 
max_idle_instances.

All in all, this is very dependent on the nature of your app, your users, 
and your traffic, so very hard to help you with this, except by suggesting 
tips like the above ones, and suggesting you to test and explore the 
different parameters.

Cheers

On Wednesday, June 3, 2015 at 4:39:18 AM UTC-4, troberti wrote:
>
> The interaction between resident instances and the instance settings are 
> pretty complex. The scheduler tries to keep the resident idle, so what you 
> are seeing is correct. If non-resident instances are busy, the request will 
> be routed to the resident one. This also affects the meaning of the pending 
> latency settings (which are confusing by themselves). The docs mention this 
> in a note:
>
> Note: If you set a minimum number of idle instances, the pending latency 
>> setting will have less effect on your application's performance. Because 
>> App Engine keeps idle instances in reserve, it is unlikely that requests 
>> will enter the pending queue except in exceptionally high load spikes. You 
>> will need to test your application and expected traffic volume to determine 
>> the ideal number of instances to keep in reserve.
>
>
> As for max-idle-instances, I would put that to 1, as Kaan suggested. For 
> us this cut our instance bill in half (!), with no noticeable effect on 
> performance. I have no idea why this is not the default.
>
> Then you also have max_concurrent_requests, which also affect performance, 
> at least on Python. I would recommend that you try a low number, like 2. 
> This might seem counterintuitive, but running more requests concurrently 
> can actually increases response time of all of them. This is something you 
> really have to try and see what fits your app best.
>
> All things considered, I think the application settings are very complex 
> and it is very easy to shoot yourself in the foot with them and make your 
> app perform badly. This is bad for the user, and as a consequence, for App 
> Engine itself. I rather see one default setting that processes requests as 
> fast as possible, which is the ultimate goal right?
>
>  
> On Wednesday, June 3, 2015 at 5:42:54 AM UTC+2, Kaan Soral wrote:
>>
>> In general, my instance charts look similar
>>
>> It's also important to note that, in general, my general instances are >> 
>> my billed instances, so likely there are instances there to serve my 
>> requests, yet I don't pay for them, that's nice :)
>>
>> Resident instances are there as he specified min_instances, so it 
>> shouldn't be related to modules and backends and stuff like that, he is 
>> just using everything as default as far as I understand
>>
>> Miroslav, your charts look regular to me, it might be a good idea to set 
>> min and max instances to 1, that way you will only pay for 1 resident 
>> instance and the extras will not be billed (they will only be billed if you 
>> are actually using them, so this will likely not affect your performance 
>> significantly but reduce your costs instead)
>>
>> I think the main issue is mostly confusion and the black box nature of 
>> the instance scheduler
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/3e9fca8d-0396-4165-a02d-2ce4ba266aa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to