balena-os / balena-supervisor

Balena Supervisor: balena's agent on devices.
https://balena.io
Other
150 stars 63 forks source link

Logs processing improvements #2351

Closed pipex closed 3 months ago

pipex commented 4 months ago

Release notes

Overall the changes above should result in less memory and less CPU being used when processing logs, ensuring proper operation of the supervisor even under high load scenarios

alexgg commented 4 months ago

@pipex not really comfortable with dropping logs as a workaround to a bug we cannot debug - could we raise it in a brainstorm call please?

pipex commented 4 months ago

@alexgg The benefits of the previous implementation are questionable, logs could still be dropped because of backpressure when sending to the backend, or you could end up with repeated logs because the timestamps are only flushed to db every 10 minutes. Without the database at most you'd be losing a few seconds of logs if the user containers start before the supervisor.

I don't see this as a workaround, is just a more resource conscious implementation

I'll bring it to a brainstorm

pipex commented 3 months ago

I self-certify!