Skip to content

Add stats for faiss feature #151

Closed
Closed
@jmazanec15

Description

For the faiss feature, we need to add stats to the stats API. This addition should not break any backwards compatibility. The proposed additional stats will be:

Node Stats

  1. training.requests: number of training requests
  2. training.errors: number of training request errors
  3. training.memory_usage: memory usage used by training in kb
  4. training.memory_usage_percentage: memory usage used by training as percentage
  5. training.jobs: job level training stats
  6. model.indexing_degraded: whether indexing from models is degraded. This is true when the model cache is experiencing capacity misses
  7. engine.faiss_in_use: Whether faiss is in use on the node in the last 12 hours
  8. engine.nmslib_in_use: Whether nmslib is in use on the node in the last 12 hours

Cluster Stats

  1. model.index_status: k-NN model index status

The API response will look like:

{
    "_nodes" : {
        "total" : 1,
        "successful" : 1,
        "failed" : 0
    },
    "cluster_name" : "_run",
    "circuit_breaker_triggered" : false,
    
    "model": {
       "index_status": "green|yellow|red|non-existant",
    },
    
    "nodes" : {
        "HYMrXXsBSamUkcAjhjeN0w" : {
            "cache_capacity_reached" : false,
            "eviction_count" : 0,
            "hit_count" : 0,
            "miss_count" : 1,
            "knn_query_requests" : 4,
            "graph_memory_usage" : 1,
            "graph_memory_usage_percentage" : 3.68,
            "graph_index_requests" : 7,
            "graph_index_errors" : 1,
            "graph_query_requests" : 30,
            "graph_query_errors" : 15,
            "indices_in_cache" : {
                "myindex" : {
                    "graph_memory_usage" : 2,
                    "graph_memory_usage_percentage" : 3.68,
                    "graph_count" : 2
                }
            },
            
            "training": {
                "requests": X,
                "errors": X,
                "memory_usage" : 2,
                "memory_usage_percentage" : 3.68
                "jobs": {
                    "my_model_id" : {
                        "memory_usage" : 2,
                        "memory_usage_percentage" : 3.68
                    }
                },
             },
            "model": {
                "indexing_degraded": true,
            },
            "engine": {
                "nmslib_in_use": false,
                "faiss_in_use": true,
            },

            "load_exception_count" : 0,
            "load_success_count" : 1,
            "total_load_time" : 2878745,
            "script_compilations" : 1,
            "script_compilation_errors" : 0,
            "script_query_requests" : 534,
            "script_query_errors" : 0
        }
    }
}

Metadata

Assignees

No one assigned

    Labels

    EnhancementsIncreases software capabilities beyond original client specificationsv1.2.0release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions