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

stubbing out SSL support for MQTT clients #123

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from

Conversation

Aaronontheweb
Copy link
Member

No description provided.

@Aaronontheweb
Copy link
Member Author

Ouch, migrating to use NetworkStream hurts:


BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.3593/23H2/2023Update/SunValley3)
12th Gen Intel Core i7-1260P, 1 CPU, 16 logical and 12 physical cores
.NET SDK 8.0.204
  [Host]     : .NET 8.0.4 (8.0.424.16909), X64 RyuJIT AVX2
  Job-YJPWNC : .NET 8.0.4 (8.0.424.16909), X64 RyuJIT AVX2

InvocationCount=1  LaunchCount=10  RunStrategy=Monitoring  
UnrollFactor=1  WarmupCount=10  

Method QoSLevel PayloadSizeBytes ProtocolVersion Mean Error StdDev Median Req/sec
PublishAndReceiveMessages AtMostOnce 10 V3_1_1 5.265 μs 0.6731 μs 1.985 μs 4.544 μs 189,944.65
PublishAndReceiveMessages AtMostOnce 1024 V3_1_1 5.485 μs 0.5596 μs 1.650 μs 4.953 μs 182,305.78
PublishAndReceiveMessages AtMostOnce 2048 V3_1_1 5.875 μs 0.5331 μs 1.572 μs 5.402 μs 170,205.06
PublishAndReceiveMessages AtMostOnce 8192 V3_1_1 13.372 μs 2.5067 μs 7.391 μs 10.127 μs 74,785.86
PublishAndReceiveMessages AtLeastOnce 10 V3_1_1 24.939 μs 1.5192 μs 4.479 μs 24.873 μs 40,097.67
PublishAndReceiveMessages AtLeastOnce 1024 V3_1_1 26.693 μs 1.1794 μs 3.477 μs 25.668 μs 37,463.44
PublishAndReceiveMessages AtLeastOnce 2048 V3_1_1 27.683 μs 1.3599 μs 4.010 μs 26.547 μs 36,123.33
PublishAndReceiveMessages AtLeastOnce 8192 V3_1_1 34.313 μs 2.1881 μs 6.452 μs 33.542 μs 29,143.74
PublishAndReceiveMessages ExactlyOnce 10 V3_1_1 43.528 μs 5.3992 μs 15.920 μs 40.024 μs 22,973.47
PublishAndReceiveMessages ExactlyOnce 1024 V3_1_1 42.648 μs 1.7563 μs 5.179 μs 40.913 μs 23,447.57
PublishAndReceiveMessages ExactlyOnce 2048 V3_1_1 45.091 μs 2.2608 μs 6.666 μs 42.253 μs 22,177.31
PublishAndReceiveMessages ExactlyOnce 8192 V3_1_1 49.322 μs 3.5218 μs 10.384 μs 49.772 μs 20,274.77

@Aaronontheweb
Copy link
Member Author

Better:


BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.3593/23H2/2023Update/SunValley3)
12th Gen Intel Core i7-1260P, 1 CPU, 16 logical and 12 physical cores
.NET SDK 8.0.204
  [Host]     : .NET 8.0.4 (8.0.424.16909), X64 RyuJIT AVX2
  Job-CARWZE : .NET 8.0.4 (8.0.424.16909), X64 RyuJIT AVX2

InvocationCount=1  LaunchCount=10  RunStrategy=Monitoring  
UnrollFactor=1  WarmupCount=10  

Method QoSLevel PayloadSizeBytes ProtocolVersion Mean Error StdDev Median Req/sec
PublishAndReceiveMessages AtMostOnce 10 V3_1_1 5.128 μs 0.5400 μs 1.592 μs 4.441 μs 195,022.25
PublishAndReceiveMessages AtMostOnce 1024 V3_1_1 5.197 μs 0.4721 μs 1.392 μs 4.712 μs 192,412.56
PublishAndReceiveMessages AtMostOnce 2048 V3_1_1 6.252 μs 0.7182 μs 2.118 μs 5.483 μs 159,936.24
PublishAndReceiveMessages AtMostOnce 8192 V3_1_1 13.365 μs 2.5672 μs 7.569 μs 10.174 μs 74,822.54
PublishAndReceiveMessages AtLeastOnce 10 V3_1_1 25.315 μs 1.4154 μs 4.173 μs 24.175 μs 39,501.64
PublishAndReceiveMessages AtLeastOnce 1024 V3_1_1 25.392 μs 0.9990 μs 2.946 μs 24.932 μs 39,383.19
PublishAndReceiveMessages AtLeastOnce 2048 V3_1_1 28.964 μs 1.5013 μs 4.427 μs 27.305 μs 34,525.72
PublishAndReceiveMessages AtLeastOnce 8192 V3_1_1 64.682 μs 101.0053 μs 297.816 μs 35.865 μs 15,460.16
PublishAndReceiveMessages ExactlyOnce 10 V3_1_1 43.735 μs 2.2918 μs 6.757 μs 40.103 μs 22,865.19
PublishAndReceiveMessages ExactlyOnce 1024 V3_1_1 47.098 μs 5.2635 μs 15.520 μs 44.192 μs 21,232.50
PublishAndReceiveMessages ExactlyOnce 2048 V3_1_1 46.505 μs 5.1802 μs 15.274 μs 42.894 μs 21,503.02
PublishAndReceiveMessages ExactlyOnce 8192 V3_1_1 50.985 μs 2.1129 μs 6.230 μs 49.024 μs 19,613.49

@Aaronontheweb
Copy link
Member Author

Some sort of encoding issue creeped its way into the transport here:

// BeforeAnythingElse                                                                                        
                                                                                                             
// Benchmark Process Environment Information:                                                                
// BenchmarkDotNet v0.13.12                                                                                  
// Runtime=.NET 8.0.4 (8.0.424.16909), X64 RyuJIT AVX2                                                       
// GC=Concurrent Workstation                                                                                 
// HardwareIntrinsics=AVX2,AES,BMI1,BMI2,FMA,LZCNT,PCLMUL,POPCNT,AvxVnni,SERIALIZE VectorSize=256            
// Job: Job-FLDEAO(InvocationCount=1, LaunchCount=10, RunStrategy=Monitoring, UnrollFactor=1, WarmupCount=10)
                                                                                                             
Error writing to client.                                                                                     
Failed to write [8] packets [32972 bytes] to transport.                                                      
Error writing to client.                                                                                     
Failed to write [62] packets [255533 bytes] to transport.                                                    
WorkloadWarmup   1: 2000 op, 5926793600.00 ns, 2.9634 ms/op                                                  
Error writing to client.                                                                                     
Failed to write [88] packets [362692 bytes] to transport.                                                    
WorkloadWarmup   2: 2000 op, 6007833100.00 ns, 3.0039 ms/op                                                  
Error writing to client.                                                                                     
Failed to write [8] packets [32972 bytes] to transport.                                                      
WorkloadWarmup   3: 2000 op, 6001818400.00 ns, 3.0009 ms/op                                                  
Error writing to client.                                                                                     
Failed to write [8] packets [32972 bytes] to transport.                                                      
Error writing to client.                                                                                     
Failed to write [64] packets [263776 bytes] to transport.                                                    

* Add TLS end to end unit test

* Make TLS spec inherit TCP spec
@CLAassistant
Copy link

CLAassistant commented May 31, 2024

CLA assistant check
All committers have signed the CLA.

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.

3 participants