OPCFoundation / UA-.NETStandard

OPC Unified Architecture .NET Standard
Other
1.96k stars 946 forks source link

Outliers on write with .NET 8 #2103

Open Flatscha opened 1 year ago

Flatscha commented 1 year ago

Type of issue

Current Behavior

While upgrading to .NET7 I encountered a cycle loss on all my processes that use OPC. Writes inconsistently use more time.

Normal: 2023-03-15 13:32:31.7260 | DEBUG | (Test1) Write Item: GVL_OPC.D2P.M1.IO [True], Time used 0,006101

Outliers: 2023-03-15 13:32:31.7260 | DEBUG | (Test1) Write Item: GVL_OPC.D2P.M1.IO [True], Time used 0,8563447 2023-03-15 10:56:52.6105 | DEBUG | (Test1) Write Item: GVL_OPC.D2P.M1.IO [True], Time used 1,0075487

The stopwatch only stops the Session.Write

Expected Behavior

No outliers in writing speed

Steps To Reproduce

Write a .NET7 console app that asynchronous writes onto variables on a OPC-server

Async only to get results quicker it works also in synchronous context

Environment

- OS: Windows 10
- Environment: Visual Studio 2022 17.4.3
- Runtime: .NET 7
- Nuget Version: 1.4.371.60
- Component: Opc.Ua.Client
- Server: Beckhoff OPC

Anything else?

Probably the problem is already solved just by adding .NET 7 support if not I do not have any clue why this problem happens

mregen commented 8 months ago

.NET 8 is supported. Please re test and reopen if needed.

Flatscha commented 6 months ago

Hi Martin, upgraded to .NET 8 and Nuget Version 1.5.374.36 but unfortunately the problem remains.

mregen commented 4 months ago

@Flatscha Please share the code snippet how you write and measure the outliers.