Skip to content

Investigate deduplicating shared data that's likely common between different platform versions of the same product #181

Description

@boggydigital

If vangogh is setup to download all operating systems versions of products - there's likely a significant opportunity to save space by deduplicating common game data, that's likely the same or mostly the same between different operating system versions.

Input data to estimating the opportunity:

  • We'll use 5Tb of products to simplify calculations
  • 5Tb of games is about 1000 products for all available operating systems and English (source)
  • Total GOG Windows products count = 13765
  • Total GOG macOS products count = 3792 = 27.5% of Windows products have macOS version
  • Total GOG Linux products count = 2901 = 21% of Windows products have Linux version

Assumptions:

  • On average users would have a similar distribution of operating system versions
  • Each operating system version is about the same size (e.g. if Windows version is 1Gb, macOS version is about 1Gb as well)
  • Through deduplication we'd be able to reduce disk usage by 50-80% for specific operating system version of that game (e.g. if Windows and macOS versions are both 1Gb, we'll reduce total usage from 2Gb to 1.5Gb by reducing macOS version usage to 0.5Gb with 50% savings, or to 1.2Tb by reducing Linux version usage to 0.2Gb with 80% savings)

Estimate of savings:

  • For the distribution above we're looking at about 3.4Gb of Windows product versions or 1.6Gb of macOS and Linux version combined
  • At 50% disk usage reduction for macOS, Linux versions we'd be able to save ~800Gb or 16% of 5Tb
  • At 80% disk usage reduction for macOS, Linux version we'd be able to save ~1.3Tb or 26% of 5Tb

Using this back-of-the-napkin model it seems that it's worth pursuing for significant savings of 16-26% of the current usage.

Next steps to achieve that (some concrete, some open questions):

  • Validate high level estimates with a real library data
  • Unpack multi-platform games to validate the assumption that data files are indeed common between different OS versions (e.g. 1118951034:Brotato, 1308320804:Hollow Knight, 1423049311:Cyberpunk 2077), validate per-version savings estimates
  • Investigate if we can operate on installers (unlikely) or need to unpack installers or use Galaxy depots
  • Revisit https://github.com/arelate/theo/wiki/Technical-decisions to check if I'm missing something in the current thought process
  • Investigate the approach of splitting (unpacked, depot) operating system versions to store shared data and operating system specific addition
  • Brainstorm refactoring downloads to allow downloading data for a given operating system from 1 location (e.g. common data and operating system specific payload files in one list)
  • Investigate unpacking all versions on a server. Windows version is easy with WINE (or innoextract), what about macOS pkg files? Or dmg files for older games?
  • Investigate global deduping opportunities (not sure that'll be worth pursuing yet, need to investigate)
  • As Steam and EGS products are added to vangogh, extend the solutions to those versions as well to save space for different operating system versions of the same product
  • Investigate incremental updates for products stored that way (would depots be easier to maintain than a custom solution?)
  • Investigate theo integration opportunities for this approach (downloads, updates)

Thinking this through - this might be a better way to store product files overall that would lead to improvements in data transmission (assuming I'll use depots for that), storage and overall experience (e.g. incremental updates with theo). IIRC the biggest potential negative aspect I captured in https://github.com/arelate/theo/wiki/Technical-decisions earlier was missing the installers, but while installers would indeed be lost - downloading small amount of files to install locally would still be possible without any client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions