Posts

Showing posts from April, 2014

SP protocols improved again!

Introduction As a result of some investigations performed in response to my first performance tests for my SP implementation , I've made a bunch of changes to my code. First off, I discovered that my code was rather racy.  When I started bumping up GOMAXPROCS, and and used the -race flag to go test, I found lots of issues.  Second, there were failure scenarios where the performance fell off a cliff, as the code dropped messages, needed to retry, etc.  I've made a lot of changes to fix the errors.  But, I've also made a major set of changes which enable a vastly better level of performance, particularly for throughput sensitive workloads. Note that to get these numbers, the application should "recycle" the Messages it uses (using a new Free() API... there is also a NewMessage() API to allocate from the cache), which will cache and recycle used buffers, greatly reducing the garbage collector workload. Throughput So, here are the new numbers