siderolabs / talos

Talos Linux is a modern Linux distribution built for Kubernetes.
https://www.talos.dev
Mozilla Public License 2.0
6.9k stars 556 forks source link

optimize Talos core components memory usage #7532

Open smira opened 1 year ago

smira commented 1 year ago

From a worker node:

image

apid is 80MiB, dashboard is 94MiB and init is 128 MiB

### COSI Improvements
- [ ] https://github.com/cosi-project/runtime/issues/305
- [ ] https://github.com/cosi-project/runtime/issues/306
- [ ] https://github.com/cosi-project/runtime/issues/307
### 3rd party libraries
- [ ] https://github.com/gopacket/gopacket/pull/24
- [ ] https://github.com/gopacket/gopacket/pull/32
### Talos Improvements
- [ ] https://github.com/siderolabs/talos/issues/7576
- [ ] https://github.com/siderolabs/talos/issues/7577
- [ ] https://github.com/siderolabs/talos/issues/7578
- [ ] https://github.com/siderolabs/talos/issues/7880
smira commented 1 year ago

There was some work done recently to optimize memory usage, but there's still some room for improvement here

smira commented 1 year ago

One pending potential change: https://github.com/gopacket/gopacket/pull/24

smira commented 1 year ago

Things got better with merged in fixes, but still a lot of room for improvement:

image

smira commented 1 year ago
smira commented 1 year ago

dropping gopacket library from machined reduces observed RSS down ~20 MiB