Azure and CopyFromBlob performance

by ingvar 2. maj 2011 21:47

I have earlier looked at some of the performance for some of the methods for uploading content to a Azure blob. The result of these tests can be found here. While I was working on getting Composite C1 multi tenancy working in the cloud, I ran into a performance problem. Thanks to Henrik Westergaard, I took a look at the CopyFromBlob method and its performance. 

I used the same setup as in my eirlier test. The test code ran in the WebRole OnStart. The table below holds the tests results. Unlike the other methods i tested, the CopyFromBlob seems to be more invariant when the file size is getting larger. The CopyFromBlob method is 2-3 times faster for files larger than 250kb. And never significant slower. So if the setup permits it, this is preferred compared to the other upload-methods.

Size in kb CopyFromBlob
50 70
100 75
150 73
200 75
250 75
300 75
350 75
400 75
450 73
500 70

The code for the test loop is here:

int copyFromBlobTime1 = Environment.TickCount;
for (int i = 0; i < loopCount; i++)
{
    CloudBlob targetBlob = container.
        GetBlobReference(string.Format("TargetTestFile{0}.dat", i));
    targetBlob.CopyFromBlob(sourceBlob);
}
int copyFromBlobTime2 = Environment.TickCount;

Tags:

.NET | Azure | C# | Blob

About the author

Martin Ingvar Kofoed Jensen

Architect and Senior Developer at Composite on the open source project Composite C1 - C#/4.0, LINQ, Azure, Parallel and much more!

Follow me on Twitter

Read more about me here.

Read press and buzz about my work and me here.

Stack Overflow

Month List