diff --git a/agents-api/agents_api/env.py b/agents-api/agents_api/env.py index 9912e8d4b..20e5ac494 100644 --- a/agents-api/agents_api/env.py +++ b/agents-api/agents_api/env.py @@ -30,7 +30,7 @@ # ----- task_max_parallelism: int = env.int("AGENTS_API_TASK_MAX_PARALLELISM", default=100) transition_requests_per_minute: int = env.int( - "AGENTS_API_TRANSITION_REQUESTS_PER_MINUTE", default=100 + "AGENTS_API_TRANSITION_REQUESTS_PER_MINUTE", default=500 ) @@ -114,17 +114,27 @@ temporal_activity_after_retry_timeout: int = env.int( "TEMPORAL_ACTIVITY_AFTER_RETRY_TIMEOUT", default=30 ) -temporal_max_concurrent_workflow_tasks: int = env.int( - "TEMPORAL_MAX_CONCURRENT_WORKFLOW_TASKS", default=None + +def _parse_optional_int(val: str | None) -> int | None: + if not val or val.lower() == "none": + return None + return int(val) + +# Temporal worker configuration +temporal_max_concurrent_workflow_tasks: int | None = _parse_optional_int( + env.str("TEMPORAL_MAX_CONCURRENT_WORKFLOW_TASKS", default=None) ) -temporal_max_concurrent_activities: int = env.int( - "TEMPORAL_MAX_CONCURRENT_ACTIVITIES", default=100 + +temporal_max_concurrent_activities: int | None = _parse_optional_int( + env.str("TEMPORAL_MAX_CONCURRENT_ACTIVITIES", default=None) ) -temporal_max_activities_per_second: int = env.int( - "TEMPORAL_MAX_ACTIVITIES_PER_SECOND", default=None + +temporal_max_activities_per_second: int | None = _parse_optional_int( + env.str("TEMPORAL_MAX_ACTIVITIES_PER_SECOND", default=None) ) -temporal_max_task_queue_activities_per_second: int = env.int( - "TEMPORAL_MAX_TASK_QUEUE_ACTIVITIES_PER_SECOND", default=None + +temporal_max_task_queue_activities_per_second: int | None = _parse_optional_int( + env.str("TEMPORAL_MAX_TASK_QUEUE_ACTIVITIES_PER_SECOND", default=None) ) # Consolidate environment variables diff --git a/memory-store/Dockerfile b/memory-store/Dockerfile index 3821c2662..fa384cb12 100644 --- a/memory-store/Dockerfile +++ b/memory-store/Dockerfile @@ -6,7 +6,7 @@ # Then copy the run.sh script to the ./run.sh file # First stage: Build the Rust project -FROM rust:1.80.1-bookworm AS builder +FROM rust:1.83-bookworm AS builder # Install required dependencies RUN apt-get update && apt-get install -y \ @@ -16,7 +16,8 @@ RUN apt-get update && apt-get install -y \ # Build cozo-ce-bin from crates.io WORKDIR /usr/src -RUN cargo install cozo-ce-bin@0.7.13-alpha.1 --features "requests graph-algo storage-new-rocksdb storage-sqlite jemalloc io-uring malloc-usable-size" +# RUN cargo install cozo-ce-bin@0.7.13-alpha.3 --features "requests graph-algo storage-new-rocksdb storage-sqlite jemalloc io-uring malloc-usable-size" +RUN cargo install --git https://github.com/cozo-community/cozo.git --branch f/publish-crate --rev 592f49b --profile release -F graph-algo -F jemalloc -F io-uring -F storage-new-rocksdb -F malloc-usable-size --target x86_64-unknown-linux-gnu cozo-ce-bin # Copy the built binary to /usr/local/bin RUN cp /usr/local/cargo/bin/cozo-ce-bin /usr/local/bin/cozo diff --git a/memory-store/options b/memory-store/options index 55f102f61..8a2a30378 100644 --- a/memory-store/options +++ b/memory-store/options @@ -210,5 +210,4 @@ cache_index_and_filter_blocks=true block_align=false optimize_filters_for_memory=true - flush_block_policy_factory=FlushBlockBySizePolicyFactory - + flush_block_policy_factory=FlushBlockBySizePolicyFactory \ No newline at end of file diff --git a/memory-store/run.sh b/memory-store/run.sh index b810cf3a5..fa03f664d 100755 --- a/memory-store/run.sh +++ b/memory-store/run.sh @@ -20,4 +20,4 @@ ${APP_HOME:=.}/bin/cozo server \ --path $COZO_MNT_DIR/${COZO_ROCKSDB_DIR} \ --bind 0.0.0.0 \ --port ${COZO_PORT:=9070} \ - -c '{"enable_write_buffer_manager": true, "allow_stall": true, "lru_cache_mb": 1024, "write_buffer_mb": 1024}' + -c '{"enable_write_buffer_manager": true, "allow_stall": true, "lru_cache_mb": 4096, "write_buffer_mb": 4096}'