Index | FO147 |
Title | Include Performance tooling in Ubuntu |
Status | Pending Review |
Author | Matthieu Clemenceau, Christian Ehrhardt, Jon Seager, Robie Basak |
Type | Standard |
Created | 2023-12-13 |
Abstract
As we raise the bar at Canonical on performance management and optimization we will be enabling frame pointers for Ubuntu 24.04 by default. To further enhance application developer experience while trying to find performance gain, we will include performance and profiling tooling by default on Ubuntu 24.04 (classic, not core) as well
Rationale
Mark Shuttleworth and Jon Seager had a productive chat with Brendan Gregg talking about what we could do in Ubuntu 24.04 to make Ubuntu absolutely great for performance engineers. A key suggestion was to include this tooling by default.
Specification
Install Performance Engineering tools by default
A set of packages shall be installed and available by default on all relevant systems. These are as follows. Some of these packages are already seeded and for these packages implementation requires no changes, but they remain mentioned here so that this specification serves to provide an additional purpose for which they should remain seeded. For the purpose of this specification, all defaults in seeds shall be provided by Recommends, even if they are “upgraded” to Depends for other purposes in practice.
Package | Responsible Team | Seed |
---|---|---|
procps | Foundations | required (already seeded) |
util-linux | Foundations | required (Essential: yes) |
sysstat | Server | standard (already in Supported-Sysadmin-Server) |
iproute2 | Kernel | minimal (already seeded) |
numactl | Server | standard (already in Supported-Sysadmin-Server) |
bpfcc-tools | Foundations | kernel-accessories (see US094 - Kernel Accessories Seed and Metapackage) |
bpftrace | Foundations | kernel-accessories (see US094 - Kernel Accessories Seed and Metapackage) |
trace-cmd | Foundations | standard |
ethtool | Server | standard (already in server and Supported-Hardware-Common) |
Make the linux-tools-$version package available by default
This package shall be added to the Recommends of the relevant kernel package using the linux-meta source package.
Provide a performance-tools metapackage
We shall add a new metapackage to universe called performance-tools.
Description: utilities for debugging performance and reliability issues
This metapackage installs utilities for inspecting and debugging systems that are
experiencing performance and/or reliability issues.
Included are more traditional performance analysis and inspection tools, along with
dynamic tracing and instrumentation tools which make use of the eBPF subsystem.
On Ubuntu, some of these packages are installed by default already, but are
also included here to assist with deployments that do not use the defaults.
This metapackage shall depend on the following packages:
- procps
- sysstat
- iproute2
- numactl
- bpfcc-tools
- bpftrace
- perf-tools-unstable
- trace-cmd
- nicstat
- ethtool
- tiptop
- sysprof
Further Information
Related specifications that implementation of this specification is dependent upon:
Design Decisions and Rationale
Considering the purpose of the performance-tools metapackage:
-
Since we already include performance tools that we can support in main, and arrange for them to be installed by default, this metapackage should be unnecessary in “usual” use cases.
-
However, some packages do not meet our standards for main, or otherwise have not been included into main yet, yet are available in universe. Performance engineers might be expected to reference the book “Systems Performance” by Brendan Gregg and it is convenient for such engineers for there to be a metapackage that pulls in everything that we have available in the archive referred to from the book. We wouldn’t expect to do this for all books, but this is the relevant book in this area of expertise.
-
Users who are using minimal images that do not install these packages by default (eg. cloud-minimal for OCI generation purposes) can easily install our recommended set.
The performance-tools metapackage is therefore provided in addition to, and independent of, the defaults provided through the seeds. It uses Depends rather than Recommends since the entire purpose of the metapackage is to install its dependencies, one would not install the metapackage without wanting its dependencies, and it’d be correct to say that the metapackage is not installed if the packages it “ships” are not installed. Users who would like a subset of the packages the metapackages provides always have the option to individually install those manually. The metapackage can be in universe because there is no requirement for it to be in main. This makes adding to it easier, since there is no MIR requirement.
The metapackage may duplicate packages that are already brought in by other seeds, whether directly or indirectly. But since one use case above means that a user may be preparing an image not driven by those seeds, we include them anyway. We make one exception: since “Essential: yes” packages are not permitted to be depended upon by policy, we exclude these to avoid breaking any existing assumptions in tooling.
linux-tools-$version, having the corresponding required kernel version as part of its package name, cannot be provided by default through seeds in the usual fashion. Therefore we use the linux-meta source package to do this instead.
Expected Negative Consequences
We expect the following negative consequences as a result of this change, but in examining the trade-off, consider that the benefits outweigh these.
Some packages will be installed by default that were not previously. The following are estimates for the upper bound of increase in image and installation size for all server and desktop images (excluding cloud-minimal, which will not be affected since they are out of scope of the change):
Package | Image Size Increase | Install Size Increase |
---|---|---|
sysstat | 525 kB | 1,640 kB |
numactl | 37.3 kB | 136 kB |
bpfcc-tools (images with kernels only) | 43 MB | 206 MB |
bpftrace (images with kernels only) (depends on bpfcc-tools and the figures also include those of that dependency) | 80.8 MB | 367 MB |
trace-cmd | 469 kB | 2,002 kB |
ethtool | 229 kB | 752 kB |
LXD images will now be differentiated from other image types. Whereas before they were identical except for the absence of kernel packages, now additionally the kernel-accessories metapackage will be installed by default everywhere except LXD images. This is intentional, to avoid increasing LXD images with unnecessary BPF-related packages. However it is additionally noted that for product purposes, this means that LXD images will be further differentiated than previously.