David Hardwick
CTO
david.h...@bettercloud.com
Signature by Flashpanel
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/Bs6JKwLYDAMJ.--
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-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to google-appengine+unsubscribe@googlegroups.com.
--
Takashi Matsuo
On Jul 14, 2012 12:42 PM, "Tom Phillips" <tphil...@gmail.com> wrote:
>
> Hi Takashi,
>
> Now that I've added a resident idle instance, the logs seem to confirm
> that only the loading of the resident instance is via /_ah/warmup.
> It's difficult to tell that for sure, but all my current dynamic
> instances were loaded on a user URL, and the current resident
> instance was loaded via /_ah/warmup.
Yes, it is expected behavior.
>
> Resident idle instances are loaded only infrequently, and serve little
> traffic, so of what use are warmup requests if only they get them? The
> vast majority of loading requests are now on user URLs. That's a 20+
> second wait (Java) by a user on almost every loading request.
Those resident instances are used when there is no available dynamic instance. If there's no available resident instance, your user will see the loading requests.
In general, if you see too many user-facing loading requests, there is still a room for raising your number of resident instances in order to reduce the number of user-facing loading requests.
>
> Back in the Always-on days, I would see virtually all loading requests
> use /_ah/warmup, as long as traffic was relatively stable. So an
> instance loading rarely affected an actual user. What do we configure
> now to get this same behavior?
Probably you can not expect the very same behavior.
How many resident instances are you configured? Are you configured the 'Max Idle instances' to 'Automatic'? How spiky is your access pattern? Are you using the concurrent requests?
-- Takashi
On Jul 14, 2012 10:49 PM, "Takashi Matsuo" <tma...@google.com> wrote:
>
>
> On Jul 14, 2012 12:42 PM, "Tom Phillips" <tphil...@gmail.com> wrote:
> >
> > Hi Takashi,
> >
> > Now that I've added a resident idle instance, the logs seem to confirm
> > that only the loading of the resident instance is via /_ah/warmup.
> > It's difficult to tell that for sure, but all my current dynamic
> > instances were loaded on a user URL, and the current resident
> > instance was loaded via /_ah/warmup.
>
> Yes, it is expected behavior.
>
> >
> > Resident idle instances are loaded only infrequently, and serve little
> > traffic, so of what use are warmup requests if only they get them? The
> > vast majority of loading requests are now on user URLs. That's a 20+
> > second wait (Java) by a user on almost every loading request.
>
> Those resident instances are used when there is no available dynamic instance. If there's no available resident instance, your user will see the loading requests.
>
> In general, if you see too many user-facing loading requests, there is still a room for raising your number of resident instances in order to reduce the number of user-facing loading requests.
>
> >
> > Back in the Always-on days, I would see virtually all loading requests
> > use /_ah/warmup, as long as traffic was relatively stable. So an
> > instance loading rarely affected an actual user. What do we configure
> > now to get this same behavior?
>
> Probably you can not expect the very same behavior.
>
> How many resident instances are you configured? Are you configured the 'Max Idle instances' to 'Automatic'? How spiky is your access pattern? Are you using the concurrent requests?
Sorry my above sentences are not correct.
How many resident instances are you having now? Do you set the 'Max Idle instances' to 'Automatic'? How spiky is your access pattern? Are you using the concurrent requests?
--To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/kV3oMH_pUloJ.
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
I would say, the best bet is to set an appropriate number of min idle instances.
> The resident instance handles almost no requests (only 3 so far). If a> dynamic instance needs to be started, couldn't the scheduler send at
> least some requests to the idle instance while calling /_ah/warmup on
> the spawning dynamic one?No at lease for now, because the scheduler can not tell beforehand how long the warmup request will take, and even whether the warmup request will succeed or not, thus those subsequent requests will see the significant, un-predictable pending time and probably elevated error rate in some cases.
I would say, the best bet is to set an appropriate number of min idle instances.Tom,> The resident instance handles almost no requests (only 3 so far). If a> dynamic instance needs to be started, couldn't the scheduler send at
> least some requests to the idle instance while calling /_ah/warmup on
> the spawning dynamic one?No at lease for now, because the scheduler can not tell beforehand how long the warmup request will take, and even whether the warmup request will succeed or not, thus those subsequent requests will see the significant, un-predictable pending time and probably elevated error rate in some cases.Michael,> Under load, I wouldI want user facing requests to hit the resident instance UNTIL a new dynamic instance has been spun up AND hit with a warmup request.If you set enough number of min idle instances to absorb your trafic, it should be Ok.In my understanding, technically, it might be possible for us to provide prediction based warmup request, but it will cause complaints from many people who want to save money. Now we're offering configurable min idle instance, so please consider using this feature.If you have any use-case or experience which can not be covered by setting min-idle-instances, please let us know.-- Takashi
On Mon, Jul 16, 2012 at 12:18 AM, Simon Knott wrote:
Completely agree, seems to defeat the entire purpose of warm-up requests.
On Sunday, 15 July 2012 14:40:14 UTC+1, Michael Hermus wrote:I have to agree with this; it seems completely backwards to me. Wouldn't resident instance warmups be extremely infrequent since they are.... well, resident! Under load, I wouldI want user facing requests to hit the resident instance UNTIL a new dynamic instance has been spun up AND hit with a warmup request.
--To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/kV3oMH_pUloJ.
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+unsubscribe@googlegroups.com.
--
Takashi Matsuo
Hi Takashi. I've read the performancesettings documentation a dozen
times and yet the scheduler behavior still seems flawed to me.
Once a request is taken from the pending queue and sent to an instance
(cold or otherwise), it's dedicated to execution on that instance. In
the queue, it can still be routed to any instance that becomes
available. Why would we *ever* want to send a request to a cold
instance, which has an unknown and unpredictable response time? If I
were that request, I'd want to sit in the queue until a known-good
instance becomes available. Depending on the queue fill rate I might
still end up waiting for an instance to come online... but there's
also a good chance I'll get handled by an existing instance,
especially if traffic is bursty.
needed at that moment." -- this is not an accurate characterization,
"the scheduler starts a new dynamic instance because it is really
because new instances don't provide immediate value. They only
provide value 5+ (sometimes 50+) seconds after they start. In the
mean time, they have captured and locked up user-facing requests which
might have been processed by running instances much faster.
The min latency setting is actually working against us here. What I
really want is a high (possibly infinite) minimum latency for moving
items from pending queue to a cold instance, but a low minimum latency
for warming up new instances. I don't want requests waiting in the
pending queue, but it does me no good to have them sent to cold
instances. I'd rather they wait in the queue until fresh instances
come online.
On Wednesday, July 18, 2012 2:27:45 PM UTC-4, Brandon Wirtz wrote:
> Use warm up requests.
>
> Also optimize your code to load faster. I have an app that is HUGE it
> loads in about 8s. On an F4. It doesn't fit in an F2. Check that you really
Google has to route requests to cold start instances because otherwise, for large scale apps, the pending queue might get way too big, not to mention it could blow up sometime.
Even if you (hypothetically) built a datacenter with 100,000 machines
solely dedicated to hosting a single request queue, that datacenter
can still go down (earthquake, power, hurricane, etc). Far better to
simply dump requests into instance level queues and be done with it.
That's fine, but all we're asking for is "don't dump those requests into an instance that isn't able to serve the request immediately". If there are three instances running and one being started up, don't consider the latter in the population of instances to send requests to. Dump it into an instance level queue that is already running. Everything else remains constant.
That's fine, but all we're asking for is "don't dump those requests into an instance that isn't able to serve the request immediately". If there are three instances running and one being started up, don't consider the latter in the population of instances to send requests to. Dump it into an instance level queue that is already running. Everything else remains constant.
On Thursday, July 19, 2012 2:57:28 AM UTC-5, Richard Watson wrote:I stand to be corrected, but I doubt that Google searches are dumped onto cold instances.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/nwb8Q4Bxx7cJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Sorry, but, please forget about 5 secs 'magic' window. There is no any hard/soft deadline/threshold like that in the current App Engine system.
It was just a one example of well behaved apps. Let me rephrase what I meant to say.
With app engine, it is always a good practice to keep the loading request faster. The current scheduler works much better with fast loading apps than with slow loading apps. So I always suggest developers fastening the loading request.
On the other hand, we understand that Java apps tend to be slow at a level where it is not acceptable for you if there are many user-facing loading requests. For a time being, please use min idle instances settings to reduce the loading requests with slow loading apps.
-- Takashi
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/W1sBfl9Pu2IJ.
Perfect, thanks; that is all I am asking for!
Additionally, we started an internal discussion about reviving warmup requests for dynamic instances. If you want this feature, please star the following issue:-- Takashi
--
Takashi Matsuo
>If you follow the group longer you should know - Brandom lives in GAE unicorn land and all you ever need are proper Edge cache settings. ;)
No, I just don't write code using unnecessary frameworks and I do a ton of testing and architecture planning.
Most everyoneelse never uses defer or threads or task queues. They don't manage steady state tasks, or profile their imports.
It is easy to blame the platform, but if you write crap code it will run like crap.
I don't think GAE is perfect. But most the people who complain about its failings don't have the coding skills to be an intern at my shop.
I blame Google for not documenting everything well. I blame google for not telling you "don't use frameworks they suck".
But the number of people who load spring and the gripe that it is slow and are only using 3 things out of it make me want to punch them in the head.
The people who don't know how to build APIs so that apps are task specific. Piss me off. Build modular. Dump frame works. Defer often. Be your own scheduler by shaping internal ops. Cache incoming. Cache reads cache writes. Manage threads. Use warmups. This is not rocket science.
The people who don't know how to build APIs so that apps are task specific. Piss me off. Build modular. Dump frame works. Defer often. Be your own scheduler by shaping internal ops. Cache incoming. Cache reads cache writes. Manage threads. Use warmups. This is not rocket science.
The intent of that line was that you would save 3.5s dropping factory for the GAE API
But one of my main apps is 2.2s average spinup time, I am pretty sure I can get Hello world in under 1.5.
Are you lazy loading? Are your lazy loads lazy loading? Have you threaded your Lazy Loads?
Class 1 has dependencies ABC, Class 2 has depencies DEF,
Warm up does basically nothing but defer Class1 and Class2
If Cold Start only do Called Class, If first call to instance defer other classes for warm up.
From: google-a...@googlegroups.com [mailto:google-a...@googlegroups.com] On Behalf Of André Pankraz
Sent: Saturday, July 21, 2012 12:27 PM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] Re: Startup time exceeded...on F4?!
Brandon, your 1.5 seconds - I call this nonsense in Java world, thats all. Create empty Java Project with 1 Servlet, disable JDO/Datanucleus stuff, no Framework, nothing.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/tv73lRqnY1MJ.
Read a local resource? You mean you do FileReader?
Don’t do that. That’s bad. Put that in Memcache and read it from memcache. Keep it in memcache at all times.
Never use FileReader. Ever. Unless it is to get an app booted for the very, very first time. It should be in the datastore, and in memcache.
From: google-a...@googlegroups.com [mailto:google-a...@googlegroups.com] On Behalf Of André Pankraz
Sent: Saturday, July 21, 2012 1:00 PM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] Re: Startup time exceeded...on F4?!
Hi,
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/jOg0BaLfu6YJ.
Shit, even putting it in your static and Fetching by URL is faster than File reader.
From: google-a...@googlegroups.com [mailto:google-a...@googlegroups.com] On Behalf Of André Pankraz
Sent: Saturday, July 21, 2012 1:00 PM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] Re: Startup time exceeded...on F4?!
Hi,
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/jOg0BaLfu6YJ.
Shit, even putting it in your static and Fetching by URL is faster than File reader.
No the point is a major limitation of Appengine is that File IO is SLOW so you never do “open file”
You want to do “dynamic” pull that from memory or datastore.
NEVER EVER LOAD DATA FROM FILE OTHER THAN TO POPULATE THE DATASTORE FOR THE FIRST TIME IF YOU CARE ABOUT WARMUP
Yes I have an exception where I do that with a 40 MB pickled file that it is faster than doing 40 reads from the datastore and doing a join because of the memory usage, but that is a weird case.
But yes. You are doing it wrong. And if you would profile your apps you would know you are doing it wrong.
From: google-a...@googlegroups.com [mailto:google-a...@googlegroups.com] On Behalf Of André Pankraz
Sent: Saturday, July 21, 2012 1:19 PM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] Re: Startup time exceeded...on F4?!
I use getRessourceAsStream an Stream-copy - but you miss the point...it's a Hello World, done in 5 minutes as test for your post, stripping away all excuses.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/cTL6IofY1ygJ.
When I said 1.5 I meant PMF was adding 3.5 you don’t need. PMF takes 5s the API takes under 1s. I think 2.5s is probably the lowest you can get and do something truly useful, but it seems that I can do a LOT in 2.5s (assuming the F4 this thread was about when we started) (well actually assuming F2, F4’s seem to need 3s no matter what you do)
But also you don’t have to do anything useful on warmup. So you shouldn’t serve a ColdStart very often.
I have mentioned before I work to keep everything to under 4s. If my App Gets to 8s I start slicing it up
I am also 100% confident that if all you do is say “I am up” your warm up will take under 1.5s for 95% of starts. And that should really do “I am up” and defer lazyloads of everything you need to be ready to do real work.
From: google-a...@googlegroups.com [mailto:google-a...@googlegroups.com] On Behalf Of hyperflame
Sent: Saturday, July 21, 2012 1:47 PM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] Re: Startup time exceeded...on F4?!
I just looked over the logs of a corporate GAE application. It's a very simple "heartbeat" application; essentially our production applications have to send a message to it periodically. The message sent is about 500 characters; the application does some checksum-ing and sends back a JSON string about 100 characters long. The only external libraries are jars of twitter4j and the org.json parser. It's really not much more complex than a Hello World app.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/TDuwyumyZAIJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to google-appengine+unsubscribe@googlegroups.com.
If it makes you feel better I have this fight once a month. AWS that is easier to build for or GAE which doesn’t require any sys admin and is infinitely elastic.
Someone will put something on AWS show me how awesome it is, and how cheap. I will throw the load simulator at it, and watch it burn.
They say but you didn’t give it more instances.
I will say fine every 4th 8 minutes when CNN runs a commercial for the site you need to handle 5000 uesrs, and the rest of the time you need to handle 8.
Which is cheaper?
They always lose.
How do we manage keeping the versioning the same on all instances in AWS? How long is the down time on deploy of new version? (GAE you can deploy, warm up enough instances and change the “Default” version and not even lose sessions)
Every service has plusses and minuses if they didn’t then someone would be a monopoly.
Edge Cache is amazing for most apps it will negate the AWS “savings”. Rapid Elasticity is amazing it will negate even RackSpace savings.
Not taking off the shelf code… That will cost you a developer. Sorry. I would also say most the time, you should be rewriting that code anyway to be exactly what you need, but I get that sometimes what you want is to use Facebook Authorization, and there is no reason to strip stuff out. Except that you have to remember everyone who is not you writes sucky code. Generic code. Meant to run everywhere. Except GAE is not everywhere, it is in unicorn land where you traded having nice friendly donkey’s who will put up with what ever shit you feed them and still pull your wagon, for a flying unicorn that shoots rainbows out of its ass but requires that you don’t just give it a sugar cube every now and then, but that it is raw organic sugar fed to it by beautiful naked virgins. In exchange you can go farther, faster, and you don’t have to clean up poo off the floor. These are the trades you make for living in Unicorn land.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/ozWj4QUDBDkJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
--
This isn't a counterexample, for the reason that you mentioned in the
first sentence: you can serve everything off one instance. The
original poster needs multiple instances, and to be able to scale as
load changes. If you're not loading new instances, then startup time
is pretty much irrelevant; you can start an instance once, then your
users will never see a cold instance. This entire discussion is about
cold instances.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
And this would be why we don’t use contractors. Optimizations aren’t for “Google” they are good practice. When you run on 600 mhz with 128 Megs of ram, you see the optimizations when you have 3.2 Ghz * 8 and 64 gigs of ram, you can’t hardly profile an app. That doesn’t mean you can’t make it twice as efficient.
The tools you know and love suck. You just don’t know it because you are spoiled by big computers. I love my ’50 Merc and my ’66 Stang, but my MiniCooper has a lower cost of operation and has a faster 0-60 and top speed than either of the old Fords do. Because it is optimized.
From: google-a...@googlegroups.com [mailto:google-a...@googlegroups.com] On Behalf Of Mauricio Aristizabal
Sent: Sunday, July 22, 2012 12:28 AM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] Re: Startup time exceeded...on F4?!
I really don't care who has the shiniest toys in this playground, bottom line is that I consider every minute spent getting my app to load faster a complete waste of my time. Adding business logic, minimizing user request times and costs, that's what I care about, not jumping through hoops to get around some design flaw that Google could easily fix if they chose to.
If you have a zillion apps and a huge budget and/or team, and it is cost effective to do a crapload of optimizations, good for you! but I suspect most of us just want to get our apps to work reasonably efficiently, in as little time, and with as many of the tools we already know and love as possible, so we can move on to our next project, client, idea, etc.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/gmXX3iD35ccJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.