Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump clickhouse server version #195

Open
wants to merge 2 commits into
base: v2.1.4
Choose a base branch
from
Open

Conversation

pcouy
Copy link

@pcouy pcouy commented Dec 4, 2024

Fixes excessively high CPU and RAM usage on idling instance

All the following graphs are stacked CPU time / container, and the largest area is the clickhouse server. Spikes are not relevant except for the fact they indicate a restart of the plausible and clickhouse containers.

Upgrading from the latest compose file from the analytics repo caused the following increase in CPU usage from clickhouse

2024-12-04-141036_612x292_scrot

Upgrading clickhouse to the latest version brought it back to a much lower level

2024-12-04-141117_613x294_scrot

Notice how the CPU usage was steadily increasing after I upgraded (even across restarts of the docker container)

2024-12-04-140348_614x293_scrot

Fixes excessively high CPU and RAM usage on idling instance
@pcouy
Copy link
Author

pcouy commented Dec 4, 2024

After a longer test, the CPU and RAM load are still significantly higher than they were before the update.

Seems like restoring changes that were introduced in #13 helps as well, but still nowhere clause the <1% CPU usage it was at before the update

Even though it is much less noticeable, the plausible container itself has doubled its CPU usage since the update.

Checking clickhouse's debug log shows that plausible is frequently performing queries in the background, even when there are no visitors to any of my websites

@pcouy
Copy link
Author

pcouy commented Dec 4, 2024

I let it run for a while, and I confirm the tweaks from #13 helped decrease the CPU usage further

2024-12-04-170826_609x293_scrot

For reference, here's a graph showing the last 12 hours of CPU use, with numbers before updating, and after updating + applying the tweaks in this pull request

plausible_update_before_after

Also includes a bunch of smaller optimizations
@pcouy pcouy marked this pull request as ready for review December 4, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant