I’m planning an energy monitoring exercise for an introductory networking class, and I’d love feedback from others who’ve tried something similar.
I teach in a digital arts grad program. The class is an introduction to networks, specifically the internet. Most of the students are not experienced programmers. I want them to know how the internet is structured, what a web server is, software-wise, and that all the internet is made of physical devices which consume resources.
I teach them to set up a virtual instance, install and customize ufw, nginx, node.js, and put an HTTPS certificate on it. This introduces them to the basics of what a web server is and how it works, from the software end. I’ve done it on other hosts, but I want to do this on CC, and be able to show them how much energy their instance is using at any point. It sounds like The Core Hours and Carbon Credits project did something very similar?
Last year I showed them energy usage of this model by setting up a single instance of this on a baremetal node, then ran the power monitoring tools Michael Sherman wrote about, while having them make client calls to the instance using a browser or curl. As they made requests, they watched the energy go up, in real time. When they did multiple requests using curl, they saw the energy go much higher as the load went higher. They were much impressed, and had lots of good questions.
Having each student run a bare metal node seems too resource intensive. So I thought perhaps I should run a hypervisor on a bare metal node, then spin off a virtual instance for each student. That way they could see their instance’s energy usage, even if not per-process. Michael Sherman suggested QEMU for this purpose (thanks Michael).
I’ve never run a hypervisor before, or even done containerization, to be honest (I’m pretty basic, my main expertise is microcontrollers and digital electronics). If anyone’s done something like this, or has advice on a setup for it that’s both effective and simple enough to explain to beginners, I’d love to hear from you.