Github user iyerr3 commented on the issue:
https://github.com/apache/incubator-madlib/pull/120
@ivannovick Here's an example of how much memory can be saved. The numbers
below are for a tree built for the [Poker hand
dataset](https://archive.ics.uci.edu/ml/datasets/Poker+Hand), mostly using
default parameters and setting `min_splits` and `min_bucket` to `1` to build a
deep tree.
Currently, memory is allocated for the maximum possible nodes, but only a
fraction of that is actually used (indicated in `% usage` column). As expected,
this `%` decreases as depth increases, since some nodes stop branching further.
With this work, memory will be allocated at each depth only for the fraction of
nodes that are actually used.
Note, this is for a specific problem/data and results will vary for other
datasets. In general, problems that are so big that they hit the 1 GB agg state
limit within a couple of tree levels will not benefit for this.
| depth | Nodes used | Max nodes (2^k - 1) | % usage |
|-------|-------------|---------------------|---------|
| 2 | 3 | 3 | 100 |
| 3 | 7 | 7 | 100 |
| 4 | 11 | 15 | 73.3 |
| 5 | 17 | 31 | 54.8 |
| 6 | 25 | 63 | 39.7 |
| 7 | 41 | 127 | 32.2 |
| 8 | 73 | 255 | 28.6 |
| 9 | 135 | 511 | 26.4 |
| 10 | 251 | 1023 | 24.5 |
| 11 | 447 | 2047 | 21.8 |
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---