fix physical memory detection on OSX#15405
Merged
vogievetsky merged 2 commits intoapache:masterfrom Nov 21, 2023
Merged
Conversation
abhishekagarwal87
approved these changes
Nov 21, 2023
Contributor
abhishekagarwal87
left a comment
There was a problem hiding this comment.
LGTM. I couldn't find any documentation on memsize_usable. do you know of any?
findingrish
reviewed
Nov 21, 2023
|
|
||
| if physical_memory is None: | ||
| raise ValueError('Please specify memory argument') | ||
| raise ValueError('Could not automatically determine memory size. Please explitly specify the memory argument as --memory=<integer_value><m/g>') |
Contributor
There was a problem hiding this comment.
nit: spelling explicitly
Contributor
Author
|
No idea what |
vogievetsky
added a commit
to vogievetsky/druid
that referenced
this pull request
Nov 21, 2023
* fix physical memory detection on OSX * typo
vogievetsky
added a commit
that referenced
this pull request
Nov 21, 2023
yashdeep97
pushed a commit
to yashdeep97/druid
that referenced
this pull request
Dec 1, 2023
* fix physical memory detection on OSX * typo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I just upgraded my Mac to MacOS Sonoma and I am unable to start Druid with
bin/start-druidThis is due to the fact that the starter script can not detect the physical memory on my machine.
The physical memory is detected by doing
sysctl -a | grep hw.memsizewhich for me now returns 2 values:I am guessing that "hw.memsize_usable" was added in MacOS Sonoma as previously it worked.
The script then does a
split(':')which for me produces['hw.memsize', ' 68719476736\nhw.memsize_usable', ' 68719476736\n']and the
[1]index can not be parsed as a number.I am fixing this by instead greping for
sysctl -a | grep hw.memsize:the added:means that it should only match one line and is generally more robust.I also rewrote the error message to be better, the original
Please specify memory argumentwas accurate but confused me.