azure-table-storage-repo icon indicating copy to clipboard operation
azure-table-storage-repo copied to clipboard

Consider Performance Tuning options

Open dapug opened this issue 7 years ago • 1 comments

Marcin, this is a great project. Nice work!

You might consider adding/exposing perf options. See here: https://docs.particular.net/persistence/azure-storage/performance-tuning https://docs.microsoft.com/en-us/azure/storage/common/storage-performance-checklist

You could set this through the constructor, or perhaps expose a method that can be called, like:

    public void OptimizeNetwork(int connectionLimit)
    {
        var queueServicePoint = ServicePointManager.FindServicePoint(account.QueueEndpoint);
        queueServicePoint.Expect100Continue = false;
        queueServicePoint.UseNagleAlgorithm = false;
        queueServicePoint.ConnectionLimit = connectionLimit;

        var tableServicePoint = ServicePointManager.FindServicePoint(account.TableEndpoint);
        tableServicePoint.Expect100Continue = false;
        tableServicePoint.UseNagleAlgorithm = false;
        tableServicePoint.ConnectionLimit = connectionLimit;

        var blobServicePoint = ServicePointManager.FindServicePoint(account.BlobEndpoint);
        blobServicePoint.Expect100Continue = false;
        // blobServicePoint.UseNagleAlgorithm = false; // Not needed for blob
        blobServicePoint.ConnectionLimit = connectionLimit;
    }

I don't know if more granularity would be needed, but you get the idea. I recommend an optional constructor that can indicate the desire for setting this up, and input the connection limit. I can submit a PR if you'd like, but if this is interesting to you at all, this is probably sufficient for you to add in yourself.

dapug avatar Dec 04 '17 16:12 dapug

Glad you like it David.

Sorry for late reply but recently I was not that active on my OSS projects but this will improve in 2018 :)

Good input and I'll try to add that in the next couple of days. Thanks!

Crokus avatar Jan 02 '18 11:01 Crokus