Skip to content

Remove reloadOnChange from configuration in .NET Core 2.1#3138

Closed
andrewlock wants to merge 2 commits into
masterfrom
andrew/dont-reload-config
Closed

Remove reloadOnChange from configuration in .NET Core 2.1#3138
andrewlock wants to merge 2 commits into
masterfrom
andrew/dont-reload-config

Conversation

@andrewlock

Copy link
Copy Markdown
Member

Summary of changes

Customise the Razor Pages app's config to remove reloadOnChange from the settings file watcher

Reason for change

This was causing The configured user limit (128) on the number of inotify instances has been reached when running on Ubuntu 20.04.

Implementation details

Manually configure the razor pages app's configuration so it doesn't use the filesystem watcher. This only impacts .NET Core 2.1, as the default is to use a polling file watcher when using the generic host in docker (HostBuilder instead of IWebHostBuilder)

Test coverage

If the build passes, we're good.

Other details

This was causing `The configured user limit (128) on the number of inotify instances has been reached` when running on Ubuntu 20.04.

This only impacts .NET Core 2.1, as the default is to use a polling file watcher when using the generic host (`HostBuilder` instead of `IWebHostBuilder`)
@andrewlock andrewlock added area:builds project files, build scripts, pipelines, versioning, releases, packages area:test-apps apps used to test integrations labels Aug 30, 2022
@andrewlock
andrewlock requested a review from a team as a code owner August 30, 2022 13:20
@github-actions github-actions Bot added the area:tests unit tests, integration tests label Aug 30, 2022
@andrewlock

This comment has been minimized.

@andrewlock
andrewlock requested review from a team as code owners August 30, 2022 14:25

@lucaspimentel lucaspimentel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but maybe also mention in the PR description the line you're adding to /etc/sysctl.conf in some dockerfiles?

@andrewlock

Copy link
Copy Markdown
Member Author

Benchmarks Report 🐌

Benchmarks for #3138 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.130
  • All benchmarks have the same allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net472 716μs 388ns 1.45μs 0.355 0 0 3.18 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 454μs 272ns 1.02μs 0 0 0 2.58 KB
#3138 WriteAndFlushEnrichedTraces net472 715μs 346ns 1.34μs 0.355 0 0 3.18 KB
#3138 WriteAndFlushEnrichedTraces netcoreapp3.1 459μs 129ns 481ns 0 0 0 2.58 KB
Benchmarks.Trace.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net472 188ns 0.508ns 1.97ns 0.0675 0 0 425 B
master AllCycleSimpleBody netcoreapp3.1 241ns 0.664ns 2.39ns 0.00571 0 0 424 B
master AllCycleMoreComplexBody net472 199ns 0.772ns 2.99ns 0.0637 0 0 401 B
master AllCycleMoreComplexBody netcoreapp3.1 244ns 0.552ns 2.14ns 0.0055 0 0 400 B
master BodyExtractorSimpleBody net472 264ns 0.885ns 3.43ns 0.0573 0 0 361 B
master BodyExtractorSimpleBody netcoreapp3.1 238ns 0.654ns 2.53ns 0.00362 0 0 272 B
master BodyExtractorMoreComplexBody net472 15μs 53ns 205ns 1.21 0.0219 0 7.62 KB
master BodyExtractorMoreComplexBody netcoreapp3.1 13μs 40.7ns 157ns 0.0903 0 0 6.75 KB
#3138 AllCycleSimpleBody net472 193ns 0.82ns 3.18ns 0.0675 0 0 425 B
#3138 AllCycleSimpleBody netcoreapp3.1 244ns 0.744ns 2.88ns 0.00581 0 0 424 B
#3138 AllCycleMoreComplexBody net472 200ns 0.975ns 4.14ns 0.0637 0 0 401 B
#3138 AllCycleMoreComplexBody netcoreapp3.1 243ns 0.788ns 3.05ns 0.00549 0 0 400 B
#3138 BodyExtractorSimpleBody net472 261ns 0.746ns 2.89ns 0.0574 0 0 361 B
#3138 BodyExtractorSimpleBody netcoreapp3.1 239ns 0.775ns 3ns 0.00374 0 0 272 B
#3138 BodyExtractorMoreComplexBody net472 14.7μs 50.3ns 195ns 1.21 0.0147 0 7.62 KB
#3138 BodyExtractorMoreComplexBody netcoreapp3.1 12.7μs 51.8ns 200ns 0.0879 0 0 6.75 KB
Benchmarks.Trace.AspNetCoreBenchmark - Unknown 🤷 Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
master SendRequest netcoreapp3.1 180μs 96.9ns 375ns 0.179 0 0 20.57 KB
#3138 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#3138 SendRequest netcoreapp3.1 181μs 132ns 510ns 0.181 0 0 20.57 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net472 1.75μs 0.738ns 2.86ns 0.15 0.000872 0 947 B
master ExecuteNonQuery netcoreapp3.1 1.41μs 0.459ns 1.72ns 0.0128 0 0 936 B
#3138 ExecuteNonQuery net472 1.79μs 0.58ns 2.17ns 0.15 0.000888 0 947 B
#3138 ExecuteNonQuery netcoreapp3.1 1.41μs 0.486ns 1.82ns 0.0128 0 0 936 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net472 2.61μs 1.17ns 4.54ns 0.184 0 0 1.16 KB
master CallElasticsearch netcoreapp3.1 1.52μs 0.645ns 2.33ns 0.0144 0 0 1.1 KB
master CallElasticsearchAsync net472 2.58μs 0.52ns 2.02ns 0.204 0 0 1.29 KB
master CallElasticsearchAsync netcoreapp3.1 1.55μs 0.613ns 2.37ns 0.0163 0 0 1.22 KB
#3138 CallElasticsearch net472 2.45μs 4.42ns 16.5ns 0.183 0 0 1.16 KB
#3138 CallElasticsearch netcoreapp3.1 1.48μs 1.95ns 6.76ns 0.015 0 0 1.1 KB
#3138 CallElasticsearchAsync net472 2.63μs 2.64ns 9.86ns 0.205 0 0 1.29 KB
#3138 CallElasticsearchAsync netcoreapp3.1 1.63μs 0.627ns 2.35ns 0.0163 0 0 1.22 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net472 2.66μs 6.32ns 24.5ns 0.224 0 0 1.41 KB
master ExecuteAsync netcoreapp3.1 1.72μs 3.26ns 12.2ns 0.0181 0 0 1.34 KB
#3138 ExecuteAsync net472 2.68μs 7.78ns 30.1ns 0.224 0 0 1.41 KB
#3138 ExecuteAsync netcoreapp3.1 1.65μs 2.83ns 11ns 0.0181 0 0 1.34 KB
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net472 5.89μs 7.88ns 30.5ns 0.438 0 0 2.77 KB
master SendAsync netcoreapp3.1 3.56μs 7.87ns 30.5ns 0.0342 0 0 2.6 KB
#3138 SendAsync net472 5.79μs 10.6ns 41.2ns 0.438 0 0 2.77 KB
#3138 SendAsync netcoreapp3.1 3.63μs 8.36ns 32.4ns 0.0344 0 0 2.6 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 3.11μs 2.44ns 9.46ns 0.288 0 0 1.81 KB
master EnrichedLog netcoreapp3.1 2.41μs 1.21ns 4.53ns 0.0255 0 0 1.85 KB
#3138 EnrichedLog net472 3.27μs 2.38ns 8.9ns 0.288 0 0 1.81 KB
#3138 EnrichedLog netcoreapp3.1 2.42μs 0.858ns 3.21ns 0.0254 0 0 1.85 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 152μs 228ns 885ns 0.683 0.228 0 4.65 KB
master EnrichedLog netcoreapp3.1 118μs 174ns 627ns 0.058 0 0 4.49 KB
#3138 EnrichedLog net472 150μs 106ns 409ns 0.678 0.226 0 4.65 KB
#3138 EnrichedLog netcoreapp3.1 115μs 103ns 384ns 0.0576 0 0 4.49 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 5.64μs 6.11ns 22ns 0.569 0.00283 0 3.59 KB
master EnrichedLog netcoreapp3.1 4.32μs 9.36ns 35ns 0.0521 0 0 3.91 KB
#3138 EnrichedLog net472 5.58μs 17.4ns 67.4ns 0.569 0.00283 0 3.59 KB
#3138 EnrichedLog netcoreapp3.1 4.29μs 9.54ns 35.7ns 0.0535 0 0 3.91 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net472 2.31μs 1.49ns 5.76ns 0.218 0 0 1.37 KB
master SendReceive netcoreapp3.1 1.89μs 0.897ns 3.47ns 0.0181 0 0 1.32 KB
#3138 SendReceive net472 2.29μs 1.3ns 4.86ns 0.217 0 0 1.37 KB
#3138 SendReceive netcoreapp3.1 1.81μs 0.723ns 2.8ns 0.0182 0 0 1.32 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net472 5.07μs 1.89ns 7.31ns 0.353 0 0 2.23 KB
master EnrichedLog netcoreapp3.1 4.21μs 1.72ns 6.45ns 0.0231 0 0 1.8 KB
#3138 EnrichedLog net472 5.06μs 1.58ns 6.13ns 0.354 0 0 2.23 KB
#3138 EnrichedLog netcoreapp3.1 4.35μs 1.43ns 5.36ns 0.0238 0 0 1.8 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #3138

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 1.130 1,025.40 907.31

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net472 1.1μs 0.462ns 1.79ns 0.128 0 0 810 B
master StartFinishSpan netcoreapp3.1 1.03μs 0.339ns 1.27ns 0.0102 0 0 760 B
master StartFinishScope net472 1.35μs 0.495ns 1.92ns 0.141 0 0 891 B
master StartFinishScope netcoreapp3.1 1.09μs 0.382ns 1.43ns 0.0119 0 0 880 B
#3138 StartFinishSpan net472 1.12μs 0.432ns 1.62ns 0.129 0 0 810 B
#3138 StartFinishSpan netcoreapp3.1 907ns 0.263ns 0.948ns 0.0104 0 0 760 B
#3138 StartFinishScope net472 1.37μs 0.688ns 2.66ns 0.141 0 0 891 B
#3138 StartFinishScope netcoreapp3.1 1.06μs 0.343ns 1.24ns 0.0118 0 0 880 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net472 1.5μs 0.599ns 2.32ns 0.141 0 0 891 B
master RunOnMethodBegin netcoreapp3.1 1.23μs 0.55ns 1.98ns 0.0119 0 0 880 B
#3138 RunOnMethodBegin net472 1.42μs 0.352ns 1.36ns 0.141 0 0 891 B
#3138 RunOnMethodBegin netcoreapp3.1 1.18μs 0.663ns 2.57ns 0.0118 0 0 880 B

@andrewlock

Copy link
Copy Markdown
Member Author

yeah, so that didn't work

@andrewlock andrewlock closed this Aug 30, 2022
@andrewlock
andrewlock deleted the andrew/dont-reload-config branch August 30, 2022 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:builds project files, build scripts, pipelines, versioning, releases, packages area:test-apps apps used to test integrations area:tests unit tests, integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants