Skip to content

SAEA already in use error fix #4301

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

Merged

Conversation

IgorFedchenko
Copy link
Contributor

@IgorFedchenko IgorFedchenko commented Mar 6, 2020

Close #4264

Issue was that after socket operation was completed, we started sending pending packages without setting "Sending" status. So it was only a matter of time when there will be some sender that will send his package at the same time last "pending" package was sent, and we got this error.

Setting "Sending" status in both cases, and all is running smooth.

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

LGTM

@Aaronontheweb Aaronontheweb merged commit c726f11 into akkadotnet:dev Mar 6, 2020
@Aaronontheweb
Copy link
Member

DEV

Hocon.Tests.Performance.ConfigFallbackLookupSpecs+Lookup_Config_Fallback_2_Deep

Tests how quickly Config can be looked up from the second fallback
3/5/2020 8:55:14 PM

System Info

NBench=NBench, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null
OS=Microsoft Windows NT 6.2.9200.0
ProcessorCount=2
CLR=4.0.30319.42000,IsMono=False,MaxGcGeneration=2

NBench Settings

RunMode=Throughput, TestMode=Measurement
NumberOfIterations=13, MaximumRunTime=00:00:01
Concurrent=True
Tracing=True

Data


Totals

Metric Units Max Average Min StdDev
TotalCollections [Gen0] collections 119.00 119.00 119.00 0.00
TotalCollections [Gen1] collections 0.00 0.00 0.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 5,310,984.00 5,310,984.00 5,310,984.00 0.00
[Counter] LookupFallbackOp operations 196,750.00 196,750.00 196,750.00 0.00

Per-second Totals

Metric Units / s Max / s Average / s Min / s StdDev / s
TotalCollections [Gen0] collections 124.66 120.88 117.56 1.95
TotalCollections [Gen1] collections 0.00 0.00 0.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 5,563,575.33 5,394,822.62 5,246,891.64 87,096.85
[Counter] LookupFallbackOp operations 206,107.46 199,855.87 194,375.64 3,226.58

This PR

Hocon.Tests.Performance.ConfigFallbackLookupSpecs+Lookup_Config_Fallback_2_Deep

Tests how quickly Config can be looked up from the second fallback
3/6/2020 4:21:29 PM

System Info

NBench=NBench, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null
OS=Microsoft Windows NT 6.2.9200.0
ProcessorCount=2
CLR=4.0.30319.42000,IsMono=False,MaxGcGeneration=2

NBench Settings

RunMode=Throughput, TestMode=Measurement
NumberOfIterations=13, MaximumRunTime=00:00:01
Concurrent=True
Tracing=True

Data


Totals

Metric Units Max Average Min StdDev
TotalCollections [Gen0] collections 62.00 62.00 62.00 0.00
TotalCollections [Gen1] collections 0.00 0.00 0.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 2,741,976.00 2,741,976.00 2,741,976.00 0.00
[Counter] LookupFallbackOp operations 392,796.00 392,796.00 392,796.00 0.00

Per-second Totals

Metric Units / s Max / s Average / s Min / s StdDev / s
TotalCollections [Gen0] collections 66.21 64.54 62.97 0.94
TotalCollections [Gen1] collections 0.00 0.00 0.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 2,928,058.20 2,854,337.68 2,785,044.48 41,763.93
[Counter] LookupFallbackOp operations 419,452.81 408,892.14 398,965.69 5,982.80

@Aaronontheweb
Copy link
Member

2x increase in lookup spec, ~40-45% drop in memory usage, 50% drop in Gen 0 GC

@Aaronontheweb
Copy link
Member

DEV

Hocon.Tests.Performance.ConfigFallbackSpecs+Create_Config_Fallback_1_Deep

Tests how quickly Config can add a single fallback
3/5/2020 8:56:15 PM

System Info

NBench=NBench, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null
OS=Microsoft Windows NT 6.2.9200.0
ProcessorCount=2
CLR=4.0.30319.42000,IsMono=False,MaxGcGeneration=2

NBench Settings

RunMode=Throughput, TestMode=Measurement
NumberOfIterations=13, MaximumRunTime=00:00:01
Concurrent=True
Tracing=True

Data


Totals

Metric Units Max Average Min StdDev
TotalCollections [Gen0] collections 131.00 131.00 131.00 0.00
TotalCollections [Gen1] collections 4.00 4.00 4.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 4,875,368.00 4,864,505.23 4,863,600.00 3,263.86
[Counter] CreateFallbackOp operations 22,989.00 22,989.00 22,989.00 0.00

Per-second Totals

Metric Units / s Max / s Average / s Min / s StdDev / s
TotalCollections [Gen0] collections 133.44 130.00 127.07 1.78
TotalCollections [Gen1] collections 4.07 3.97 3.88 0.05
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 4,954,019.27 4,827,285.99 4,729,038.77 64,420.18
[Counter] CreateFallbackOp operations 23,416.39 22,813.20 22,299.01 311.64

This PR

Hocon.Tests.Performance.ConfigFallbackSpecs+Create_Config_Fallback_1_Deep

Tests how quickly Config can add a single fallback
3/6/2020 4:22:31 PM

System Info

NBench=NBench, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null
OS=Microsoft Windows NT 6.2.9200.0
ProcessorCount=2
CLR=4.0.30319.42000,IsMono=False,MaxGcGeneration=2

NBench Settings

RunMode=Throughput, TestMode=Measurement
NumberOfIterations=13, MaximumRunTime=00:00:01
Concurrent=True
Tracing=True

Data


Totals

Metric Units Max Average Min StdDev
TotalCollections [Gen0] collections 51.00 51.00 51.00 0.00
TotalCollections [Gen1] collections 0.00 0.00 0.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 5,050,200.00 5,050,200.00 5,050,200.00 0.00
[Counter] CreateFallbackOp operations 29,805.00 29,805.00 29,805.00 0.00

Per-second Totals

Metric Units / s Max / s Average / s Min / s StdDev / s
TotalCollections [Gen0] collections 52.57 50.30 48.72 1.19
TotalCollections [Gen1] collections 0.00 0.00 0.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 5,205,740.77 4,981,002.07 4,824,433.40 118,259.10
[Counter] CreateFallbackOp operations 30,722.96 29,396.61 28,472.58 697.94

@Aaronontheweb
Copy link
Member

Faster parse operation, but the disparity between this PR and dev gets a lot bigger the more fallbacks you add:

DEV

Hocon.Tests.Performance.ConfigFallbackSpecs+Create_Config_Fallback_2_Deep

Tests how quickly Config can add a two fallbacks
3/5/2020 8:56:45 PM

System Info

NBench=NBench, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null
OS=Microsoft Windows NT 6.2.9200.0
ProcessorCount=2
CLR=4.0.30319.42000,IsMono=False,MaxGcGeneration=2

NBench Settings

RunMode=Throughput, TestMode=Measurement
NumberOfIterations=13, MaximumRunTime=00:00:01
Concurrent=True
Tracing=True

Data


Totals

Metric Units Max Average Min StdDev
TotalCollections [Gen0] collections 124.00 124.00 124.00 0.00
TotalCollections [Gen1] collections 5.00 5.00 5.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 5,209,488.00 5,209,225.23 5,209,120.00 84.28
[Counter] CreateFallbackOp operations 7,999.00 7,999.00 7,999.00 0.00

Per-second Totals

Metric Units / s Max / s Average / s Min / s StdDev / s
TotalCollections [Gen0] collections 132.79 129.75 124.83 2.45
TotalCollections [Gen1] collections 5.35 5.23 5.03 0.10
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 5,578,277.04 5,450,679.28 5,244,001.56 102,863.28
[Counter] CreateFallbackOp operations 8,565.71 8,369.76 8,052.41 158.01

This PR

Hocon.Tests.Performance.ConfigFallbackSpecs+Create_Config_Fallback_2_Deep

Tests how quickly Config can add a two fallbacks
3/6/2020 4:23:00 PM

System Info

NBench=NBench, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null
OS=Microsoft Windows NT 6.2.9200.0
ProcessorCount=2
CLR=4.0.30319.42000,IsMono=False,MaxGcGeneration=2

NBench Settings

RunMode=Throughput, TestMode=Measurement
NumberOfIterations=13, MaximumRunTime=00:00:01
Concurrent=True
Tracing=True

Data


Totals

Metric Units Max Average Min StdDev
TotalCollections [Gen0] collections 51.00 51.00 51.00 0.00
TotalCollections [Gen1] collections 0.00 0.00 0.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 946,280.00 946,280.00 946,280.00 0.00
[Counter] CreateFallbackOp operations 14,719.00 14,719.00 14,719.00 0.00

Per-second Totals

Metric Units / s Max / s Average / s Min / s StdDev / s
TotalCollections [Gen0] collections 54.74 53.00 51.31 1.15
TotalCollections [Gen1] collections 0.00 0.00 0.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 1,015,697.98 983,310.10 951,997.79 21,378.18
[Counter] CreateFallbackOp operations 15,798.77 15,294.99 14,807.94 332.53

@Aaronontheweb
Copy link
Member

Aaronontheweb commented Mar 6, 2020

And then the biggest winner, a 10-layer-deep Config lookup using a string (since most commonly used by end-users)

DEV

Hocon.Tests.Performance.ConfigLookupSpec+Config_Lookup_String_10_Deep_throughput

Tests how quickly Config can perform a 10 deep path lookup using a string path
3/5/2020 8:57:15 PM

System Info

NBench=NBench, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null
OS=Microsoft Windows NT 6.2.9200.0
ProcessorCount=2
CLR=4.0.30319.42000,IsMono=False,MaxGcGeneration=2

NBench Settings

RunMode=Throughput, TestMode=Measurement
NumberOfIterations=13, MaximumRunTime=00:00:01
Concurrent=True
Tracing=True

Data


Totals

Metric Units Max Average Min StdDev
TotalCollections [Gen0] collections 133.00 133.00 133.00 0.00
TotalCollections [Gen1] collections 0.00 0.00 0.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 4,898,784.00 4,898,784.00 4,898,784.00 0.00
[Counter] LookupOp operations 74,027.00 74,027.00 74,027.00 0.00

Per-second Totals

Metric Units / s Max / s Average / s Min / s StdDev / s
TotalCollections [Gen0] collections 134.86 131.64 126.86 2.37
TotalCollections [Gen1] collections 0.00 0.00 0.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 4,967,256.64 4,848,612.01 4,672,465.20 87,393.84
[Counter] LookupOp operations 75,061.71 73,268.84 70,607.03 1,320.63

This PR

Hocon.Tests.Performance.ConfigLookupSpec+Config_Lookup_String_10_Deep_throughput

Tests how quickly Config can perform a 10 deep path lookup using a string path
3/6/2020 4:23:30 PM

System Info

NBench=NBench, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null
OS=Microsoft Windows NT 6.2.9200.0
ProcessorCount=2
CLR=4.0.30319.42000,IsMono=False,MaxGcGeneration=2

NBench Settings

RunMode=Throughput, TestMode=Measurement
NumberOfIterations=13, MaximumRunTime=00:00:01
Concurrent=True
Tracing=True

Data


Totals

Metric Units Max Average Min StdDev
TotalCollections [Gen0] collections 73.00 73.00 73.00 0.00
TotalCollections [Gen1] collections 0.00 0.00 0.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 4,943,008.00 4,943,008.00 4,943,008.00 0.00
[Counter] LookupOp operations 242,622.00 242,622.00 242,622.00 0.00

Per-second Totals

Metric Units / s Max / s Average / s Min / s StdDev / s
TotalCollections [Gen0] collections 74.62 73.45 72.26 0.82
TotalCollections [Gen1] collections 0.00 0.00 0.00 0.00
TotalCollections [Gen2] collections 0.00 0.00 0.00 0.00
TotalBytesAllocated bytes 5,052,509.52 4,973,261.39 4,892,977.31 55,341.71
[Counter] LookupOp operations 247,996.76 244,106.95 240,166.30 2,716.39

@Aaronontheweb
Copy link
Member

That's a about a 3.25x increase in thoughput and we get down to zero allocations when we use a HoconPath object on this PR.

Performance numbers look good - need to look at compatibility performance inside Akka.NET integration tests.

@Aaronontheweb
Copy link
Member

Wrong PR - damnit lol

@IgorFedchenko IgorFedchenko deleted the fix/akka-io-already-in-progress branch March 6, 2020 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Akka.IO Bug: An asynchronous socket operation is already in progress using this SocketAsyncEventArgs instance
2 participants