473,378 Members | 1,438 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

JIT on ASP.Net

Hi,

We have a large asp.net app and have a copy out on the web
on a shared server. I believe that the first time you run
any portion (.aspx) of the app for the first time the code
gets compiled. I have observed that the second time I run
the same .aspx it fires up much faster.
I guess my question is, where does this compiled code
reside, in memory or on disk? And what, aside from
changing the code, causes it to need to be recompiled.

On the shared server, if I run the code and then come back
a few days later it seems to need to be recompiled (runs
much slower the first time). If they knock down the
asp.net process will this cause it. If too many users
does the compiled version get removed from memory?

Thanks,
John
Nov 18 '05 #1
8 2035
okay the process of JITing is pretty straight forward... it compiles what it
thinks you are going to use....
if first page is heavy.. and uses many many objects then those parts will be
compiled as well.... (it only does a partial compile of the assembly)
so yes the first time you will have an additional time for compilation...
It is stored in harddrive
The path where it stores the compiled version is somewhere in this dir
C:\WINXPPRO\Microsoft.NET\Framework\v1.1.4322\Temp orary ASP.NET Files
(replace winxppro with windows dir on your machine and v1.1.4322 with your
version of framework

the native copy is discard if it has not been used for a while. and the
first request after its discarded causes step 1... JITing... (The reason is
that it can make more optimisations)

--
Regards,

HD

Once a Geek.... Always a Geek
"John" <an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...
Hi,

We have a large asp.net app and have a copy out on the web
on a shared server. I believe that the first time you run
any portion (.aspx) of the app for the first time the code
gets compiled. I have observed that the second time I run
the same .aspx it fires up much faster.
I guess my question is, where does this compiled code
reside, in memory or on disk? And what, aside from
changing the code, causes it to need to be recompiled.

On the shared server, if I run the code and then come back
a few days later it seems to need to be recompiled (runs
much slower the first time). If they knock down the
asp.net process will this cause it. If too many users
does the compiled version get removed from memory?

Thanks,
John

Nov 18 '05 #2
asp.net actually has two phases.

1) parse and compile. when the application is loaded for the first time,
(first hit to any asp.net page), all pages in the application must be parsed
and compiled. the produced assemblies are created in a temp dir controlled
by asp.net. after parse and compile, the assembly is loaded in memory. this
needs to be done everytime an application is loaded into the asp.net worker
process. reloads are forced if the service is recycled, a file change is
made in the application directory, the application times out, or is recycled
for using too many resources.

2) jit. when an assembly is loaded into memory it must be jit'd first. the
jit'd assembly is cached on disk by the GAC. Each assembly has a unique
moniker which is used to lookup cached jit if its still there. non global
jits are deleted when space is required.

the next release will allow pages to be parsed and compiled separately
rather than all at once, and there will be support for compiling the
assembly ahead of time. the jit will work as before. a precompiled site will
only need rejitting if the GAC cache is flushed, or the assembly is updated.
-- bruce (sqlwork.com)


"John" <an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...
Hi,

We have a large asp.net app and have a copy out on the web
on a shared server. I believe that the first time you run
any portion (.aspx) of the app for the first time the code
gets compiled. I have observed that the second time I run
the same .aspx it fires up much faster.
I guess my question is, where does this compiled code
reside, in memory or on disk? And what, aside from
changing the code, causes it to need to be recompiled.

On the shared server, if I run the code and then come back
a few days later it seems to need to be recompiled (runs
much slower the first time). If they knock down the
asp.net process will this cause it. If too many users
does the compiled version get removed from memory?

Thanks,
John

Nov 18 '05 #3
Thanks for the response. Is there any way to adjust
the 'not been used for a while' time frame?

-----Original Message-----
okay the process of JITing is pretty straight forward... it compiles what itthinks you are going to use....
if first page is heavy.. and uses many many objects then those parts will becompiled as well.... (it only does a partial compile of the assembly)so yes the first time you will have an additional time for compilation...It is stored in harddrive
The path where it stores the compiled version is somewhere in this dirC:\WINXPPRO\Microsoft.NET\Framework\v1.1.4322\Tem porary ASP.NET Files(replace winxppro with windows dir on your machine and v1.1.4322 with yourversion of framework

the native copy is discard if it has not been used for a while. and thefirst request after its discarded causes step 1... JITing... (The reason isthat it can make more optimisations)

--
Regards,

HD

Once a Geek.... Always a Geek
"John" <an*******@discussions.microsoft.com> wrote in messagenews:02****************************@phx.gbl...
Hi,

We have a large asp.net app and have a copy out on the web on a shared server. I believe that the first time you run any portion (.aspx) of the app for the first time the code gets compiled. I have observed that the second time I run the same .aspx it fires up much faster.
I guess my question is, where does this compiled code
reside, in memory or on disk? And what, aside from
changing the code, causes it to need to be recompiled.

On the shared server, if I run the code and then come back a few days later it seems to need to be recompiled (runs
much slower the first time). If they knock down the
asp.net process will this cause it. If too many users
does the compiled version get removed from memory?

Thanks,
John

.

Nov 18 '05 #4
<an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...
Thanks for the response. Is there any way to adjust
the 'not been used for a while' time frame?


There should be through <processModel> in machine.config but none of the
options I fiddled with so far seem to have the slightest effect as to
keeping the app alive. No matter what I try, the app ends with the last
session. I am now trying to keep the app up by generating a dummy requests
automatically every so many minutes (< half the session timeout).
Considering the amount and sort of information available on the subject this
seems the only way.

I had just sorted out all kinds of nifty caching schemes for my dynamic
content. Of course that all goes down the drain (and worse) when the app
shuts down as you also experienced.

Martin.
Nov 18 '05 #5
<an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...
Thanks for the response. Is there any way to adjust
the 'not been used for a while' time frame?


There should be through <processModel> in machine.config but none of the
options I fiddled with so far seem to have the slightest effect as to
keeping the app alive. No matter what I try, the app ends with the last
session. I am now trying to keep the app up by generating a dummy requests
automatically every so many minutes (< half the session timeout).
Considering the amount and sort of information available on the subject this
seems the only way.

I had just sorted out all kinds of nifty caching schemes for my dynamic
content. Of course that all goes down the drain (and worse) when the app
shuts down as you also experienced.

Martin.
Nov 18 '05 #6
process model settings aren't all, you need to play with the iis settings as
well depending on what version of iis you run. I've implemented this and i
can honestly say that my app takes about 3 -4 weeks before a recycling event
takes place ecause it is stateful and i'm not using the database to store
state information but it is being stored in a global static variable. i
think, not sure, that my iddle timeout AND timeout is set to infinite. I can
check for you if you really need an answer to this.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Martin" <du***@somewhere.nl> wrote in message
news:40***********************@news.wanadoo.nl...
<an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...
Thanks for the response. Is there any way to adjust
the 'not been used for a while' time frame?
There should be through <processModel> in machine.config but none of the
options I fiddled with so far seem to have the slightest effect as to
keeping the app alive. No matter what I try, the app ends with the last
session. I am now trying to keep the app up by generating a dummy requests
automatically every so many minutes (< half the session timeout).
Considering the amount and sort of information available on the subject

this seems the only way.

I had just sorted out all kinds of nifty caching schemes for my dynamic
content. Of course that all goes down the drain (and worse) when the app
shuts down as you also experienced.

Martin.

Nov 18 '05 #7
Alvin,
process model settings aren't all, you need to play with the iis settings as well depending on what version of iis you run. I've implemented this and i
can honestly say that my app takes about 3 -4 weeks before a recycling event takes place
I believe you. I did look for timeout settings on the IIS tabs but didn't
find anything there regarding shatdown delays. I vaguely remembered I had
seen these settings but now I realise that was COM+. Component Services. I
would still like to know how it is done, I can hardly believe it is not
possible to manipulate through configuration.

However, I don't need it anymore. My little app that sends a requests every
user-definable couple of minutes is done and works perfectly, it is keeping
my app hot till the cows come home. I posted it here yesterday morning but I
never saw it appear. Is it impossible to post messages with file attachments
here? I guess so, I never saw any.
think, not sure, that my idle timeout AND timeout is set to infinite. I can check for you if you really need an answer to this.


What do we actually really need? :-) I would like to try. I found part of
what caused the problemjust now. As often it comes down to reading properly.
MSDN Library says:

"The managed code configuration system does not read the <processModel>
configuration settings. Instead, they are read directly by the
aspnet_isapi.dll unmanaged DLL. Changes to this section are not applied
until IIS is restarted."

which I did not do while I was trying different settings. Still, if the
default is Infinite, why does it not adhere to that? Well, there's more,
directly under the remark about restarting IIS:

"If you install ASP.NET on a domain controller, there are special steps you
must take to make the installation work properly. For more information, see
article Q315158, "ASP.NET Does Not Work with the Default ASPNET Account on a
Domain Controller," in the Microsoft Knowledge Base at
http://support.microsoft.com."

My server is a domain controller... Something with a weak acount that is not
available on domain controllers... But they fixed it with Framework version
1.1 . So, still a mistery.

It (MSDN Library) finaly says something about a suspected deadlock state as
a possible reason for an application shutdown and that I might want to try
increasing the responseDeadlockInterval setting.

Tomorrow is another day.

Martin.
Nov 18 '05 #8
hey my policy is if it works well don't muck with it.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Martin" <du***@somewhere.nl> wrote in message
news:40***********************@news.wanadoo.nl...
Alvin,
process model settings aren't all, you need to play with the iis settings
as
well depending on what version of iis you run. I've implemented this and
i can honestly say that my app takes about 3 -4 weeks before a recycling

event
takes place


I believe you. I did look for timeout settings on the IIS tabs but didn't
find anything there regarding shatdown delays. I vaguely remembered I had
seen these settings but now I realise that was COM+. Component Services. I
would still like to know how it is done, I can hardly believe it is not
possible to manipulate through configuration.

However, I don't need it anymore. My little app that sends a requests

every user-definable couple of minutes is done and works perfectly, it is keeping my app hot till the cows come home. I posted it here yesterday morning but I never saw it appear. Is it impossible to post messages with file attachments here? I guess so, I never saw any.
think, not sure, that my idle timeout AND timeout is set to infinite. I can
check for you if you really need an answer to this.


What do we actually really need? :-) I would like to try. I found part of
what caused the problemjust now. As often it comes down to reading

properly. MSDN Library says:

"The managed code configuration system does not read the <processModel>
configuration settings. Instead, they are read directly by the
aspnet_isapi.dll unmanaged DLL. Changes to this section are not applied
until IIS is restarted."

which I did not do while I was trying different settings. Still, if the
default is Infinite, why does it not adhere to that? Well, there's more,
directly under the remark about restarting IIS:

"If you install ASP.NET on a domain controller, there are special steps you must take to make the installation work properly. For more information, see article Q315158, "ASP.NET Does Not Work with the Default ASPNET Account on a Domain Controller," in the Microsoft Knowledge Base at
http://support.microsoft.com."

My server is a domain controller... Something with a weak acount that is not available on domain controllers... But they fixed it with Framework version 1.1 . So, still a mistery.

It (MSDN Library) finaly says something about a suspected deadlock state as a possible reason for an application shutdown and that I might want to try
increasing the responseDeadlockInterval setting.

Tomorrow is another day.

Martin.

Nov 18 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL)...
2
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
3
by: James | last post by:
Hi, I have a form with 2 fields. 'A' 'B' The user completes one of the fields and the form is submitted. On the results page I want to run a query, but this will change subject to which...
0
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. ...
1
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the...
4
by: Albert Ahtenberg | last post by:
Hello, I have two questions. 1. When the user presses the back button and returns to a form he filled the form is reseted. How do I leave there the values he inserted? 2. When the...
1
by: inderjit S Gabrie | last post by:
Hi all Here is the scenerio ...is it possibly to do this... i am getting valid course dates output on to a web which i have designed ....all is okay so far , look at the following web url ...
2
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value...
3
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.