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

fix(multiprocessing): Increase default block sizes #319

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
TResult = TypeVar("TResult")
TBatchValue = TypeVar("TBatchValue")

DEFAULT_INPUT_BLOCK_SIZE = 16 * 1024 * 1024
DEFAULT_OUTPUT_BLOCK_SIZE = 16 * 1024 * 1024
DEFAULT_INPUT_BLOCK_SIZE = 25 * 1024 * 1024
DEFAULT_OUTPUT_BLOCK_SIZE = 25 * 1024 * 1024

LOG_THRESHOLD_TIME = 20 # In seconds

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from arroyo.dlq import InvalidMessage
from arroyo.processing.strategies import MessageRejected
from arroyo.processing.strategies.run_task_with_multiprocessing import (
DEFAULT_INPUT_BLOCK_SIZE,
MessageBatch,
MultiprocessingPool,
RunTaskWithMultiprocessing,
Expand Down Expand Up @@ -552,7 +553,7 @@ def test_input_block_resizing_max_size() -> None:
pool=pool,
input_block_size=None,
output_block_size=INPUT_SIZE // 2,
max_input_block_size=16000,
max_input_block_size=DEFAULT_INPUT_BLOCK_SIZE,
)

with pytest.raises(MessageRejected):
Expand Down Expand Up @@ -621,7 +622,7 @@ def test_output_block_resizing_max_size() -> None:
pool=pool,
input_block_size=INPUT_SIZE,
output_block_size=None,
max_output_block_size=16000,
max_output_block_size=DEFAULT_INPUT_BLOCK_SIZE,
)

for _ in range(NUM_MESSAGES):
Expand Down
Loading