Re: IIS Template Cache and Script Engine Cache
From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 03/23/04
- Next message: David Wang [Msft]: "Re: idcs no longer running on IIs 6.0"
- Previous message: Raffaele: "EventID 9"
- In reply to: Peter Conlan: "IIS Template Cache and Script Engine Cache"
- Next in thread: Peter Conlan: "Re: IIS Template Cache and Script Engine Cache"
- Reply: Peter Conlan: "Re: IIS Template Cache and Script Engine Cache"
- Reply: Peter Conlan: "Re: IIS Template Cache and Script Engine Cache"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 23 Mar 2004 00:47:33 -0800
Ok, I went and asked the ASP Dev about it, so I will share what I've
understood. Hopefully, more explanations will be blogged by the dev sometime
soon. At a glance, what I'm going to say does not seem to match anything
that you've asked.
The two concepts you are asking about is the "Template Cache" and "Script
Engine Cache".
The "Template Cache" is a cache of the intermediate form of the particular
ASP page which has all necessary script code (including include files) and
other parsed info from the HTML portions of the ASP page. This template can
be directly interpreted by a Script Engine to produce the ASP page's output.
It is NOT a response cache (i.e. cache of script execution). Treat the
templates as an intermediate form of an ASP page that has not been
interpreted.
ASP has an option to either not use Templates (this is merely a perf issue
and does not affect functionality), cache all Templates in memory, or cache
a portion in memory and the rest on disk inside the configurable "ASP
Compiled Templates" directory.
The "Script Engine Cache" refers to a cache of the actual Script Engine
objects that are used to interpret scripts. These objects are expensive to
create/tear-down per ASP request (sort of like how Processes are expensive
to create/tear-down), so what ASP does is create a pool of Script Engine
objects (you get to control the number of such objects in the pool), and
everytime ASP needs to execute a template to produce output, it uses a free
Script Engine from the pool.
Thus, you can see that "Script Engine Cache" is a direct measure of "how
many scripts can be theoretically executed concurrently by ASP". This
measure of concurrent execution is further bounded by the max number of
worker threads feeding templates into the Script Engines, so it does not
make sense to have this value be very large nor very small (if very large,
you're just wasting memory/resources on Engines that barely get used; if
very small, you end up bottlenecking the concurrency of script execution
because you have more worker threads feeding in templates than there are
available Script Engines to execute them).
The "Template Cache" is basically storing all the necessary pre-processing
of an ASP page prior to actual generation of dynamic response by a Script
Engine from the "Script Engine Cache".
Neither of these caches are the "Response Cache" that you alluded to.
-- //David IIS This posting is provided "AS IS" with no warranties, and confers no rights. // "Peter Conlan" <anonymous@discussions.microsoft.com> wrote in message news:10a9601c40ed3$19a04a40$a301280a@phx.gbl... I have done some reading of various posts and websites trying to get an understanding of theses caches. I have some questions. What I have read says that when an asp page is first requested, a text copy (with all includes inserted into the text) of it is stored in the Template Cache. This text copy is the "Template". My questions are: Does this template contain the HTML code also, or just the script code? Is it really just a copy of the entire asp page? If I understand things so far, none of script has been executed at this point. This is just a copy of the asp page the server can use later (assuming it is still in the cache) rather than going to disk to get it. Correct? My understanding of the Script Engine Cache is that after a page has been put into the template cache, the asp script is interpreted and stored in the template cache. If requested later, the server can use the previously interpreted cache version rather than spending time interpreting it again. My questions on this are: Does the Script Engine Cache contain only script associated with a templates in the template cache? In other words, is it ONLY asp script and no HTML? If there is no HTML, does it get the HTML from it's associated Template? Again, I am assuming that the cached Script Engines are script that has not been executed, meaning the results of of running the script are not in the cache. The cached Script Engine could be executed multiple times with different results depending on the values (from a querystring, or record set, etc. ) supplied to it. Is this correct? I support a large asp site, so I am just trying to get a better understanding of how things work. Thanks, Pete Conlan
- Next message: David Wang [Msft]: "Re: idcs no longer running on IIs 6.0"
- Previous message: Raffaele: "EventID 9"
- In reply to: Peter Conlan: "IIS Template Cache and Script Engine Cache"
- Next in thread: Peter Conlan: "Re: IIS Template Cache and Script Engine Cache"
- Reply: Peter Conlan: "Re: IIS Template Cache and Script Engine Cache"
- Reply: Peter Conlan: "Re: IIS Template Cache and Script Engine Cache"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|