Skip to content

Commit 075fca4

Browse files
Milvus-doc-botMilvus-doc-bot
authored andcommitted
Release new docs
1 parent 12eca46 commit 075fca4

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

v2.4.x/site/en/reference/mmap.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,30 @@ queryNode:
3030
....
3131
```
3232

33+
After `2.4.10`, the configuration `queryNode.mmap.mmapEnabled` splits into below four seperate fields, and all defaults are `false`:
34+
35+
- `queryNode.mmap.vectorField`, controls whether vector data is mmap;
36+
- `queryNode.mmap.vectorIndex`, controls whether vector index is mmap;
37+
- `queryNode.mmap.scalarField`, controls whether scalar data is mmap;
38+
- `queryNode.mmap.scalarIndex`, controls whether scalar index is mmap;
39+
40+
```yaml
41+
# This parameter was set in configs/milvus.yaml
42+
...
43+
queryNode:
44+
mmap:
45+
vectorField: false # Enable mmap for loading vector data
46+
vectorIndex: false # Enable mmap for loading vector index
47+
scalarField: false # Enable mmap for loading scalar data
48+
scalarIndex: false # Enable mmap for loading scalar index
49+
....
50+
```
51+
52+
In addition, only vector index and vector data mmap can be turned on and off for a collection individually, but not for others.
53+
54+
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`.
55+
56+
3357
### During cluster operation: dynamic configuration
3458

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

73+
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.
74+
75+
```python
76+
schema = MilvusClient.create_schema()
77+
78+
schema.add_field(field_name="embedding", datatype=DataType.FLOAT_VECTOR, dim=768, mmap_enabled=True)
79+
```
80+
4981
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.
5082

5183
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`.

0 commit comments

Comments
 (0)