Try MDB_MAPASYNC

This commit is contained in:
Louis Dureuil
2024-11-25 18:01:26 +01:00
parent 7744077c37
commit 5ad7e9d3c9
2 changed files with 43 additions and 1 deletions

View File

@ -305,7 +305,7 @@ fn create_or_open_index(
options.map_size(clamp_to_page_size(map_size));
options.max_readers(1024);
if enable_mdb_writemap {
unsafe { options.flags(EnvFlags::WRITE_MAP) };
unsafe { options.flags(EnvFlags::WRITE_MAP | EnvFlags::MAP_ASYNC) };
}
if let Some((created, updated)) = date {

View File

@ -0,0 +1,42 @@
{
"name": "movies.json,usewritemap",
"run_count": 10,
"extra_cli_args": ["--experimental-reduce-indexing-memory-usage"],
"assets": {
"movies.json": {
"local_location": null,
"remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/movies.json",
"sha256": "5b6e4cb660bc20327776e8a33ea197b43d9ec84856710ead1cc87ab24df77de1"
}
},
"commands": [
{
"route": "indexes/movies/settings",
"method": "PATCH",
"body": {
"inline": {
"searchableAttributes": [
"title",
"overview"
],
"filterableAttributes": [
"genres",
"release_date"
],
"sortableAttributes": [
"release_date"
]
}
},
"synchronous": "DontWait"
},
{
"route": "indexes/movies/documents",
"method": "POST",
"body": {
"asset": "movies.json"
},
"synchronous": "WaitForTask"
}
]
}