1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
---
description: Docker homelab energy conservation
created: 2025-03-30
---
[TOC]
## TLDR
Add this to your docker-compose.yml
```
healthcheck:
disable: true
```
To check which services need it, use: [Beszel](https://www.beszel.dev/)
---
## Prelude
I self host a bunch of services on my home server.
And i care about the [energy usage](https://www.youtube.com/watch?v=OOK5xkFijPc).
Hence i chose a new enough computer to have a somewhat efficient CPU. (specs below)
<pre>
<span style="color:gray;"></span><span style="font-weight:bold;"> _,met$$$$$gg.
,g$$$$$$$$$$$$$$$P.
,g$$P" """Y$$.".
,$$P' `$$$.
',$$P ,ggs. `$$b:
`d$$' ,$P"' </span><span style="color:red;"></span><span style="font-weight:bold;color:red;">.</span><span style="font-weight:bold;color:gray;"></span><span style="font-weight:bold;"> $$$
$$P d$' </span><span style="color:red;"></span><span style="font-weight:bold;color:red;">,</span><span style="font-weight:bold;color:gray;"></span><span style="font-weight:bold;"> $$P
$$: $$. </span><span style="color:red;"></span><span style="font-weight:bold;color:red;">-</span><span style="font-weight:bold;color:gray;"></span><span style="font-weight:bold;"> ,d$$'
$$; Y$b._ _,d$P'
Y$$. </span><span style="color:red;"></span><span style="font-weight:bold;color:red;">`.</span><span style="font-weight:bold;color:gray;"></span><span style="font-weight:bold;">`"Y$$$$P"'
</span><span style="font-weight:bold;color:gray;"></span><span style="font-weight:bold;"> `$$b </span><span style="color:red;"></span><span style="font-weight:bold;color:red;">"-.__
</span><span style="font-weight:bold;color:gray;"></span><span style="font-weight:bold;"> `Y$$
`Y$$.
`$$b.
`Y$$b.
`"Y$b._
`"""</span>
<span style="font-weight:bold;"></span><span style="font-weight:bold;color:red;">user</span>@<span style="color:red;"></span><span style="font-weight:bold;color:red;">home-server</span>
----------------
<span style="color:red;"></span><span style="font-weight:bold;color:red;">OS</span>: Debian GNU/Linux 12 (bookworm) x86_64
<span style="color:red;"></span><span style="font-weight:bold;color:red;">Host</span>: HP EliteDesk 800 G3 SFF
<span style="color:red;"></span><span style="font-weight:bold;color:red;">Kernel</span>: 6.1.0-32-amd64
<span style="color:red;"></span><span style="font-weight:bold;color:red;">Uptime</span>: 10 days, 19 hours, 29 mins
<span style="color:red;"></span><span style="font-weight:bold;color:red;">Packages</span>: 2537 (dpkg), 7 (flatpak)
<span style="color:red;"></span><span style="font-weight:bold;color:red;">Shell</span>: bash 5.2.15
<span style="color:red;"></span><span style="font-weight:bold;color:red;">Terminal</span>: /dev/pts/1
<span style="color:red;"></span><span style="font-weight:bold;color:red;">CPU</span>: Intel i5-7500 (4) @ 3.800GHz
<span style="color:red;"></span><span style="font-weight:bold;color:red;">GPU</span>: Intel HD Graphics 630
<span style="color:red;"></span><span style="font-weight:bold;color:red;">Memory</span>: 3124MiB / 15400MiB
<span style="color:dimgray;"></span><span style="color:dimgray;background-color:black;"> </span><span style="color:red;background-color:black;"></span><span style="color:red;background-color:red;"> </span><span style="color:green;background-color:red;"></span><span style="color:green;background-color:green;"> </span><span style="color:olive;background-color:green;"></span><span style="color:olive;background-color:olive;"> </span><span style="color:blue;background-color:olive;"></span><span style="color:blue;background-color:blue;"> </span><span style="color:purple;background-color:blue;"></span><span style="color:purple;background-color:purple;"> </span><span style="color:teal;background-color:purple;"></span><span style="color:teal;background-color:teal;"> </span><span style="color:gray;background-color:teal;"></span><span style="color:gray;background-color:gray;"> </span>
<span style="filter: contrast(70%) brightness(190%);color:dimgray;"></span><span style="filter: contrast(70%) brightness(190%);color:dimgray;background-color:black;"> </span><span style="filter: contrast(70%) brightness(190%);color:red;background-color:black;"></span><span style="filter: contrast(70%) brightness(190%);color:red;background-color:red;"> </span><span style="filter: contrast(70%) brightness(190%);color:green;background-color:red;"></span><span style="filter: contrast(70%) brightness(190%);color:green;background-color:green;"> </span><span style="filter: contrast(70%) brightness(190%);color:olive;background-color:green;"></span><span style="filter: contrast(70%) brightness(190%);color:olive;background-color:olive;"> </span><span style="filter: contrast(70%) brightness(190%);color:blue;background-color:olive;"></span><span style="filter: contrast(70%) brightness(190%);color:blue;background-color:blue;"> </span><span style="filter: contrast(70%) brightness(190%);color:purple;background-color:blue;"></span><span style="filter: contrast(70%) brightness(190%);color:purple;background-color:purple;"> </span><span style="filter: contrast(70%) brightness(190%);color:teal;background-color:purple;"></span><span style="filter: contrast(70%) brightness(190%);color:teal;background-color:teal;"> </span><span style="filter: contrast(70%) brightness(190%);color:gray;background-color:teal;"></span><span style="filter: contrast(70%) brightness(190%);color:gray;background-color:gray;"> </span>
</pre>
I chose to my home services using docker, which has been great, since it allows me manage many services easily.
They even update themselves using [Watchtower](https://github.com/containrrr/watchtower).
---
## Observability
However, i lacked [observability](https://en.wikipedia.org/wiki/Observability_(software)) into resource usage.
### cAdvisor
At first i tried a stack consisting of [Grafana](https://grafana.com/) [Prometheus](https://prometheus.io/), and [cAdvisor](https://github.com/google/cadvisor)
How ever, the only conclusion i came to running this was that my CPU load now was ≈ 30% higher (if memory serves me)
This defeats the purpose for my usage...
I'm sure cAdvisor has it's place, but it's not suitable for my use case.
### Beszel
Then i found [Beszel](https://www.beszel.dev/) which is docker / system monitoring in a box.
Using a minimum of system resources.
Running this for a month gave me insights into my resource usage. With averages, and a breakdown per container.
---
## Resource usage BEFORE

---
## Optimizing
Beszels CPU usage breakdown per container helps you drill down which container is weighing down your system.
Stoping the ones you don't need and, searching the respective projects github issues helps you find solutions.
As per this github issue:
[High CPU (5-20%) consumption even when not being used](https://github.com/filebrowser/filebrowser/issues/2676#issuecomment-1708201927)
Adding the following segment to you docker compose files helps lower their CPU usage.
```
healthcheck:
disable: true
```
---
## Resource usage after

|