Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2006

Tip: Looking for answers? Try searching our database.

.net runtime optimization service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Erik B. - 20 Jan 2006 22:18 GMT
Question about the .net optimization service:

I have been having an issue where my system has been running out of disk
space constantly, after going through the usual spyware/virus scans etc.  I
noticed in my error logs that the .net runtime optimization service was
logging numerous information entries.  After some investigation I found that
my assembly directory was 5gb.  Under the Native Images directory for 2.0,
and under each directory for each assebly there were multiple copies of each
native image for each assembly.  After stopping the .net runtime optimization
service these duplicates stopped.  What I'm trying to figure out is why this
happened so that I can correct the problem.  Any help would be appreciated.

Thanks,
Erik Beltran
Solutions, LLC
Richard Grimes - 21 Jan 2006 17:03 GMT
> Question about the .net optimization service:
>
[quoted text clipped - 9 lines]
> happened so that I can correct the problem.  Any help would be
> appreciated.

I don't have any solutions, just some questions. Yiou say that you have
multiple copies, can you explain how. The optimization service names the
native image using the tag ni (eg the native image for lib.dll is
lib.ni.dll) Thus in one folder you can have just one copy. Each version
has a separate folder, are you seeing multiple copies corresponding to
multiple versions of an assembly? Do you have multiple users on your
machine? When I check the security descriptor of (for example)
mscorlib.ni.dll on my machine I find that the owner is my account
(although the command line tool cacls does not give you the owner, it
will list the owner in the list of account rights that it will display).

Richard
Signature

Fusion Tutorial: http://www.grimes.demon.co.uk/workshops/fusionWS.htm
Security Tutorial:
http://www.grimes.demon.co.uk/workshops/securityWS.htm

Erik B. - 21 Jan 2006 23:14 GMT
For Example:

In c:\windows\assembly\NavtiveImages2_v2.0.50727_32 there is a directory for
each assembly my machine looks something like this:

c:\
   windows
       assembly
           NativeImages@_v2.0.x
               System
                   at this level there are multiple directories and each
one has a copy of system.ni.dll  

hope this helps, again I stopped it from creating more directories by
shutting down the optimization service, but I would like to know what is
causing it to happen.

Thanks.

> > Question about the .net optimization service:
> >
[quoted text clipped - 22 lines]
>
> Richard
Richard Grimes - 23 Jan 2006 14:08 GMT
> hope this helps, again I stopped it from creating more directories by
> shutting down the optimization service, but I would like to know what
> is causing it to happen.

I haven't been able to decipher what the directory names below the
directory with the name of the assembly, it may just be derived from the
time and date, or maybe it is a hash of the native image.

One thing you should be aware of is that .NET link demands are performed
at JIT time which means that if your security policy changes then .NET
will have to ngen all the native images again to take into account the
new security settings. Have you changed the CAS security on your machine
recently?

If it was my machine, I would be tempted to write a small program that
uses a type in one of the assemblies with a native image and in the
program I would print out

Assembly.GetExecutingAssembly().Codebase

(or maybe even assume that the last folder created has the native image
that would be used)

Then I would rename the other folders (add .old to the end of the
existing name) and after testing, if I was convinced those native images
weren't used, I would delete them.

Of course, you would only do this too at your own risk!

Richard
Signature

Fusion Tutorial: http://www.grimes.demon.co.uk/workshops/fusionWS.htm
Security Tutorial:
http://www.grimes.demon.co.uk/workshops/securityWS.htm


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.