-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
Give pantsd more RAM by default. #18389
Conversation
1GiB turns out to be too low for even medium-sized repos. Several users have remarked on this on Slack, and we've noticed it in the Toolchain repo. Most developer laptops have plenty of RAM. So 4GiB seems like a decent default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this terrifying. Do we have any handles on this at all? Something like lines of code times X -> Y ram?
We don't have a handle on this, as far as I know, and I imagine it will be some function of number of source files (rather than LoC) and which plugins you've enabled. That said, this is a maximum, so you'll only actually use that much RAM if you need it, in which case you probably want to use it? |
Yes, the user wants it if they need it. The issue is we put them in that situation and the situation is seemingly ridiculous on its face. That's my concern, that we have no handle on this. |
well yea.. that's an absurd amount of memory.. 🤔 |
Yeah, I have no idea what takes up all this memory. I assume it's mostly memoized rule invocations, but we'd have to measure to find out and potentially reduce. Maybe @stuhood has some intuitions here. |
Does the daemon release memory after usage, or only when it's killed/restarted? For example, I have a couple daemon's sitting around, each at 500MB. I'm sure the system would kill/purge/page them if it needed to recoup, but does the daemon do that on its own? My policy during dev is, use all my memory while you're building/whatever (looking at you Android/Gradle), but then release most of it back. |
I believe only when it's killed. |
As mentioned in the thread where this was last discussed: if users are seeing abnormal amounts of memory used, opening tickets with |
1GiB turns out to be too low for even medium-sized repos. Several users have remarked on this on Slack (search for "pantsd_max_memory_usage" there to see those), and we've noticed it in the Toolchain repo.
Most developer laptops have plenty of RAM. So 4GiB seems like a decent default.