The Strategic Importance of Built-In Performance Toolset in Golang

February 23, 2017

Post

Go is a relatively new open source programming language created by Google. Considering its recent growth, many developers and organizations have naturally become interested in it. With its main features, such as compiled-language performance, powerful and simple concurrency model and cross-compilation support, it can be considered as a true cloud language.

A lot of critical infrastructure software, e.g. Docker and Kubernetes, is actually written in Go. Go Wiki has an impressive list of companies using Go https://github.com/golang/go/wiki/GoUsers.

Go’s built-in performance toolset: pprof

Along with its outstanding features, Go comes with a built-in performance profiling toolset called pprof. Pprof includes sampling profilers for CPU usage, memory allocations and blocking operations. A goroutine (a lightweight thread of execution in Go) tracing feature even allows developers to trace the execution in order to detect blocking operations in I/O, lock contention, system calls, etc. Pprof can be easily initiated from the Go command line tool for interactive performance analysis.

The effect of built-in performance tools on language adoption

It is an important strategic decision to implement performance profiling and troubleshooting instruments into a language, especially if it has been thought of as a server-side language.

While performance might not be a critical component for early adopters of a language, e.g. independent developers, startups or SMBs, it becomes important when the language is used in large deployments. For example, optimizing an application to run on fewer servers might not be worth it if the total number of servers/containers is less than 50-100. But if 2,000 servers can be reduced to 1,000 or fewer, that may have a significant impact on the bottom line.

Additionally, the cost of downtime and bad performance is now extremely high. Besides having a negative impact on customers, slow page loading times may even impact search engine ranking.

In the case of Go, some of the large deployments are also at Google. As a result, the language directly benefits from this as well. Performance optimizations are done not only at the application level, but to the language itself. This is reflected in multiple performance-related issues at Golang’s GitHub repository opened by developers based on information from built-in profilers.

Production use of pprof

The pprof toolset is rather low level for immediate business production use. It requires a command line tool connecting to it over the network. This assumes pprof has a listening port in the application, which should be secured from the outside world. Moreover, it might be tricky to locate a host in a container environment for profiling in the first place.

Instana’s awlays-on AutoProfile™ solves these problems by introducing continuous, automatic production profiling services. More content to learn about Instana’s production profiling:

Play with Instana’s APM Observability Sandbox

Announcement
As you may have already heard from us back in December 2019, Instana has acquired StackImpact. During the last few months, we were working hard integrating StackImpact’s continuous profiling functionality to Instana,...
|
Featured
Profiling is an essential part of application development, where optimizing performance and resource efficiency are important. It is also useful for troubleshooting performance and crash issues. Profilers provide details about code execution,...
|
Announcement, Product
A profile, according to wikipedia, “is a form of dynamic program analysis that measures, for example, the space (memory) or time complexity of a program, the usage of particular instructions, or the...
|

Start your FREE TRIAL today!

As the leading provider of Automatic Application Performance Monitoring (APM) solutions for microservices, Instana has developed the automatic monitoring and AI-based analysis DevOps needs to manage the performance of modern applications. Instana is the only APM solution that automatically discovers, maps and visualizes microservice applications without continuous additional engineering. Customers using Instana achieve operational excellence and deliver better software faster. Visit https://www.instana.com to learn more.