Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-10200] Respect profile_memory option and add memory profiler to… #12562

Merged
merged 4 commits into from Sep 30, 2020

Conversation

y1chi
Copy link
Contributor

@y1chi y1chi commented Aug 13, 2020

… sdk worker

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

Post-Commit Tests Status (on master branch)

Lang SDK Dataflow Flink Samza Spark Twister2
Go Build Status --- Build Status --- Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status --- Build Status --- Build Status ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status
Build Status
Build Status
Build Status Build Status
Portable --- Build Status --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels

See CI.md for more information about GitHub Actions CI.

@y1chi
Copy link
Contributor Author

y1chi commented Aug 13, 2020

R: @angoenka

@y1chi
Copy link
Contributor Author

y1chi commented Aug 13, 2020

retest this please

@y1chi
Copy link
Contributor Author

y1chi commented Aug 14, 2020

Run Portable_Python PreCommit

Copy link
Contributor

@angoenka angoenka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also change the behavior from periodic heap dump to i think on demand heap dump.
Shall we also summarize how it should be used?

from guppy import hpy
self.hpy = hpy()
self.hpy.setrelheap()
except ImportError:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's log the import failure

@y1chi
Copy link
Contributor Author

y1chi commented Sep 21, 2020

This also change the behavior from periodic heap dump to i think on demand heap dump.
Shall we also summarize how it should be used?

Do you mean the deletion of MemoryReporter? I don't think it is used anywhere but we can also keep it if it is useful for users.

@codecov
Copy link

codecov bot commented Sep 21, 2020

Codecov Report

Merging #12562 into master will increase coverage by 47.83%.
The diff coverage is 6.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #12562       +/-   ##
===========================================
+ Coverage   34.47%   82.30%   +47.83%     
===========================================
  Files         684      455      -229     
  Lines       81483    54583    -26900     
  Branches     9180        0     -9180     
===========================================
+ Hits        28090    44927    +16837     
+ Misses      52972     9656    -43316     
+ Partials      421        0      -421     
Impacted Files Coverage Δ
sdks/python/apache_beam/utils/profiler.py 28.12% <6.00%> (ø)
io/gcp/dicomclient.py
runners/job/__init__.py
dataframe/__init__.py
...pets/transforms/elementwise/withtimestamps_test.py
runners/portability/flink_runner.py
examples/complete/tfidf_test.py
runners/pipeline_context.py
runners/worker/statecache.py
coders/observable_test.py
... and 1130 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e44c3c2...b29fdcc. Read the comment docs.

Copy link
Contributor

@angoenka angoenka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If MemoryProfiler is not used then we don't have to keep it around.
LGTM

@angoenka
Copy link
Contributor

Can you please take a look at failing tests.
We can merge it after they are healthy.

@y1chi
Copy link
Contributor Author

y1chi commented Sep 24, 2020

retest this please

@y1chi
Copy link
Contributor Author

y1chi commented Sep 30, 2020

@angoenka I think this PR can be merged

@angoenka angoenka merged commit e6b3cf1 into apache:master Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants