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

chore: update multiproc to use explicit ports for connection #127

Merged
merged 12 commits into from
Dec 22, 2023

Conversation

kohlisid
Copy link
Contributor

Kindly explain what this PR does.
Fixes #111

Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
Copy link

codecov bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4a68e92) 95.21% compared to head (d60a5f4) 95.21%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #127   +/-   ##
=======================================
  Coverage   95.21%   95.21%           
=======================================
  Files          33       33           
  Lines        1359     1359           
  Branches       89       89           
=======================================
  Hits         1294     1294           
  Misses         36       36           
  Partials       29       29           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
@kohlisid kohlisid marked this pull request as ready for review December 21, 2023 16:08
Signed-off-by: Sidhant Kohli <[email protected]>
Copy link
Member

@whynowy whynowy 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
Member

@ab93 ab93 left a comment

Choose a reason for hiding this comment

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

Minor comments

@@ -87,8 +85,9 @@ def __init__(
("grpc.so_reuseport", 1),
("grpc.so_reuseaddr", 1),
]
self._sock_path = sock_path
self._process_count = int(os.getenv("NUM_CPU_MULTIPROC") or os.cpu_count())
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
self._process_count = int(os.getenv("NUM_CPU_MULTIPROC") or os.cpu_count())
self._process_count = int(os.getenv("NUM_CPU_MULTIPROC")) or (2 * os.cpu_count())

default can be twice the cpu count right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The default should be os.cpu_count() and the upper limit for the user defined can be 2*cpu_count

pynumaflow/mapper/multiproc_server.py Outdated Show resolved Hide resolved
pynumaflow/mapper/multiproc_server.py Outdated Show resolved Hide resolved
pynumaflow/mapper/multiproc_server.py Outdated Show resolved Hide resolved
pynumaflow/mapper/multiproc_server.py Outdated Show resolved Hide resolved
Signed-off-by: Sidhant Kohli <[email protected]>
@kohlisid
Copy link
Contributor Author

Same change for sourcetransformer/multiproc_server.py?

Missed uploading those! Have added in this commit

@kohlisid kohlisid requested review from ab93 and whynowy December 21, 2023 20:02
@kohlisid kohlisid merged commit a6957c2 into numaproj:main Dec 22, 2023
9 checks passed
@kohlisid kohlisid deleted the multiproc-fix branch February 28, 2024 13:35
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.

Multiprocess server does not load-balance correctly
3 participants