Skip to content

Unison uses more memory than some people wish #1068

@gdt

Description

@gdt

Unison uses memory when syncing, essentially reading the archive state. This memory can be larger than desired, e.g. for people with 1GB of RAM and 1M files. We receive "I tried to sync X files and it ran out." reports, but almost always the detailed followup necessary to make progress does not happen.

As always, if you want help (rather than intending to participate in development by providing careful, detailed measurements and following up when asked), please use the unison-users mailinglist.

This is a placeholder issue, intended to remain open, and locked to avoid comments. If you are experience running out of memory, please read carefully the wiki page about reporting bugs, the wiki page linked below, and additionally figure out either how big a sync you can fit in some amount of memory, or how much memory you need for that amount. If you need about 750 bytes of RAM per file, that's not a bug and should not be reported. If you can provoke a situation where significantly more memory per file is needed, carefully document that in an issue if you are prepared to respond to questions, run more tests, and engage with debugging. Please expect that if you do not provide details, and do not follow up when requested, your issue will be closed. Reports that you tried to do something, with unknown resource levels, without careful experiments, are not at all helpful and will be closed as a dup of this issue.

Note that this is different from #378 which is about showing the user a stack trace. This issue is about using too much memory, but it's vague until someone can say "unison needs 1534 bytes per synced file, which doesn't make sense" from testing and finding limits at multiple sizes. Update 2025-01: We believe the number is about 750 bytes per file, on a 64-bit CPU, and that this number is ok.

Please discuss details on unison-hackers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussway forward is unclear; needs discussion of approach to take and whywontfixmaintainers choose not to work on this, but PR would still be considered

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions