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

IOptionsSnapshot Results in High CPU 100% at 1500 RPS with 15 Node Cluster (8core per vm 32GB Memory) #42222

Closed
justConfused opened this issue Aug 13, 2020 · 5 comments
Milestone

Comments

@justConfused
Copy link

If you believe you have an issue that affects the security of the platform please do NOT create an issue and instead email your issue details to secure@microsoft.com. Your report may be eligible for our bug bounty but ONLY if it is reported through email.

Describe the bug

IOptionsSnapshot Results in High CPU 100% at 1500 RPS with 15 Node Cluster (8core per vm 32GB Memory). HTTP.Sys Asp Net core 2.1

It looks like Wait on GC is blocking for some mutex as captured traces from azure profile show. Image below.

To Reproduce

Steps to reproduce the behavior:
1.) Start Azure Vm StandardDv2_v8
2.) 100 RPS
3.) HTTP.SYS(AspNetCore): Add IOptionsSnapshot as scoped depend so it created on ever request
4.) CPU should 100

Expected behavior

High CPU

Screenshots

image

@davidfowl
Copy link
Member

IOptionsSnapshot<T> might be a performance trap indeed since binding isn't currently cached and runs per request:

cc @HaoK @Pilchie for 3.x
cc @ericstj @maryamariyan

This is something we might want to address in 5.0 or 6.0 and backport to 3.1.

@HaoK
Copy link
Member

HaoK commented Aug 13, 2020

We don't use options snapshot anywhere by default right? But yeah config binding every request is going to be extremely slow

@BrennanConroy BrennanConroy transferred this issue from dotnet/extensions Sep 14, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-Extensions-Options untriaged New issue has not been triaged by the area owner labels Sep 14, 2020
@ghost
Copy link

ghost commented Sep 14, 2020

Tagging subscribers to this area: @maryamariyan
See info in area-owners.md if you want to be subscribed.

@BrennanConroy
Copy link
Member

This is something we might want to address in 5.0 or 6.0

6.0 😄

@ericstj ericstj removed the untriaged New issue has not been triaged by the area owner label Sep 16, 2020
@ericstj ericstj added this to the 6.0.0 milestone Sep 16, 2020
@ericstj ericstj added bug tenet-performance Performance related issue labels Sep 16, 2020
@maryamariyan maryamariyan added this to Triaged in ML, Extensions, Globalization, etc, POD. via automation Sep 30, 2020
@davidfowl
Copy link
Member

@maryamariyan we should close as dupe of #36130

@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants