Giter VIP home page Giter VIP logo

Comments (5)

arp242 avatar arp242 commented on September 27, 2024 2

This is in the 2.5 release.

from goatcounter.

arp242 avatar arp242 commented on September 27, 2024

This sounds about right; you can usually vacuum things to reclaim some space, but probably not too much.

This is the trade-off you get with SQL: the upshot is that it's easy to run and "standard", and that people don't need to spend a lot of time managing specialized databases, but the downside is that it's not the most optimum format, and you end up duplicating some things, which results in more disk space being used. Usually it's not a problem, although at scale it does add up (goatcounter.com is approaching 250G).

That said, I did spend some time optimizing all of this, and it reduced the database for stats.arp242.net by about half (the exact savings will depend on a few factors); stats.arp242.net is already running well on that, I just need to migrate goatcounter.com which I haven't gotten around to.

from goatcounter.

eliben avatar eliben commented on September 27, 2024

Thanks for confirming. The numbers I report are after vacuum-ing.

Are your optimizations in the source code of GoatCounter or somewhere else? Would this need a database migration to preserve all historic stats?

from goatcounter.

arp242 avatar arp242 commented on September 27, 2024

It's mostly just an optimisation of the database schema to avoid duplication – you do need to run a fairly expensive migration which rewrites quite a bit, but of course all data will be retained.

It's this branch: https://github.com/arp242/goatcounter/tree/refs – see the latest commit on that (I make NO guarantees on the stability of that branch, I don't recommend running it).

from goatcounter.

eliben avatar eliben commented on September 27, 2024

That's great to know. I'll keep an eye on upcoming releases to see when this change makes it. It's not urgent right now, but would be nice to keep the DB size a bit smaller if possible. The ~half reduction you mention sounds very good.

from goatcounter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.