diff --git a/frameworks/CSharp/touchsocket/src/TouchSocketHttp/Program.cs b/frameworks/CSharp/touchsocket/src/TouchSocketHttp/Program.cs index 46e388ae14a..9cac46e9ca6 100644 --- a/frameworks/CSharp/touchsocket/src/TouchSocketHttp/Program.cs +++ b/frameworks/CSharp/touchsocket/src/TouchSocketHttp/Program.cs @@ -25,18 +25,18 @@ await service.SetupAsync(new TouchSocketConfig() pool: MemoryPool.Shared, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, - pauseWriterThreshold: 1024 * 1024, - resumeWriterThreshold: 1024 * 512, - minimumSegmentSize: 4096, + pauseWriterThreshold: 2 * 1024 * 1024, + resumeWriterThreshold: 1024 * 1024, + minimumSegmentSize: 8192, useSynchronizationContext: false); options.SendPipeOptions = new PipeOptions( pool: MemoryPool.Shared, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, - pauseWriterThreshold: 64 * 1024, - resumeWriterThreshold: 32 * 1024, - minimumSegmentSize: 4096, + pauseWriterThreshold: 128 * 1024, + resumeWriterThreshold: 64 * 1024, + minimumSegmentSize: 8192, useSynchronizationContext: false); }) .ConfigureContainer(a => diff --git a/frameworks/CSharp/touchsocket/src/TouchSocketHttpPlatform/Program.cs b/frameworks/CSharp/touchsocket/src/TouchSocketHttpPlatform/Program.cs index 93e85b0e202..993cf25d74a 100644 --- a/frameworks/CSharp/touchsocket/src/TouchSocketHttpPlatform/Program.cs +++ b/frameworks/CSharp/touchsocket/src/TouchSocketHttpPlatform/Program.cs @@ -30,21 +30,21 @@ await server.SetupAsync(new TouchSocketConfig() options.BufferOnDemand = false; options.ReceivePipeOptions = new PipeOptions( - pool: MemoryPool.Shared, - readerScheduler: PipeScheduler.Inline, - writerScheduler: PipeScheduler.Inline, - pauseWriterThreshold: 1024 * 1024, - resumeWriterThreshold: 1024 * 512, - minimumSegmentSize: 4096, - useSynchronizationContext: false); + pool: MemoryPool.Shared, + readerScheduler: PipeScheduler.Inline, + writerScheduler: PipeScheduler.Inline, + pauseWriterThreshold: 2 * 1024 * 1024, + resumeWriterThreshold: 1024 * 1024, + minimumSegmentSize: 8192, + useSynchronizationContext: false); options.SendPipeOptions = new PipeOptions( pool: MemoryPool.Shared, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, - pauseWriterThreshold: 64 * 1024, - resumeWriterThreshold: 32 * 1024, - minimumSegmentSize: 4096, + pauseWriterThreshold: 128 * 1024, + resumeWriterThreshold: 64 * 1024, + minimumSegmentSize: 8192, useSynchronizationContext: false); }) .ConfigureContainer(a => diff --git a/frameworks/CSharp/touchsocket/src/TouchSocketWebApi/Program.cs b/frameworks/CSharp/touchsocket/src/TouchSocketWebApi/Program.cs index e1639a2b4c2..41af01f8e6d 100644 --- a/frameworks/CSharp/touchsocket/src/TouchSocketWebApi/Program.cs +++ b/frameworks/CSharp/touchsocket/src/TouchSocketWebApi/Program.cs @@ -25,21 +25,21 @@ public static void Main(string[] args) options.BufferOnDemand = false; options.ReceivePipeOptions = new PipeOptions( - pool: MemoryPool.Shared, - readerScheduler: PipeScheduler.Inline, - writerScheduler: PipeScheduler.Inline, - pauseWriterThreshold: 1024 * 1024, - resumeWriterThreshold: 1024 * 512, - minimumSegmentSize: 4096, - useSynchronizationContext: false); + pool: MemoryPool.Shared, + readerScheduler: PipeScheduler.Inline, + writerScheduler: PipeScheduler.Inline, + pauseWriterThreshold: 2 * 1024 * 1024, + resumeWriterThreshold: 1024 * 1024, + minimumSegmentSize: 8192, + useSynchronizationContext: false); options.SendPipeOptions = new PipeOptions( pool: MemoryPool.Shared, readerScheduler: PipeScheduler.Inline, writerScheduler: PipeScheduler.Inline, - pauseWriterThreshold: 64 * 1024, - resumeWriterThreshold: 32 * 1024, - minimumSegmentSize: 4096, + pauseWriterThreshold: 128 * 1024, + resumeWriterThreshold: 64 * 1024, + minimumSegmentSize: 8192, useSynchronizationContext: false); }) .ConfigureContainer(a =>