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

Add minimum or recommended hardware requirements. #67

Closed
MaybeThisIsRu opened this issue Mar 30, 2021 · 8 comments
Closed

Add minimum or recommended hardware requirements. #67

MaybeThisIsRu opened this issue Mar 30, 2021 · 8 comments

Comments

@MaybeThisIsRu
Copy link
Contributor

MaybeThisIsRu commented Mar 30, 2021

The self-hosting docs currently do not list recommended (or minimum) hardware requirements in terms of RAM or vCPUs/CPU. This would be a nice addition for people like me who are too lazy to create and delete VPS servers while testing for the right amount of resources.

If anyone else is self-hosting Plausible, maybe you could chime in please? 🙂

@MaybeThisIsRu MaybeThisIsRu changed the title Add minimum or recommended hardware requirements Add minimum or recommended hardware requirements. Mar 30, 2021
@ukutaht
Copy link
Contributor

ukutaht commented Mar 31, 2021

Clickhouse reccommends at least 32gb of memory. It works with less memory but it's not designed for it.

For reference, I have an instance running since October with 1vCPU and 1GB RAM and it's chugging along just fine. It's possible that it won't work forever, at some point Clickhouse might compress data into 'parts' that are bigger than 1GB and they won't fit into memory anymore. At that point you would need to give it more memory. This just happened on our production db server actually because we were under the reccommended memory limit.

We are thinking about ways to make Plausible more streamlined for small instance types. It's likely the next release in the summer will be less resource hungry,

@MaybeThisIsRu
Copy link
Contributor Author

MaybeThisIsRu commented Apr 2, 2021

Clickhouse reccommends at least 32gb of memory.

Wow! That's... a lot.

For reference, I have an instance running since October with 1vCPU and 1GB RAM and it's chugging along just fine. It's possible that it won't work forever, at some point Clickhouse might compress data into 'parts' that are bigger than 1GB and they won't fit into memory anymore. At that point you would need to give it more memory. This just happened on our production db server actually because we were under the reccommended memory limit.

Thanks for this info - at least we have a starting point to reference. 🙂

We are thinking about ways to make Plausible more streamlined for small instance types. It's likely the next release in the summer will be less resource hungry,

That would be amazing! 👍🏼

@binaryfire
Copy link

@ukutaht +1 on this, thank you! Making it less resource hungry for smaller VPSs would be great

@ukutaht
Copy link
Contributor

ukutaht commented May 3, 2021

One idea is to store stats in postgres since it has to be installed for user data anyways. It has extensions like timescale which should make time-series data fairly efficient to work with.

I will have to evaluate if we can replicate all features in postgres and also how much extra work it will be to manage two database adapters going forward.

@binaryfire
Copy link

binaryfire commented May 3, 2021

@ukutaht TimescaleDB would be an excellent choice. At my work, we've just switch our Zabbix instance from MySQL to Postgres/Timescale and it's performing very well. Scraping telemetry from over 100 nodes on a pretty small VPS.

Another thing that Postgres would bring to the table is easier deletion / updating of data. So implementing a retention/auto culling system for old data would be simple. For example something like Matomo's: https://matomo.org/faq/troubleshooting/faq_42/

I think this will be really important in the long run. It's still early days for Plausible but once data starts building up, we're going to need a way of keeping fewer aggregated data points for stale data. I imagine that would save you guys a bundle in storage costs for you hosted platform too :)

And yeah, like you said, you're already running Postgres for user data so it'd be one less service to run.

PS. Not sure if this would be of use? It's MySQL, but could still help get things started: https://github.com/oddconcepts/plausible-mysql

@IanCal
Copy link

IanCal commented Feb 10, 2022

Is there a source for the 32GB CH requirement? Clickhouse themselves recommend a minimum of 4, but it can run with less. https://clickhouse.com/docs/en/operations/requirements/

@ukutaht
Copy link
Contributor

ukutaht commented Feb 10, 2022

The 32gb limit was on their docs page when I made the previous comment about it. The Clickhouse team has done a lot of work on it recently. So if you pick a newer build it will handle low memory environments much better.

4GB sounds right

@metmarkosaric
Copy link
Contributor

closing this as i've added a note about minimal hardware requirements now. 4gb as mentioned above and we recommend you test and experiment with it on your own instance as needs will vary depending on how large your site is

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

No branches or pull requests

5 participants