-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
MSQ: Consider PARTITION_STATS_MAX_BYTES in WorkerMemoryParameters. #13274
Conversation
This consideration is important, because otherwise we can run out of memory due to large statistics-tracking objects.
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.
Minor comment. LGTM otherwise.
|
||
// Need to subtract memoryForStatisticsTracking off the top, since this is reserved for statistics collection. | ||
final long memoryForStatisticsTracking = (long) numWorkersInJvm * StageDefinition.PARTITION_STATS_MAX_BYTES; | ||
final long memoryForBundles = (long) (maxMemoryInJvm * USABLE_MEMORY_FRACTION - memoryForStatisticsTracking); |
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.
Should we add a > 0 check here? That way the user knows that he needs to give more memory to the task
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.
There's a reasonable error that occurs later on; see WorkerMemoryParametersTest.
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.
LGTM !! +1 after CICD
@@ -216,6 +219,10 @@ void start() | |||
*/ | |||
void finish() | |||
{ | |||
if (resultKeyStatisticsCollector != null) { | |||
resultKeyStatisticsCollector.clear(); |
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.
Nice catch !!
) | ||
{ | ||
final long usableMemory = (long) (maxMemoryInJvm * USABLE_MEMORY_FRACTION); | ||
final long memoryForWorkers = (long) Math.min( |
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.
Nice. This is really cool and will go a long way in fixing the memory issues of sketches.
We might have to update this line |
Pushed an update fixing merge conflicts, updating |
🚀 |
This consideration is important, because otherwise we can run out of memory due to large statistics-tracking objects.