Please see the accompanying blogpost!
This project measures latex compilation for three different ways of compiling LaTeX:
- Local: Local compilation using
xelatex
- Hosted: Overleaf compilation with overleaf hosted in a docker container running locally
- Cloud: Overleaf compilation on overleaf.com. Measure only the energy used by cpu and memory locally.
This project only runs on intel based linux machines. The project depends on the following things running and working on your machine.
- Pipenv to install dependencies (pyRAPL selenium). Run
Pipenv install
. - Selenium should work on your machine
- Overleaf toolkit
- Make an account
- Import the tex projects (from
./tex
) - Update the login info and project URLs in the scripts
- User access to
/sys/class/powercap/intel-rapl
. (runsudo chmod -R a+r /sys/class/powercap/intel-rapl
)
There are three experiments: Background, Main and Cloud. Before running an experiment, make sure:
- Power cable is plugged in
- No external monitor or other peripherals are connected
- Screen brightness is set to 100%
- Screen saver timer is turned off
- No other programs are open
- Airplane mode is turned on (i.e. no Bluetooth, no WiFi, no notifications), except for the cloud experiment.
Measures local and hosted energy usage.
- run
pipenv run experiment
Measures cloud energy usage. Not fully automatic, because overleaf will complain that you are a bot.
- run
pipenv run experiment
- log in, and navigate to the project under test
- wait until warmup is finished and the fibonacci number is printed
- compile the document from scratch, wait for completion, wait 30 seconds, repeat.
Measures the background energy usage.
- run
pipenv run bg