Comments (6)
from pipelines.sockets.unofficial.
Has there been any traction on this issue? We're also observing this using 48 multiplexers, and moving to 24 seems to have significantly reduced the locking & high cpu.
from pipelines.sockets.unofficial.
I had some success mitigating this by creating a new SocketManager for every 5 multiplexers. That seemed reduce the lock contention. There are still perf issues after this mitigation, but it is not related to lock contention anymore.
Is this the recommended approach (create more socket managers)?
from pipelines.sockets.unofficial.
@mgravell I got another query about this issue and it seems like the issue is basically that lock contention spikes up when there is high load on the system, and the resulting lock contention just makes the CPU spikes even worse - and blocks threads.
Given that the DedicatedThreadPoolPipeScheduler is already designed to gracefully fall back to a thread pool when there are no available dedicated workers, do you think it would help if it were to use Monitor.TryEnter instead of lock() in the Enqueue implementation, so that it could gracefully fall back to the thread pool under lock contention scenarios also?
from pipelines.sockets.unofficial.
Awesome, @mgravell
from pipelines.sockets.unofficial.
What conditions would we expect this to happen under? Just purely load or could misconfigurations cause it too.
We see this too at high load (.Net Framework) (and we have a lot of multiplexers to share the load) and they seem to all use the shared scheduler.
Would a good solution be like @doanair mentioned to use multiple SocketManagers to spread the load?
from pipelines.sockets.unofficial.
Related Issues (20)
- Xamarin.Android crash with native exception on SocketConnection.Create HOT 2
- TLS/SSL support HOT 6
- How to find out when/if the reader/writer completed HOT 3
- Does this project only support .Net Core, instead of .Net Framework? HOT 8
- if the implementation of this library has relation ship for Rio(Winsock registered I/O extensions) in Windows? HOT 2
- Unable to wait for socket closure HOT 2
- Test: MutexSlim_ConcurrentLoadAsync_DisableContext - fails on my machine
- Test: ConnectTests.Connect - Fails on my machine HOT 1
- Test: BufferWriterDoesNotLeak also fails on my machine
- Set unsafeSuppressExecutionContextFlow on SocketAsyncEventArgs HOT 3
- Loopback fast path is deprected on Windows and can cause high cpu on Win Server 2019 HOT 2
- How do I flush synchronously? HOT 5
- Pump a pair of PipeReader/PipeWriter
- Investigating SemaphoreSlim on net6.0+ HOT 1
- Unnecessary _queue.Count check in DedicatedThreadPoolPipeScheduler.RunWorkLoop HOT 7
- netstandard2.1 DoReceive fails on Zero Length Reads on Mono HOT 1
- Thread Safety Violation Warnings found by InferSharp static analysis tool HOT 3
- Trim and AOT warnings in Delegates and PerTypeHelpers HOT 3
- Fix Thread Safety and other static code analysis issues reported by Infer#
- Improve package readme
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pipelines.sockets.unofficial.