vector-databasemilvus

Milvus throws OOM exception when trying to load collection


I am experiencing an issue when attempting to load a collection into memory. Here are the details:

Here is the schema of the collection:

{
  "auto_id": false,
  "fields": [
    {
      "name": "catalog_veing_entity_id",
      "type": "<DataType.INT64: 5>",
      "is_primary": true,
      "auto_id": false
    },
    {
      "name": "document_name",
      "type": "<DataType.VARCHAR: 21>",
      "params": {
        "max_length": 200
      }
    },
    {
      "name": "sql_query",
      "type": "<DataType.VARCHAR: 21>",
      "params": {
        "max_length": 10000
      }
 },
    {
      "name": "Question",
      "description": "Text",
      "type": "<DataType.VARCHAR: 21>",
      "params": {
        "max_length": 10000
      }
    },
    {
      "name": "question_vector_val",
      "type": "<DataType.FLOAT_VECTOR: 101>",
      "params": {
        "dim": 1536
      }
    }
  ],
  "enable_dynamic_field": true
}

And here is the error message provided:

RPC error: [get_loading_progress], <MilvusException: (code=65535, message=show collection failed: load segment failed, OOM if load, maxSegmentSize = 0.8347320556640625 MB, concurrency = 1, memUsage = 931.40234375 MB, predictMemUsage = 932.2370758056641 MB, totalMem = 1024 MB thresholdFactor = 0.900000)>, <Time:{'RPC start': '2024-04-18 17:18:43.707672', 'RPC error': '2024-04-18 17:18:43.711645'}>
RPC error: [wait_for_loading_collection]

Any ideas why this is the case? Thanks a lot


Solution

  • In your error message, it says "totalMem = 1024 MB", which implies the Milvus RAM capacity is only 1GB. According to this doc here, the hardware requirement is at least 8GB RAM for Milvus standalone: https://milvus.io/docs/v2.3.x/prerequisite-docker.md#Hardware-requirements