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

Correct way to enable Server GC in RC2? #1237

Closed
jeremymeng opened this issue May 17, 2016 · 9 comments
Closed

Correct way to enable Server GC in RC2? #1237

jeremymeng opened this issue May 17, 2016 · 9 comments
Assignees
Labels
Pri0 Urgent priority
Milestone

Comments

@jeremymeng
Copy link
Member

The migration guide suggests something like the following, which seems from aspnet/Announcements#175

{
  "runtimeOptions": {
    "gcServer": true,
    "gcConcurrent": true
  }
}

However, when I tried on RC2, it doesn't work for me. I had to use the code below

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  }
@danroth27
Copy link
Member

@ajaybhargavb @piotrpMSFT

Here is what I see in our RC2 templates:

  "runtimeOptions": {
    "gcServer": true
  }

When you say that the above doesn't work for you can you clarify what exactly you are seeing? How are you detecting whether server GC is being used?

@jeremymeng
Copy link
Member Author

I have this code:

            if (GCSettings.IsServerGC)
            {
                Console.WriteLine("Server GC");
            }
            else
            {
                Console.WriteLine("Workstation GC");
            }

It prints out "Workstation GC" when I use gcServer": true

@jeremymeng
Copy link
Member Author

A related issue: https://github.com/dotnet/cli/issues/2121
A related commit: aspnet/Benchmarks@b763266

@ajaybhargavb
Copy link
Contributor

@danroth27, I think the structure of runtimeOptions has changed since the announcement. dotnet/aspnetcore#1418 (comment)

@danroth27
Copy link
Member

@sayedihashimi @phenning @ajaybhargavb @piotrpMSFT @rachelappel So what we have in the templates for RC2 is incorrect? The JSON schema also appears to be incorrect:

image

@sayedihashimi
Copy link
Member

The runtime team owns the schema, and I think it can be updated on the fly.

@danroth27 danroth27 added the Pri0 Urgent priority label May 19, 2016
@danroth27
Copy link
Member

@sayedihashimi @barrytang This is more than just a schema issue. It looks like what we have in our template project.json files is wrong.

@bragma
Copy link

bragma commented May 24, 2016

I'm a bit lost. Is this valid also for webjobs (console apps) targeting net461?

@danroth27
Copy link
Member

No, for console apps target the full .NET Framework you would need to enable server GC in app.config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pri0 Urgent priority
Projects
None yet
Development

No branches or pull requests

6 participants