You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/05/01 19:59:00 UTC

[jira] [Work logged] (BEAM-9822) SpannerIO: Reduce memory usage - especially when streaming

     [ https://issues.apache.org/jira/browse/BEAM-9822?focusedWorklogId=429636&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-429636 ]

ASF GitHub Bot logged work on BEAM-9822:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/May/20 19:58
            Start Date: 01/May/20 19:58
    Worklog Time Spent: 10m 
      Work Description: allenpradeep commented on a change in pull request #11532:
URL: https://github.com/apache/beam/pull/11532#discussion_r418711729



##########
File path: sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerIO.java
##########
@@ -1066,7 +1079,12 @@ public SpannerWriteResult expand(PCollection<MutationGroup> input) {
                               spec.getBatchSizeBytes(),
                               spec.getMaxNumMutations(),
                               spec.getMaxNumRows(),
-                              spec.getGroupingFactor(),
+                              // Do not group on streaming unless explicitly set.
+                              spec.getGroupingFactor()
+                                  .orElse(
+                                      input.isBounded() == IsBounded.BOUNDED

Review comment:
       I was wondering if this condition needs to be based on the input passed to this stage or based on some parameter from the user?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 429636)
    Time Spent: 40m  (was: 0.5h)

> SpannerIO: Reduce memory usage - especially when streaming
> ----------------------------------------------------------
>
>                 Key: BEAM-9822
>                 URL: https://issues.apache.org/jira/browse/BEAM-9822
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-gcp
>    Affects Versions: 2.20.0
>            Reporter: Niel Markwick
>            Priority: Major
>              Labels: google-cloud-spanner
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> SpannerIO uses a lot of memory. 
> In Streaming Dataflow, it uses many times as much (because dataflow creates many worker threads)
> Lower the memory use, and change default parameters during streaming to use smaller batches and disable grouping.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)