Skip to content

Reduce number of Gax related threads, likely by providing common executor to GAX clients #21368

Description

@damccorm

When looking at thread stacks for a pipeline reading pubsub and writing to BQ using the WriteApi there were 3600 Gax- prefixed threads.

The # of threads an possibly performance could be improved by finding where these came from and using a shared executor.

Imported from Jira BEAM-13826. Original Jira may contain additional context.
Reported by: scwhittle.

Activity

  1. chamikaramj commented on Aug 23, 2022

    @chamikaramj
    Contributor

    John, assigning to you to prioritize since this could be hit by users when using various I/O connectors (for example, BigQueryIO sink with the STORAGE_WRITE_API mode).

  2. TheNeuralBit commented on Aug 23, 2022

    @TheNeuralBit
    Member

    IIUC the appropriate fix is to adjust client libraries used in various IOs to use a shared channel (@lukecwik can advise).

  3. reuvenlax commented on Aug 23, 2022

    @reuvenlax
    Contributor

    I thought that the main bug had already been fixed.

  4. johnjcasey commented on Aug 24, 2022

    @johnjcasey
    Contributor

    Is there any documentation on where we use GAX, or a pointer to a design pattern for this?

  5. chamikaramj commented on Aug 24, 2022

    @chamikaramj
    Contributor

    @reuvenlax do you have a link to the fix ?

    also ccing @scwhittle who filed the original issue.

  6. TheNeuralBit commented on Aug 24, 2022

    @TheNeuralBit
    Member

    @reuvenlax maybe you're thinking of #16619 which fixed a different thread explosion in RetryManager?

  7. TheNeuralBit commented on Aug 24, 2022

    @TheNeuralBit
    Member

    Is there any documentation on where we use GAX, or a pointer to a design pattern for this?

    I'm not sure about documentation. My understanding from offline discussion with @lukecwik, is that gax-java is used by grpc-java which is used by Google client libraries used by various GCP IOs. The client libraries generally have ways to specify an executor that would allow us to specify a shared one. See here for an example in the Spanner client.

  8. 52 remaining items

  9. johnjcasey commented on Oct 26, 2022

    @johnjcasey
    Contributor

    looks like the roll forward was partial. @chamikaramj here is the cherry pick #23854

  10. removed this from the 2.43.0 Release milestone on Oct 26, 2022
  11. chamikaramj commented on Oct 26, 2022

    @chamikaramj
    Contributor

    Thanks. Merged the cherry-pick.

    Removing this from the 2.43.0 milestone.

  12. reuvenlax commented on Oct 26, 2022

    @reuvenlax
    Contributor
  13. kennknowles commented on Dec 7, 2022

    @kennknowles
    Member

    Any update on this? Given that it appears to be not data loss or total loss of functionality I am downgrading to P2.

  14. added and removed on Dec 7, 2022
  15. johnjcasey commented on Dec 9, 2022

    @johnjcasey
    Contributor

    agreed. The underlying gax library has been updated, so when that is released we can re-implement the fix

  16. added this to the 2.45.0 Release milestone on Jan 9, 2023
  17. added 2 commits that reference this issue on Jan 9, 2023
  18. added a commit that references this issue on Jan 30, 2023
  19. amiyalenka commented on Feb 6, 2023

    @amiyalenka

    Is this GAX Thread issue been resolved? If yes, which version having this fix?

  20. lukecwik commented on Feb 6, 2023

    @lukecwik
    Member

    2.45.0 as per milestone marking on issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions