Skip to content
Open
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ Execute tests for the index types: HGraph.
NUM_PER_BATCH=10000 vectordbbench hologreshgraph --host Hologres_Endpoint --port 80 \
--user ACCESS_ID --password ACCESS_KEY --database DATABASE_NAME \
--m 64 --ef-construction 400 --case-type Performance768D10M \
--index-type HGraph --ef-search 400 --k 10 --num-concurrency 1,60,70,75,80,90,95,100,110,120
--index-type HGraph --ef-search 400 --k 10 --num-concurrency 1,60,70,75,80,90,95,100,105,110,115,120,125,130 \
--serial-cooldown 3
```

To list the options for Hologres, execute `vectordbbench hologreshgraph --help`, The following are some Hologres-specific command-line options.
Expand Down
1 change: 1 addition & 0 deletions vectordb_bench/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class config:
CONCURRENCY_DURATION = 30

CONCURRENCY_TIMEOUT = 3600
SERIAL_COOLDOWN = 0
CLOUD_INSERT_READINESS_TIMEOUT = env.float("CLOUD_INSERT_READINESS_TIMEOUT", None)
CLOUD_INSERT_READINESS_POLL_INTERVAL = env.float("CLOUD_INSERT_READINESS_POLL_INTERVAL", 5.0)

Expand Down
6 changes: 6 additions & 0 deletions vectordb_bench/backend/task_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,12 @@ def _run_perf_case(self, drop_old: bool = True) -> Metric:
m.conc_latency_avg_list,
) = search_results
if TaskStage.SEARCH_SERIAL in self.config.stages:
cooldown = self.config.case_config.concurrency_search_config.serial_cooldown
if TaskStage.SEARCH_CONCURRENT in self.config.stages and cooldown > 0:
log.info(
f"Cooldown {cooldown}s before serial search to ensure a stable measurement environment"
)
time.sleep(cooldown)
search_results = self._serial_search()
m.recall, m.ndcg, m.serial_latency_p99, m.serial_latency_p95 = search_results
m.payload_profile = self.ca.payload_profile.value
Expand Down
11 changes: 11 additions & 0 deletions vectordb_bench/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,16 @@ class CommonTypedDict(TypedDict):
"Set to a negative value to wait indefinitely.",
),
]
serial_cooldown: Annotated[
float,
click.option(
"--serial-cooldown",
type=float,
default=config.SERIAL_COOLDOWN,
show_default=True,
help="Cooldown in seconds between concurrent and serial search phases",
),
]
custom_case_name: Annotated[
str,
click.option(
Expand Down Expand Up @@ -805,6 +815,7 @@ def run(
concurrency_duration=parameters["concurrency_duration"],
num_concurrency=[int(s) for s in parameters["num_concurrency"]],
concurrency_timeout=parameters["concurrency_timeout"],
serial_cooldown=parameters["serial_cooldown"],
),
custom_case=get_custom_case_config(parameters),
),
Expand Down
1 change: 1 addition & 0 deletions vectordb_bench/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ class ConcurrencySearchConfig(BaseModel):
num_concurrency: list[int] = config.NUM_CONCURRENCY
concurrency_duration: int = config.CONCURRENCY_DURATION
concurrency_timeout: int = config.CONCURRENCY_TIMEOUT
serial_cooldown: float = config.SERIAL_COOLDOWN


class CaseConfig(BaseModel):
Expand Down
Loading