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

Improve performance by increase recv size on service socket #4122

Merged
merged 5 commits into from Aug 18, 2022

Conversation

raubitsj
Copy link
Member

@raubitsj raubitsj commented Aug 17, 2022

Description

We were reading in very small chunks... This change prefers reading in 128kB size chunks.

Testing

See #4119 for testing notes

@raubitsj raubitsj changed the title merge Improve performance by increase recv size on service socket Aug 17, 2022
@raubitsj raubitsj marked this pull request as ready for review August 17, 2022 16:27
@raubitsj raubitsj requested review from a team and vanpelt August 17, 2022 16:27
Copy link
Contributor

@vanpelt vanpelt left a comment

Choose a reason for hiding this comment

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

😎

Copy link
Contributor

@vanpelt vanpelt left a comment

Choose a reason for hiding this comment

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

Curious what the rational for the change is. Is the only downside for larger buffer sizes more memory consumption or am I missing something?

@raubitsj
Copy link
Member Author

raubitsj commented Aug 18, 2022

Curious what the rational for the change is. Is the only downside for larger buffer sizes more memory consumption or am I missing something?

I did some micro benchmarks and i saw no improvement so i was going to go a bit more conservative. I think larger should be better, but marginally now that the underlying buffer management was fixed in the sender and receiver.
After some more tests I might bump it up to 128k, but that is arbitrary also.

@codecov
Copy link

codecov bot commented Aug 18, 2022

Codecov Report

Merging #4122 (2640b77) into master (efc85b7) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4122      +/-   ##
==========================================
+ Coverage   82.72%   82.76%   +0.04%     
==========================================
  Files         256      256              
  Lines       32568    32576       +8     
==========================================
+ Hits        26941    26961      +20     
+ Misses       5627     5615      -12     
Flag Coverage Δ
functest 55.07% <100.00%> (+0.02%) ⬆️
unittest 73.56% <88.88%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
wandb/sdk/lib/sock_client.py 92.59% <100.00%> (+0.32%) ⬆️
wandb/agents/pyagent.py 70.91% <0.00%> (-1.60%) ⬇️
wandb/sdk/interface/artifacts.py 78.89% <0.00%> (-0.35%) ⬇️
wandb/sdk/lib/git.py 79.01% <0.00%> (ø)
wandb/cli/cli.py 69.01% <0.00%> (+0.09%) ⬆️
wandb/sdk/wandb_run.py 91.18% <0.00%> (+0.24%) ⬆️
wandb/sdk/wandb_setup.py 89.00% <0.00%> (+0.50%) ⬆️
wandb/sdk/internal/internal_api.py 87.01% <0.00%> (+0.51%) ⬆️
wandb/integration/tensorboard/monkeypatch.py 92.59% <0.00%> (+2.46%) ⬆️
wandb/sdk/internal/meta.py 90.79% <0.00%> (+3.06%) ⬆️

@raubitsj raubitsj merged commit ab41027 into master Aug 18, 2022
@raubitsj raubitsj deleted the perf-increase-recv-size branch August 18, 2022 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants