Code makes the world a better place

Performance Analysis with perf on Linux (Beginner)

Introduction

With a profiler, we can learn more about how software runs—such as memory usage, CPU cycles, cache misses, I/O time, and more. This information is extremely helpful for locating performance bottlenecks. The ultimate goal of performance analysis is to find what slows the program down and maximize performance.

This post introduces perf on Linux. Using a simple program example, I will demonstrate how to analyze a program with perf, and you will see that using a profiling tool can make it much easier to identify the root cause. This post references Gabriel Krisman Bertaz’s Performance analysis in Linux

Continue reading

A Detailed Guide to the Unix/Linux `top` Command

TOP Overview

The top command is one of the most fundamental tools on Unix/Linux. It is similar to Windows Task Manager and lets you monitor the execution status of currently running programs. top is also one of the simplest ways to monitor a program: you can use it to observe how much memory and CPU a program consumes, along with many other details. There are many similar tools (such as htop and gtop) which are extended versions. If you’re interested, you can look them up, but for basic needs, top is more than sufficient.

Continue reading
  • Page 1 of 1