Repository navigation
Conversation
e7b471b to
d2bbe0c
Compare
|
In principle this change seems fine. If we go a bit deeper it seems like there is some policy difference in how we compute sizeof for tuples and dicts, which is a bit strange. The same argument for not wanting to recurse down into dicts for performance reasons also holds for tuples. For example, bag computations can pass around large tuples for which we would not want to call sizeof on every element. Short term I'm happy to merge this (assuming that there are not major side effects) but long-term we might want to change our sizeof computation to be more robust to large collections. I wonder if it would make sense to randomly sample. For example the logic might be something like the following def sizeof(collection):
if len(collection) < 10:
return sys.getsizeof(collection) + sum(map(sizeof, collection))
else:
return sys.getsizeof(collection) * len(collection) / 10 * random.sample(collection, 10) |
|
Also, thank you for finding and helping to resolve this. I wasn't aware that we weren't capturing the size information here. I agree that this may end up being important for efficient shuffling. |
|
Agreed that this is not an optimal solution. I opened #6154 to discuss this issue in particular with a proposal for the implementation and some benchmarks. Regarding this change, what I could observe so far is that my computations behave much more stable and spill to disk seems to work much better. I don't have any concrete measurements, yet |
|
I'm glad to hear it
…On Thu, Apr 30, 2020 at 6:10 AM Florian Jetter ***@***.***> wrote:
Agreed that this is not an optimal solution. I opened #6154
<#6154> to discuss this issue in
particular with a proposal for the implementation and some benchmarks.
Regarding this change, what I could observe so far is that my computations
behave much more stable and spill to disk seems to work much better. I
don't have any concrete measurements, yet
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6149 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACKZTBO5ENOWIIPGWG2Y2LRPF2FFANCNFSM4MS6QKIA>
.
|
I'm currently investigating heavy memory usage of a shuffle (similar, if not identical to #2456) and realized that we do not have any sizing information about the intermediate stages when shuffling.
From my understanding this is mostly because we move the shuffle_group results around in dicts and we do not properly estimate dict sizes due to potentially severe performance implications. As a practical fix these results could be passed as tuples since the dict keys were integer indices anyhow.
The size estimation would not only be useful for debugging but I would also expect the distributed scheduler to assign tasks much smarter to the workers with proper size estimates. Especially for a data intensive operation like a shuffle I would expect this effect to be strong. I'll follow up with some measurements but wanted to pick your brains before I step too deep into the rabbit hole.