snapshotresource.asciidoc 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. [role="xpack"]
  2. [[ml-snapshot-resource]]
  3. === Model Snapshot Resources
  4. Model snapshots are saved to disk periodically.
  5. By default, this is occurs approximately every 3 hours to 4 hours and is
  6. configurable with the `background_persist_interval` property.
  7. By default, model snapshots are retained for one day (twenty-four hours). You
  8. can change this behavior by updating the `model_snapshot_retention_days` for the
  9. job. When choosing a new value, consider the following:
  10. * Persistence enables resilience in the event of a system failure.
  11. * Persistence enables snapshots to be reverted.
  12. * The time taken to persist a job is proportional to the size of the model in memory.
  13. A model snapshot resource has the following properties:
  14. `description`::
  15. (string) An optional description of the job.
  16. `job_id`::
  17. (string) A numerical character string that uniquely identifies the job that
  18. the snapshot was created for.
  19. `min_version`::
  20. (string) The minimum version required to be able to restore the model snapshot.
  21. `latest_record_time_stamp`::
  22. (date) The timestamp of the latest processed record.
  23. `latest_result_time_stamp`::
  24. (date) The timestamp of the latest bucket result.
  25. `model_size_stats`::
  26. (object) Summary information describing the model.
  27. See <<ml-snapshot-stats,Model Size Statistics>>.
  28. `retain`::
  29. (boolean) If true, this snapshot will not be deleted during automatic cleanup
  30. of snapshots older than `model_snapshot_retention_days`.
  31. However, this snapshot will be deleted when the job is deleted.
  32. The default value is false.
  33. `snapshot_id`::
  34. (string) A numerical character string that uniquely identifies the model
  35. snapshot. For example: "1491852978".
  36. `snapshot_doc_count`::
  37. (long) For internal use only.
  38. `timestamp`::
  39. (date) The creation timestamp for the snapshot.
  40. NOTE: All of these properties are informational with the exception of
  41. `description` and `retain`.
  42. [float]
  43. [[ml-snapshot-stats]]
  44. ==== Model Size Statistics
  45. The `model_size_stats` object has the following properties:
  46. `bucket_allocation_failures_count`::
  47. (long) The number of buckets for which entities were not processed due to
  48. memory limit constraints.
  49. `job_id`::
  50. (string) A numerical character string that uniquely identifies the job.
  51. `log_time`::
  52. (date) The timestamp that the `model_size_stats` were recorded, according to
  53. server-time.
  54. `memory_status`::
  55. (string) The status of the memory in relation to its `model_memory_limit`.
  56. Contains one of the following values.
  57. `ok`::: The internal models stayed below the configured value.
  58. `soft_limit`::: The internal models require more than 60% of the configured
  59. memory limit and more aggressive pruning will
  60. be performed in order to try to reclaim space.
  61. `hard_limit`::: The internal models require more space that the configured
  62. memory limit. Some incoming data could not be processed.
  63. `model_bytes`::
  64. (long) An approximation of the memory resources required for this analysis.
  65. `result_type`::
  66. (string) Internal. This value is always set to "model_size_stats".
  67. `timestamp`::
  68. (date) The timestamp that the `model_size_stats` were recorded, according to the bucket timestamp of the data.
  69. `total_by_field_count`::
  70. (long) The number of _by_ field values analyzed. Note that these are counted separately for each detector and partition.
  71. `total_over_field_count`::
  72. (long) The number of _over_ field values analyzed. Note that these are counted separately for each detector and partition.
  73. `total_partition_field_count`::
  74. (long) The number of _partition_ field values analyzed.
  75. NOTE: All of these properties are informational; you cannot change their values.