Re: [go-nuts] Debugging a mutex/scheduling issue

2017-10-16 Thread Ian Lance Taylor
On Mon, Oct 16, 2017 at 1:01 PM, Caleb Spare wrote: > > I have a server which is doing log processing and I'm trying to > improve throughput. The bottleneck is access to a shared resource > protected by a sync.Mutex. The issue is that even though there are > nearly always worker goroutines blocked

Re: [go-nuts] Debugging a mutex/scheduling issue

2017-10-16 Thread Caleb Spare
Well, that bug is closed as fixed and I'm using Go 1.9 which includes the mutex fairness patch. The problem I'm seeing isn't even unfairness among the users of a mutex. The problem is the delay between unlock and some other goroutine successfully acquiring the lock: the aggregate time where no gor

Re: [go-nuts] Debugging a mutex/scheduling issue

2017-10-16 Thread Ian Davis
This sounds like https://github.com/golang/go/issues/13086 On Mon, 16 Oct 2017, at 09:01 PM, Caleb Spare wrote: > I have a server which is doing log processing and I'm trying to > improve throughput. The bottleneck is access to a shared resource > protected by a sync.Mutex. The issue is that even

[go-nuts] Debugging a mutex/scheduling issue

2017-10-16 Thread Caleb Spare
I have a server which is doing log processing and I'm trying to improve throughput. The bottleneck is access to a shared resource protected by a sync.Mutex. The issue is that even though there are nearly always worker goroutines blocked on Lock, only about 10% of the time (in aggregate) is spent ru