Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.94k stars 441 forks source link

Consider adding options to tune storage binding performance #2845

Open fashaikh opened 6 years ago

fashaikh commented 6 years ago

https://docs.microsoft.com/en-us/azure/storage/common/storage-performance-checklist says

For more information, see our blog post Nagle's Algorithm is Not Friendly towards Small Requests, which explains why Nagle's algorithm interacts poorly with table and queue requests, and shows how to disable it in your client application.

The article shows upto 90% TCP throughput improvements. Although this article is old, I couldnt find newer recommendations aroudn this. Also didnt see anything related to it in our repos, so thought it might be interesting to investigate.

The setting can be applied in code or in config file. `

` Ideally, having the ability to configure on a per binding level would be nice. There are other suggestions in the second article for `expect100Continue` and `MergeOption.NoTracking`
zmarty commented 5 years ago

I can confirm we use these settings with great success in our application to improve throughput.

// https://stackoverflow.com/questions/12750302/how-to-achive-more-10-inserts-per-second-with-azure-storage-tables/12750535#12750535
ServicePointManager.UseNagleAlgorithm = false;
ServicePointManager.Expect100Continue = false;