You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/about.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,6 @@ title = "About Me"
4
4
5
5
I'm a Software Engineer interested in sustainability and cloud-native infrastructure. I'm an advisor on Infrastructure at [Green Web Foundation](https://www.thegreenwebfoundation.org/) and a member of the [Green Software Foundation](https://greensoftware.foundation/). I'm also a member of the [ClimateAction.tech](https://climateaction.tech/) community and you can find me there in the `#greener-infra` channel.
6
6
7
-
From 2017 to April 2022 I was a platform engineer at [Giant Swarm](https://giantswarm.io) working mainly on CI/CD and their app platform. Prior to that from 2015 to 2017 I was a Co-Founder and Chief Software Architect at Microscaling Systems. A startup working on autoscaling containers to reduce costs and carbon emissions.
7
+
From 2017 to April 2022 I was a platform engineer at [Giant Swarm](https://giantswarm.io) working mainly on CI/CD and their app platform. Prior to that from 2015 to 2017 I was a Co-Founder and Chief Software Architect at [Microscaling Systems](https://web.archive.org/web/20161013114349/http://microscaling.com/). A startup working on autoscaling containers to reduce costs and carbon emissions.
8
8
9
9
Right now I'm taking a mini-sabbatical to travel and work on green software.
Copy file name to clipboardExpand all lines: content/post/energy-consumption-of-a-cluster-with-scaphandre.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,27 +14,27 @@ author = "Ross Fairbanks"
14
14
15
15
[Green Software Engineering](https://greensoftware.foundation/articles/what-is-green-software) is a new and evolving branch of software engineering for building more sustainable systems. Using these types of techniques the tech sector can play its part in tackling the climate crisis and reducing our dependence on fossil fuels.
16
16
17
-
For running software [electricity](https://principles.green/principles/electricity/) consumption is a key metric. Of course the source of that electricity and the carbon emissions [embodied](https://principles.green/principles/embodied-carbon/) in the hardware are also important. However even if the electricity sourced is 100% renewable consuming less electricity frees it up to be used for other purposes.
17
+
For running software [electricity](https://principles.green/principles/electricity/) consumption is a key metric. Of course the source of that electricity and the carbon emissions [embodied](https://principles.green/principles/embodied-carbon/) in the hardware are also important. However even if the electricity sourced is 100% renewable, consuming less electricity frees it up to be used for other purposes.
18
18
19
-
[Scaphandre](https://github.com/hubblo-org/scaphandre) is a monitoring agent that provides energy consumption metrics. The project was founded by Benoit Petit in October 2020. The naming comes from "heavy diving suit" in French. I've been fortunate to be able to help with the Kubernetes integration which this post focuses on and its given me the chance to learn some Rust. Scapandre is developed in Rust to keep the footprint of the monitoring as low as possible.
19
+
[Scaphandre](https://github.com/hubblo-org/scaphandre) is a monitoring agent that provides energy consumption metrics. The project was founded by Benoit Petit in October 2020. The name comes from "heavy diving suit" in French. I've been fortunate to be able to help with the Kubernetes integration which this post focuses on and its given me the chance to learn some Rust. Scaphandre is developed in Rust to keep the footprint of the monitoring as low as possible.
20
20
21
-
However Kubernetes isn't required. Scaphandre will work on any bare metal server providing the CPU and kernel has RAPL support. A great example is this [post](https://superuser.openstack.org/articles/environmental-reporting-dashboards-for-openstack-from-bbc-rd/) on how BBC R&D uses it and the UK National Grid [Carbon Intensity API](https://carbonintensity.org.uk/) to monitor their 2 OpenStack data centres.
21
+
However, Kubernetes isn't required. Scaphandre will work on any bare metal server providing the CPU and kernel has RAPL support. A great example is this [post](https://superuser.openstack.org/articles/environmental-reporting-dashboards-for-openstack-from-bbc-rd/) on how BBC R&D uses it and the UK National Grid [Carbon Intensity API](https://carbonintensity.org.uk/) to monitor their 2 OpenStack data centers.
22
22
23
-
RAPL (Running Average Power Limit) is a technology developed by Intel that is included in most Intel and AMD CPUs produced after 2012. In some cases it can also measure DRAM energy usage. The `powercap` part of the name comes from the PowerCap Linux kernel module. This writes the energy consumption data to files in `/sys/class/powercap`. This directory and `/proc` are mounted by Scaphandre and used as the source of the metrics. The [docs](https://hubblo-org.github.io/scaphandre-documentation/explanations/how-scaph-computes-per-process-power-consumption.html) have a much deeper explanation of how the perprocess consumption is calculated.
23
+
RAPL (Running Average Power Limit) is a technology developed by Intel that is included in most Intel and AMD CPUs produced after 2012. In some cases it can also measure DRAM energy usage. The `powercap` part of the name comes from the PowerCap Linux kernel module. This writes the energy consumption data to files in `/sys/class/powercap`. This directory and `/proc` are mounted by Scaphandre and used as the source of the metrics. The [docs](https://hubblo-org.github.io/scaphandre-documentation/explanations/how-scaph-computes-per-process-power-consumption.html) have a much deeper explanation of how the per-process consumption is calculated.
24
24
25
-
For outputs Scaphandre has the concept of exporters. In this post we'll focus on the Prometheus exporter but other options are JSON, Riemann and Warp 10. The [Qemu exporter](https://hubblo-org.github.io/scaphandre-documentation/references/exporter-qemu.html) is a special case. It runs on bare metal hosts and can expose metrics to Qemu/KVM VMs running on the host.
25
+
For outputs, Scaphandre has the concept of exporters. In this post we'll focus on the Prometheus exporter but other options are JSON, Riemann and Warp 10. The [Qemu exporter](https://hubblo-org.github.io/scaphandre-documentation/references/exporter-qemu.html) is a special case. It runs on bare metal hosts and can expose metrics to Qemu/KVM VMs running on the host.
26
26
27
-
Metrics are exposed at the host, socket and process level. For Kubernetes workloads these processes will be containers running on a node. The raw metric includes the PID of the container. However complex applications may consist of multiple containers. So we add the pod name and namespace each container belongs to. With these extra labels we can link to any other metadata we need in Prometheus.
27
+
Metrics are exposed at the host, socket and process level. For Kubernetes workloads, these processes will be containers running on a node. The raw metric includes the PID of the container. However, complex applications may consist of multiple containers. So we add the pod name and namespace each container belongs to. With these extra labels we can link to any other metadata we need in Prometheus.
28
28
29
29

30
30
31
-
To do this when Scaphandre is deployed as a daemon set with the `--containers` flag it will open an in-cluster connection to list the pods on the node. To link processes to pods the cgroup file in `/proc/PID/cgroup` is parsed to get the container ID.
31
+
To do this, when Scaphandre is deployed as a daemon set with the `--containers` flag it will open an in-cluster connection to list the pods on the node. To link processes to pods, the cgroup file in `/proc/PID/cgroup` is parsed to get the container ID.
32
32
33
33
There are some challenges here as the format of the cgroup file depends on the [cgroup driver](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/) used by the kubelet. We're working to support all drivers but if you encounter issues please open an issue.
34
34
35
35

36
36
37
-
If you want to try out Scaphandre on a bare metal cluster there is a [tutorial](https://hubblo-org.github.io/scaphandre-documentation/tutorials/kubernetes.html) for installing it via its Helm chart along with Prometheus and Grafana to visualize the energy consumption of your cluster. Just be sure to check the [compatibility](https://hubblo-org.github.io/scaphandre-documentation/compatibility.html) docs to ensure your CPU and kernel is supported.
37
+
If you want to try out Scaphandre on a bare metal cluster there is a [tutorial](https://hubblo-org.github.io/scaphandre-documentation/tutorials/kubernetes.html) for installing it via its Helm chart along with Prometheus and Grafana to visualize the energy consumption of your cluster. Just be sure to check the [compatibility](https://hubblo-org.github.io/scaphandre-documentation/compatibility.html) docs to ensure your CPU and kernel are supported.
38
38
39
39
There is lots planned for the project including an estimation based sensor that will work with VMs including public cloud instances. So watch this space! Or even better, get in touch if you're interested in [contributing](https://hubblo-org.github.io/scaphandre-documentation/contributing.html).
0 commit comments