Open Bug 1425787 Opened 7 years ago Updated 7 months ago

[meta] Binary implementation of mozsystemmonitor for Linux/Win/Mac

Categories

(Firefox Build System :: General, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: gps, Unassigned)

References

(Blocks 3 open bugs)

Details

(Keywords: meta)

Attachments

(1 file)

mozsystemmonitor is a Python package providing a mechanism to record system resource usage. We've historically had difficulties getting that working on as many platforms as we want because of Python C extension issues. Plus, the code is somewhat cobbled together and is a bit brittle. In support of bug 1425785, I'd like to create a Rust implementation of this functionality. While we want to eventually support all tier 1 platforms, our immediate goal is to integrate this into run-task. And run-task runs mainly on Linux. So as our initial goal, let's get the Rust implementation working on Linux.
Product: Core → Firefox Build System
I'm not actively working on this.
Assignee: gps → nobody
Status: ASSIGNED → NEW

I'll take this over, unless any objections are raised.

Assignee: nobody → sfraser

The main goal as I understand it is to ease deployment, and lower any performance hit when taking the measurements. run-task itself could have this sort of feature added but it doesn't currently have any external dependency, and adding one would be a pain, especially something with compiled components like psutil.

Current platform breakdown for tasks which use run-task on mozilla-central is
linux 5185
win 3402
gecko-t-bitbar-gw-perf-g5 522
gecko-t-bitbar-gw-perf-p2 776
osx 838
images 76
gecko-t-bitbar-gw-unit-p2 12

So while Linux is still the priority, Windows and OSX support are blockers.

There's https://github.com/rust-psutil/rust-psutil which seems to not yet be feature complete. For comparison there's also https://github.com/shirou/gopsutil since the deployment strategy there would be the same, and the worker is already Go.

psutil rust-psutil gopsutil
Feature Linux Windows MacOSX Linux Windows MacOSX
System
cpu_times
cpu_percent
virtual_memory
swap_memory
net_io_counters
disk_io_counters
Process
parent
children
cpu_times
cpu_percent
memory_info
io_counters
Summary: Rust implementation of mozsystemmonitor for Linux → [meta] Rust implementation of mozsystemmonitor for Linux

We had a discussion about this in Taskcluster RFC 160, as one of the options open to us is to include this as a feature inside the worker.

The summary of that discussion is that resource monitoring as a worker feature has advantages, such as being payload and deployment agnostic, allowing use across multiple clusters. However, it would be safer to develop this as an in-tree feature and have it controlled by the payload, at least for the moment. We will be iterating on code, output format, processing pipeline, reports and so on; once all those aspects have stabilised we can revisit closer worker integration.

Taking the current Mixin as v1, this v2 approach will be to create a toolchain containing the task monitor, add it to task definitions using existing tool dependency mechanisms, and control its deployment using task definition changes. Later, v3 may be improvements on this or inclusion into the workers themselves.

Regardless of other details this would mean the current recording of phases will be lost, so we should discuss a means of recording those and combining them later in the processing pipeline for reports.

Summary: [meta] Rust implementation of mozsystemmonitor for Linux → [meta] Binary implementation of mozsystemmonitor for Linux
Summary: [meta] Binary implementation of mozsystemmonitor for Linux → [meta] Binary implementation of mozsystemmonitor for Linux/Win/Mac

The bug assignee didn't login in Bugzilla in the last 7 months.
:mhentges, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: sfraser → nobody
Flags: needinfo?(mhentges)
Flags: needinfo?(mhentges)
Severity: normal → S3
Depends on: 1906899
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: