Reduce MMseqs2 split-memory-limit to prevent OOM kills#104
Conversation
The --split-memory-limit flag only controls prefilter database splitting. Actual peak usage is ~125% of this value, and clustering/alignment steps use additional uncontrolled memory on top. At 80%, total usage could reach 100%+ of container RAM, causing OOM kills. 60% leaves sufficient headroom.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses Out-Of-Memory (OOM) issues encountered during MMseqs2 execution by strategically lowering the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request reduces the MMseqs2 --split-memory-limit from 80% to 60% of system RAM to prevent out-of-memory errors. The change also introduces a minimum memory limit of 1GB and switches from ceil to int (truncation) for the calculation, which are sensible improvements. The code change is correct and aligns with the goal. I have one minor suggestion to improve code readability.
| // --split-memory-limit controls only the prefilter database splitting; | ||
| // actual peak usage is ~125% of this value, plus uncontrolled memory | ||
| // from clustering and alignment steps; 60% leaves headroom for all of that | ||
| memLimit := "{int(max(system.ram.gb*60/100,1))}" + "G" |
There was a problem hiding this comment.
For better readability and consistency with the previous code that used 0.8, it's clearer to use the floating-point literal 0.6 instead of the expression 60/100. While Tengo's division should handle this correctly, using 0.6 avoids any potential confusion about integer division for future maintainers.
memLimit := "{int(max(system.ram.gb * 0.6, 1))}" + "G"
Summary
--split-memory-limitfrom 80% to 60% of system RAMTest plan