Cost Optimization for On-Demand Private Build Server for SharePoint (part-2)

By | April 20, 2017

This is 5 part blog series, on how to “Cost Optimization for On-demand Private Build Server for SharePoint”. Although I specifically write this for SharePoint’s build server, however the concept and ideas is also applicable for anyone looking for optimizing their cost running private CI/CD (Continuous Integration/Continuous Delivery) in Visual Studio online. The series in these articles are:

  1. Part 1, Introduction to Visual Studio Online Build and Release Agent
  2. Part 2, Cost Analysis and Optimizing Cost
  3. Part 3, Step-by-Step Creation Private Build Server for SharePoint
  4. Part 4, Azure Automation Service
  5. Part 5, Integrates Azure Automation Service in Build Pipeline

In Part 1

In Part 1, I have written about Visual Studio Team Services, build agent and private build server. At the end of Part 1, we saw that subscribing to Hosted Pipelines is cheaper than building own standard private build server, unless there is specific requirement to install different application for build purposes. We are still discussing how to optimize the cost of owning private build server so that it will be cheaper that subscribing to Hosted Pipelines.

Cost Analysis and Optimizing Cost

In Part 1, it is clear that running private build server using minimum VM configuration in Azure will cost USD 47.45 / month, compare to USD 40.00 / month subscription to Hosted Pipelines. Although, Azure offer reduced cost through Azure Reserved VM Instance (RIs) (https://azure.microsoft.com/en-us/pricing/reserved-vm-instances/) , but the question is do we really need to subscribe for reserved instance?

Moreover, if we subscribe to reserved instance – we already defeat the on-demand purpose of the instance and definitely different with monthly subscription to Hosted Pipeline scheme. For sake of curiosity, lets see how much it costs if we choose RI.

In fact, the cost reduce to almost half to USD 25.43 / month for 1 year commitment, and even more reduced to 12.73 / month for 3 years commitments. The catch, of course you have to pay the subscription in advance; hence instead of monthly payment 47.45 / month, you will need to pay initial payment USD 305.16 for 1 year subscription, or USD 458.28 for 3 years subscription.

Comparing yearly subscription with Pay As You go, we will have following cost consumption

Year 0Year 1Year 2Year 3
Pay As You Go (47.45 USD)

0 USD

569.40 USD

1,138.80 USD

1,708.20 USD

1 Year RI (25.43 USD)

305.16 USD

610.32 USD

915.48 USD

0

3 Year RI (12.73 USD)

458.28 USD

0

0

0

Running cost of Pay As You Go, is much higher than RI – it is much more cheaper to subscribe 3 years RI compared to running Pay As You Go for a year. The problems:

  1. upfront payment which may not be suitable for some of companies.
  1. long term commitment, may not also suitable for early stage project or small or short-term projects.

Other than that, I think long term commitment is cheaper and simpler.

Build Usage Pattern

You can analyse your team’s build pattern by checking the Agent Queues build history. In that page you will be able see how long you actually use build minutes. In this case you just need to copy-paste the table to Excel and calculate accordingly.

In our case, when my team is actively working on 5 concurrent projects , with about 10 developers – we are spending almost 1200 build/release minutes or 20 hours per month. To provide clearer comparison, here are our configuration:

  1. 1 Build and 1 Release pipelines (3 release environment) , per project
  2. At least 2 commits per developer daily
  3. Automatic build every commit
  4. 3 times daily, scheduled release per project

Based on free build hours, we actually need 20 – 4 (free build hours) = 16 hours, additional build/release per month. Using Pay As You Go price, the B2S will cost USD 0.065 / hour – or in total we actually only need USD 1.04 / month for our private build server.

So, why the initial cost calculation was so high? USD 47.45 / month. It is because, we keep the build server VM up and running. In fact, we must turn-off the server if it is not being used in order to keep the cost lower.

Hence, do you think it is still worth to pay RI for 3 years up-front if you can minimize the cost of Pay As You Go? See in the next posting.

Leave a Reply