Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] CoreCLR low memory footprint configuration #9779

Open
alpencolt opened this issue Feb 22, 2018 · 7 comments
Open

[Question] CoreCLR low memory footprint configuration #9779

alpencolt opened this issue Feb 22, 2018 · 7 comments
Labels
area-Meta backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity question Answer questions and provide assistance, not an issue with source code or documentation. tenet-performance Performance related issue
Milestone

Comments

@alpencolt
Copy link

We are applying CoreCLR for devices with low RAM and interesting to reduce application's memory consumption. But as you understand such kind of optimizations decrease overall performance usually.

So there is idea to make CoreCLR configuration which enable some JIT optimization (like JIT pitching) or disable (like inlining), which also enable some runtime optimizations which decrease memory consumption.
Is it possible to merge such configuration to upstream? May be do you have already some ideas or proposal for it?

@jkotas @janvorli @BruceForstall
cc @Dmitri-Botcharnikov @gbalykov @kvochko @sergign60 @mlabiuk

@ViktorHofer
Copy link
Member

That might also affect the shared ArrayPool as it caches various types up to a limit of X

@jkotas
Copy link
Member

jkotas commented Feb 22, 2018

We do have various build config switches that lets you configure this. Are you asking whether we can have one build switch that sets multiple of other build switches?

That might also affect the shared ArrayPool as it caches various types up to a limit of X

The ArrayPool needs to be integrated with the GC so that it does not leak memory: https://github.com/dotnet/corefx/issues/25841 or https://github.com/dotnet/coreclr/issues/7747. The GC has configurable policies on what to optimize for (#15469). Once the ArrayPool is integrated with the GC, this should naturally fall out.

@alpencolt
Copy link
Author

@jkotas I'm asking about possibility to add more optimization which decrease memory consumption to upstream. It's not interesting for server applications (as I guess main target for Microsoft) but fit well for smartphones.
And because it's "target specific" optimizations I propose to add one build switch for this configuration.

@jkotas
Copy link
Member

jkotas commented Feb 22, 2018

Majority of these can be just configurable policies. They do not need to be runtime build-time switches. For example, you can choose between server GC and workstation GC for netcoreapp today. Different templates have different defaults for these switches. Console apps default to workstation GC and ASP.NET default to server GC. Similarly, the template for Tizen apps can have different defaults.

The code-pitching is outlier because of it is not implemented pay-for-play and does not work well with debuggers/profilers, so that one is a build switch.

@alpencolt
Copy link
Author

Right, build-time switches aren't needed for things like GC. But what if want to remove relocation of *.ni.dll files on loading. It will decrease launching time and allows to share libraries between processes on Linux, but it decrease overall performance since all code will be PIC. Or for example we can change structure of some tables with meta-data.
Will be it build time time or runtime options is the second question. First of all I'm interesting about possibility to merge such optimization with "penalty" to upstream. Of course will be better to have some knob which enable low memory configuration, but we can do it in our configuration files.

P.S.
I'm not ready to share list of optimizations we need to make more estimations.
If you know some points to look I will be very grateful.

@jkotas
Copy link
Member

jkotas commented Feb 22, 2018

what if want to remove relocation of *.ni.dll
Or for example we can change structure of some tables with meta-data.

These can be command line option for crossgen. Also, for PIC code - I think we would likely want to make it the default.

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 26, 2020
@ericstj ericstj removed the untriaged New issue has not been triaged by the area owner label Jun 25, 2020
Copy link
Contributor

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.

@dotnet-policy-service dotnet-policy-service bot added backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Meta backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity question Answer questions and provide assistance, not an issue with source code or documentation. tenet-performance Performance related issue
Projects
No open projects
Development

No branches or pull requests

6 participants