Getting more or better things done in the same time frame (Gustafson’s law)

When designing systems that need to scale you always need to remember that using better resources could help you to achieve better performance. Anyway, it is essential to define how better it would be. Also, we would need to choose between reducing the per request processing time (being able to handle more work, if required) or improving the quality of the results through more specialized (resource demandant) solutions.

Let’s talk about the Gustafson’s law.

Hello, Gustafson’s law

I think the best way to understand the Gustafson’s Law is introducing a simple scenario.

Let’s assume we are implementing a face recognition solution. The business constraint is that we would need to recognize people in “real-time.” For doing that, we would need to define a right balance between the number of processed frames per second, and the level of computation per-frame we would support.

What would be the impact of improving the image processing cluster? What would be the impact of enhancing the face recognition algorithm? The easiest way to answer these questions is by using the Gustafson’s law formula.

The Formula (from Wikipedia)

The Gustafson’s Law formula is:

Where:

  • Slatency is the theoretical speedup in latency of the execution of the whole task;
  • s is the speedup in latency of the execution of the part of the task that benefits from the improvement of the resources of the system;
  • p is the percentage of the execution workload of the whole task concerning the part that benefits from the improvement of the resources of the system before the improvement.

Let’s consider that, for example, in the previous scenario, we would be able to improve the performance of the face recognition algorithm in 30% (s=30%). Also, let’s assume that recognizing faces corresponds to 15% (p=15%) of the execution workload. So, the potential improvement would be 4.5%.

An important side-effect

The Gustafson’s law takes into account that as computational power increases, the resources can be used to process more significant problems in the same time frame. In our scenario, we would be able to accept higher resolution pictures or to capture more frames (improving the precision of the face recognition solution).

In simple words, the idea would be to set the size of problems to fully exploit the computing power that becomes available as the resources improve. If faster equipment is available, that could be used to solve more significant problems within the same time.

Sizing the cloud

The Gustafson’s law is wonderfully applicable to the cloud computing environment, where it is possible to provide computing resources on demand to process more massive data sets with a latency that meets the business needs. That means that as an organization’s problem size grows, more compute power can be provisioned to perform processing and analysis in roughly constant time.

Takeaways

I would like to finish this post proposing some intriguing questions that you should try to answer knowing the Gustafson’s law:

  • What resources could impact the performance of your application? Also, what is the relevance of these resources (percentage of the execution workload of the whole task concerning the part that benefits from the improvement of the resources)?
  • What would be the best strategies to maximize the benefits of the additional computation power? How could you extract more value?
  • What would be the relationship between the cloud costs structure and the potential improvements on your application?

Compartilhe este insight:

Elemar Júnior

Sou fundador e CEO da EximiaCo e atuo como tech trusted advisor ajudando diversas empresas a gerar mais resultados através da tecnologia.

Elemar Júnior

Sou fundador e CEO da EximiaCo e atuo como tech trusted advisor ajudando diversas empresas a gerar mais resultados através da tecnologia.

Mais insights para o seu negócio

Veja mais alguns estudos e reflexões que podem gerar alguns insights para o seu negócio:

In this post, I will show how to do your first steps with OpenCV quickly using Visual Studio 2017 and...
If you ask me one tip to improve the performance of your applications, it would be: Design your objects to...
Um de meus temas de estudo preferidos no campo de desenvolvimento é design patterns. Isso sempre me levou a refletir...
Tem coisas que a gente até sabe, mas ignora pela vaidade… Uma das features mais aclamadas do Microsoft Teams, para...
Este é o primeiro post da série em que vou compartilhar algum conhecimento sobre como desenvolver uma aplicação de verdade...
Last year, Mario Fusco wrote a blog post series questioning the way Java developers are implementing the Gang of Four (GoF) patterns....
Oferta de pré-venda!

Mentoria em
Arquitetura de Software

Práticas, padrões & técnicas para Arquitetura de Software, de maneira efetiva, com base em cenários reais para profissionais envolvidos no projeto e implantação de software.

× Precisa de ajuda?