[Mono-dev] Loader Optimization with mono

Rafael Teixeira monoman at gmail.com
Tue Jun 7 12:10:49 UTC 2016


AFAIR, multiple app-domains share things inside the same process.

It's like, for example, in ASP.NET where there are multiple web sites
running in the same web server (thus a single mono/.NET VM instance). If
you use web farming, or as is typical in ASP.NET Core start separate VMs
for each web app, there won't have any sharing of jitted code.

WIth multiple AppDomains in the same process, common code will be jitted
once and shared by all the applications, but beware that different versions
of core libraries will jit to different executable code, meaning possible
duplication of generated code.

As far as you spin multiple VMs these don't share code, for many reasons,
security ones being the top ranked.

Rafael Teixeira
O..:.)oooo

On Tue, Jun 7, 2016 at 5:34 AM, techi eth <techieth at gmail.com> wrote:

> What is meaning of below query
> http://www.mono-project.com/docs/faq/technical/ Can Mono or .NET share
> system classes (loaded from mscore.dll and other libs) or will it behave
> like Sun’s Java VM?
>
> What you can do with mono is to load different applications in their own
> application domain: this is a feature of the CLR that allows sandboxing
> applications inside a single process space. This is usually exploited to
> compartmentalize different parts of the same app, but it can also be
> effectively used to reduce the startup and memory overhead. Using different
> appdomains the runtime representation of types and methods is shared across
> applications.
>
>
> what is the use of below option from mono.
> mono --list-opt
>
> shared     Emit per-domain code
> sched      Instruction scheduling
>
>
> On Sat, Jun 4, 2016 at 1:29 AM, Rodrigo Kumpera <kumpera at gmail.com> wrote:
>
>> Mono doesn't implement LoaderOptimization.
>>
>> On Thu, Jun 2, 2016 at 5:59 AM, techi eth <techieth at gmail.com> wrote:
>>
>>> Does  [LoaderOptimization(LoaderOptimization.MultiDomainHost)] work as
>>> desired on mono?
>>>
>>> I am using Mono 4.2 version on ubuntu  to test.
>>>
>>>
>>>
>>> I had following observation
>>>
>>>
>>>
>>> 1. Exe with this attribute and without this attribute take same memory.
>>> Even I had check shared memory also is same and residual - shared is also
>>> same .
>>>
>>> 2. Is there any tool on linux like Process explorer in windows to verify
>>> that all GAC assembly go to shares memory after this attribute is applied.
>>>
>>>
>>>
>>> _______________________________________________
>>> Mono-devel-list mailing list
>>> Mono-devel-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>
>>>
>>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20160607/bc026020/attachment.html>


More information about the Mono-devel-list mailing list