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

Unison uses more memory than some people wish #1068

Open
gdt opened this issue Oct 21, 2024 · 1 comment
Open

Unison uses more memory than some people wish #1068

gdt opened this issue Oct 21, 2024 · 1 comment
Labels
discuss way forward is unclear; needs discussion of approach to take and why wontfix maintainers choose not to work on this, but PR would still be considered

Comments

@gdt
Copy link
Collaborator

gdt commented Oct 21, 2024

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.

@gdt gdt added defect unison fails to meet its specification (but doesn't crash; see also "crash") impact-medium medium importance effort-high issue is likely to require >20h of effort, perhaps much more labels Oct 21, 2024
Repository owner locked as too heated and limited conversation to collaborators Oct 21, 2024
@gdt
Copy link
Collaborator Author

gdt commented Jan 5, 2025

The Memory Usage wiki page collects information about memory usage.

@gdt gdt changed the title Unison sometimes uses more memory than it probably should Unison uses more memory than some people wish Jan 5, 2025
@gdt gdt added wontfix maintainers choose not to work on this, but PR would still be considered discuss way forward is unclear; needs discussion of approach to take and why and removed defect unison fails to meet its specification (but doesn't crash; see also "crash") impact-medium medium importance effort-high issue is likely to require >20h of effort, perhaps much more labels Jan 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discuss way forward is unclear; needs discussion of approach to take and why wontfix maintainers choose not to work on this, but PR would still be considered
Projects
None yet
Development

No branches or pull requests

1 participant