Description
The projection operator allocates extra memory to minimize resizing maps. This is causing excessive memory usage in some situations.
Per Sitaram Vemulapalli:
A customer reported high memory usage of query node. They use * and One of the place is below.
Are we need to add +32 for ‘*’ also? Is there way we can calculate the right number form projection?
Looks like n is 1 and 8.23GB around 30 * 297MB
https://github.com/couchbase/query/blob/master/execution/project_initial.go#L100
297.01MB 297.01MB 97:sv := value.NewScopeValue(make(map[string]interface{}, n), item)
|
. 111MB 98:pv := value.NewAnnotatedValue(sv)
|
. . 99:pv.SetAnnotations(item)
|
. . 100:
|
8.23GB 8.23GB 101:p := value.NewValue(make(map[string]interface{}, n+32))
|
Attachments
Issue Links
- blocks
-
MB-19612 4.5.1 Minor Release
-
- Closed
-
For Gerrit Dashboard: MB-20392 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
66424,2 | MB-20392. Do not over-allocate for star terms unless they are present. | master | query | Status: MERGED | +2 | +1 |
66426,2 | MB-20392. Do not over-allocate for star terms unless they are present. | watson | query | Status: MERGED | +2 | +1 |