plausible / community-edition

Example Docker Compose setup for hosting Plausible Community Edition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slow performance with filters and old data

altendorfme opened this issue · comments

Hello,

I have a 4xCPU server with 8GB RAM at Digital Ocean, the site has 20-40 million pageviews per month and when I do queries with filters, for example page > contains > /url/ and 3 months ago, the CPU usage goes at 100% on clickhouse, but it stays like that for 20 seconds and crashes.

But apparently it generates some timeout and the result is not shown on the screen.

Is there any configuration for clickhouse to force the CPU usage for a longer time, until the required query finishes?

In the env, I already configured it as:

CLICKHOUSE_FLUSH_INTERVAL_MS=5000
CLICKHOUSE_MAX_BUFFER_SIZE=200000

But it didn't have much effect.

Putting a dedicated instance for the clickhouse could help?
What would be the CPU recommendation?

👋 @altendorfme

CLICKHOUSE_FLUSH_INTERVAL_MS andCLICKHOUSE_MAX_BUFFER_SIZE configure Plausible's insert buffer, they won't affect how ClickHouse uses CPU.

For ClickHouse-related question it might be better to ask their communities, e.g. https://t.me/clickhouse_en or https://clickhousedb.slack.com