Repository navigation
Part of #2384: Auto checkpoint upon exceeding memory percentage or idle time - #4391
Merged
Merged
Conversation
vasslitvinov
marked this pull request as draft
May 9, 2025 21:42
vasslitvinov
force-pushed
the
auto-checkpoint-2
branch
from
May 12, 2025 18:41
df07b09 to
24d8e2a
Compare
vasslitvinov
marked this pull request as ready for review
May 17, 2025 06:02
ajpotts
reviewed
May 19, 2025
ajpotts
reviewed
May 19, 2025
ajpotts
approved these changes
May 19, 2025
ShreyasKhandekar
self-requested a review
May 19, 2025 20:39
ShreyasKhandekar
approved these changes
May 19, 2025
ShreyasKhandekar
approved these changes
May 19, 2025
Signed-off-by: Vassily Litvinov <[email protected]>
vasslitvinov
force-pushed
the
auto-checkpoint-2
branch
from
May 20, 2025 00:44
6a2802c to
5bb2fa9
Compare
ShreyasKhandekar
approved these changes
May 20, 2025
ajpotts
enabled auto-merge
May 20, 2025 22:42
ajpotts
approved these changes
May 20, 2025
ajpotts
added this pull request to the merge queue
May 20, 2025
github-merge-queue Bot
pushed a commit
that referenced
this pull request
May 30, 2025
Fix a bug that prevents `tests/optioned-server/conftest.py` added in #4391 from connecting to the server that's not on "localhost". While there, clarify the handling of the server host and port in the test suites: * "Host" that comes from a command-line argument or environment variable and defaults to `localhost` is used only in the CLIENT running mode. * "Host" is obtained from `start_arkouda_server()`, which reads it from `ak-server-info` that's created by the server, in GLOBAL_SERVER and CLASS_SERVER modes. * "Port" comes from a command-line argument or environment variable and defaults to 5555; the port produced by `start_arkouda_server()` is expected to be the same. The testing frameworks store the host and the port for use in `ak.connect()` as follows: | suite | tests/ | benchmarks/ | benchmark_v2/ | | :-- | :-- | :-- | :-- | | host | `pytest.server` | `get_server_info()` | `pytest.host` | | port | `pytest.port` | `get_server_info()` | `pytest.port` | | file | conftest.py | run_benchmarks.py | conftest.py | The `host` argument of `start_arkouda_server()` has not been used for its [intended purpose](https://github.com/Bears-R-Us/arkouda/pull/374/files#r427210331) since it was added in #374. I propose to remove it, which will increase the clarity of code. --------- Signed-off-by: Vassily Litvinov <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Address part of #2384. Replaces #4378.
The server now automatically saves a checkpoint if memory usage exceeded a threshold or if the server has been idle for a bit. This is disabled by default, see below. Requires
CheckpointMsgmodule. Arkouda still builds without this module.The following server options in
CheckpointMsgmodule control the behavior:checkpointMemPct: Perform checkpointing automatically when memory usage exceeds this many percent of available memory. By default / if <=0, auto-checkpointing is not triggered by memory usage.checkpointMemPctDelay: When memory exceeds thecheckpointMemPctthrehsold, wait for this many seconds of idle time before checkpointing. By default / if <=0, uses 5 seconds.checkpointIdleTime: Perform checkpointing automatically when the server is idle for this many seconds. By default / if <=0, auto-checkpointing is not triggered by idle time.checkpointCheckInterval: The auto-checkpoint implementation will wake up every this many seconds to check if a checkpoint needs to be saved due to memory usage or idle time. By default / if <=0, uses min( checkpointMemPctDelay, checkpointIdleTime ).checkpointInterval: Automatic checkpointing due to memory use or idle time will wait for at least this many seconds after any completed checkpoint save or load operations, whether automatic or client-initiated. By default / if <=0, uses 3600 (one hour). This avoids overly-frequent auto-checkpointing. The server does not need not be idle during this interval. Checkpoint operations requested by the client are not subject to this delay.If the server receives a message from the client while auto-checkpointing is in progress, it locks until auto-checkpointing completes.
This PR also introduces a framework for client testing with customer server options and invokes it as a sibling
pytestcommand inMakefile. Such testing is configured usingpytest.opts.iniandtests/optioned-server/conftest.py. It is used to test the functionality added in this PR.While there: switch the order of error() and critical() in
src/Logging.chplto match the order in the enum; an analogous change insrc/Message.chpl; open the file in read mode, not append, inio_util.delimited_file_to_dict(); addedio_util.directory_exists().Next features to implement:
checkpointInterval.The module-level variable
lastCkptCompletionin CheckpointMsg.chpl should be specific to eachDefaultServerDaemoninstance rather than be a global. This is OK for now that we have only a single instance.