Disable the HDMI
If you plan to use the Raspberry Pi only via SSH, without a GUI, you’ll find useful to disable the HDMI, since it can consume up to 25mA. You can disable the HDMI circuit with the command:
You will be able to access to the HDMI circuit again just with a reboot of your Raspberry Pi.
In case you will want to keep it automatically disabled also after the reboots, add the command above in /etc/rc.local, just before the line exit 0.
Reduce the GPU RAM
In the Raspberry Pi, the RAM is shared also with the graphical card. If you want to reduce the RAM dedicated to the graphical card, for example for a Raspberry Pi configured as server, just type:
sudo raspy config
Select Advanced Options and Memory Split, then set it at the minimum allowed value (16).
One further step is to install ZRAM and optimize the RAM swapping.
It automatically detects the number of CPU cores to allocate to ZRAM computation, disables existing swap and enables ZRAM swap.
The project is located on Github and here are the steps for the installation:
download the script and copy it to the /usr/bin/ folder:
sudo wget -O /usr/bin/zram.sh https://raw.githubusercontent.com/novaspirit/rpi_zram/master/zram.sh
make the file executable
sudo chmod +x /usr/bin/zram.sh
edit the /etc/rc.local file to run the script at startup
sudo nano /etc/rc.local
add the following line before exit 0