Skip to content

Commit

Permalink
Release new docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Milvus-doc-bot authored and Milvus-doc-bot committed Oct 28, 2024
1 parent 12eca46 commit 075fca4
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions v2.4.x/site/en/reference/mmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,30 @@ queryNode:
....
```

After `2.4.10`, the configuration `queryNode.mmap.mmapEnabled` splits into below four seperate fields, and all defaults are `false`:

- `queryNode.mmap.vectorField`, controls whether vector data is mmap;
- `queryNode.mmap.vectorIndex`, controls whether vector index is mmap;
- `queryNode.mmap.scalarField`, controls whether scalar data is mmap;
- `queryNode.mmap.scalarIndex`, controls whether scalar index is mmap;

```yaml
# This parameter was set in configs/milvus.yaml
...
queryNode:
mmap:
vectorField: false # Enable mmap for loading vector data
vectorIndex: false # Enable mmap for loading vector index
scalarField: false # Enable mmap for loading scalar data
scalarIndex: false # Enable mmap for loading scalar index
....
```

In addition, only vector index and vector data mmap can be turned on and off for a collection individually, but not for others.

Compatibility: If the original configuration `queryNode.mmap.mmapEnabled` is set to `true`, the newly added configuration will be set to `true` at this time. If `queryNode.mmap.mmapEnabled` is set to `false`, if the new configuration is set to `true`, the final value will be `true`.


### During cluster operation: dynamic configuration

During cluster runtime, you can dynamically adjust memory mapping settings at either the collection or index level.
Expand All @@ -46,6 +70,14 @@ collection = Collection("test_collection") # Replace with your collection name
collection.set_properties({'mmap.enabled': True})
```

After `2.4.10`, the memory mapping settings within a collection, utilize the `add_field` method. Here, you can toggle `mmap_enabled` between `True` or `False` as needed.

```python
schema = MilvusClient.create_schema()

schema.add_field(field_name="embedding", datatype=DataType.FLOAT_VECTOR, dim=768, mmap_enabled=True)
```

For __index-level__ settings, memory mapping can be specifically applied to vector indexes without affecting other data types. This feature is invaluable for collections that require optimized performance for vector searches.

To enable or disable memory mapping for an index within a collection, call the `alter_index()` method, specifying the target index name in `index_name` and setting `mmap.enabled` to `True` or `False`.
Expand Down

0 comments on commit 075fca4

Please sign in to comment.