Fall creators update performance issues

After a recent Windows 10 update (Fall Up Developer's Update), the performance of our .NET C # 4.0 application dropped significantly. I think there are various problems, and one of them is log4net (or IO drive).

Our application is very complex (various WCF applications and ASPNET MVC 3.0 application), and there are many traces of log4net in development. Loading the first page at startup lasts 4 or 5 minutes, and before the update lasts a minute, if I deactivate the performance of log4net.

I ran a test with two cloned virtual machines, performing registration after the regular expression operation, and the distinguishing features are significant.

Code:

static void Main(string[] args) { Log.Info("Log4net1"); DateTime start = DateTime.Now; for (int i = 0; i < 50; i++) { DoTheThing(); } TimeSpan elapsedTime = DateTime.Now - start; Log.DebugFormat("TOTAL Elapsed time: {0}", elapsedTime.TotalMilliseconds); Console.ReadKey(); } private static void DoTheThing() { DateTime start = DateTime.Now; Regex.Replace(TEXT, " nec ", m => { return " (word nec) "; }); TimeSpan elapsedTime = DateTime.Now - start; Log.DebugFormat("Elapsed time: {0}", elapsedTime.TotalMilliseconds); } 

I conducted tests with log4net 1.2.1 and 2.0.8:

average beforeUpdate โ†’ TOTAL Elapsed time: 600 ms

average after Update โ†’ TOTAL Elapsed time: 1000 ms

This is a very important issue for us, and I did not find any information on the network.

- UPDATE -

I found another (unanswered) stream in stackoverflow: log4net became very slow with subscriber location information after updating Windows Autodesk Fallup (1709)

I did a disk test on both environments, and there are no significant differences in read / write speeds. I tested an application that completely disabled log4net (log4net threshold = "OFF"), and now the timings are very similar, so, like @DalmTo's comments, there are many possibilities that will be associated with log4net, I will try there the problem there, although there is already a related one problem with Microsoft: https://connect.microsoft.com/VisualStudio/feedback/details/3143189/after-installing-windows-10-1709-update-creating-a-stacktrace-class-has-become-a-magnitude- slower

+5
source share
1 answer

You may encounter this problem:

Starting in October 2017, after upgrading to Windows 10 Version 1709 or the .NET Framework 4.7.1, you noticed a significant decrease when starting the .NET Framework applications that use the System.Diagnostics.StackFrame Class.

Applications typically rely on a StackFrame when they drop .NET. exceptions. If this happens at a high speed (more than 10 incidents per second), applications can slow down significantly (ten times) and start up noticeably slower than before.

https://support.microsoft.com/en-us/help/4057154/performance-of-system-diagnostics-stackframe-degrades-in-windows-10-17

.NET Framework 4.7.1 added support for detection and analysis Portable PDB file format for displaying file information and line number on the stack. As part of this change, each function in the stack trace checks its defining module to determine if this module uses the Portable PDB format.

Due to some differences in internal policy caching, the runtime spends much more time searching for portable PDBs than previous versions of the .NET Framework spent looking for classic Windows PDBs. This causes the formatted stack traces to be created more slowly than before.

https://github.com/Microsoft/dotnet/blob/master/releases/net471/KnownIssues/517815-BCL%20Applications%20making%20heavy%20use%20of%20System.Diagnostics.StackTrace%20might%20run%20more%20slowly% 20on% 20.NET% 204.7.1.md

Installing the latest .NET 4.7.1 security update (KB4054856) should fix this problem.

The following fixes are included: Applications using System.Diagnostics.StackTrace or Exception.StackTrace may run slower on the .NET Framework 4.7.1.

https://blogs.msdn.microsoft.com/dotnet/2018/01/09/net-framework-4-7-1-is-available-on-windows-update-wsus-and-mu-catalog/

+5
source

Source: https://habr.com/ru/post/1274751/


All Articles