store.asciidoc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. [[index-modules-store]]
  2. == Store
  3. The store module allows you to control how index data is stored and accessed on disk.
  4. [float]
  5. [[file-system]]
  6. === File system storage types
  7. There are different file system implementations or _storage types_. The best
  8. one for the operating environment will be automatically chosen: `simplefs` on
  9. Windows 32bit, `niofs` on other 32bit systems and `mmapfs` on 64bit systems.
  10. This can be overridden for all indices by adding this to the
  11. `config/elasticsearch.yml` file:
  12. [source,yaml]
  13. ---------------------------------
  14. index.store.type: niofs
  15. ---------------------------------
  16. It is a _static_ setting that can be set on a per-index basis at index
  17. creation time:
  18. [source,js]
  19. ---------------------------------
  20. PUT /my_index
  21. {
  22. "settings": {
  23. "index.store.type": "niofs"
  24. }
  25. }
  26. ---------------------------------
  27. experimental[This is an expert-only setting and may be removed in the future]
  28. The following sections lists all the different storage types supported.
  29. [[simplefs]]`simplefs`::
  30. The Simple FS type is a straightforward implementation of file system
  31. storage (maps to Lucene `SimpleFsDirectory`) using a random access file.
  32. This implementation has poor concurrent performance (multiple threads
  33. will bottleneck). It is usually better to use the `niofs` when you need
  34. index persistence.
  35. [[niofs]]`niofs`::
  36. The NIO FS type stores the shard index on the file system (maps to
  37. Lucene `NIOFSDirectory`) using NIO. It allows multiple threads to read
  38. from the same file concurrently. It is not recommended on Windows
  39. because of a bug in the SUN Java implementation.
  40. [[mmapfs]]`mmapfs`::
  41. The MMap FS type stores the shard index on the file system (maps to
  42. Lucene `MMapDirectory`) by mapping a file into memory (mmap). Memory
  43. mapping uses up a portion of the virtual memory address space in your
  44. process equal to the size of the file being mapped. Before using this
  45. class, be sure you have allowed plenty of
  46. <<vm-max-map-count,virtual address space>>.
  47. [[default_fs]]`default_fs` deprecated[5.0.0, The `default_fs` store type is deprecated - use `mmapfs` instead]::
  48. The `default` type is a hybrid of NIO FS and MMapFS, which chooses the best
  49. file system for each type of file. Currently only the Lucene term dictionary,
  50. doc values and points files are memory mapped to reduce the impact on the
  51. operating system. All other files are opened using Lucene `NIOFSDirectory`.
  52. Address space settings (<<vm-max-map-count>>) might also apply if your term
  53. dictionary are large, if you index many fields that use points (numerics, dates
  54. and ip addresses) or if you have many fields with doc values.