사용자 도구

사이트 도구


search:elasticsearch

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
search:elasticsearch [2019/04/30 14:39]
kwon37xi
search:elasticsearch [2023/04/29 14:03] (현재)
kwon37xi [Linux 설정]
줄 14: 줄 14:
  
 ===== Sharding Routing ===== ===== Sharding Routing =====
 +  * 만약 Search 를 명확히 특정 Shard 단위로 할 수 있다면 샤딩을 촘촘히 해도 읽기/쓰기 성능이 모두 좋지만 
 +  * Sharding 기준이 명확하지 않아서 여러 Shard 에 걸쳐 Search 를 해야한다면, Shard 를 늘릴 수록 
 +    * 읽기 성능은 저하된다.
 +    * Write Primary 노드는 여러개로 분산 되므로 Write 성능은 높아진다.
 ==== Routing 강제 ==== ==== Routing 강제 ====
 라우팅을 강제할 수 있다. 라우팅 옵션 없이는 인덱싱 불가. 라우팅을 강제할 수 있다. 라우팅 옵션 없이는 인덱싱 불가.
줄 77: 줄 81:
 sysctl -w vm.max_map_count=262144 sysctl -w vm.max_map_count=262144
 </code> </code>
 +  * [[linux:performance|Linux Performance]]
 ===== 환경변수 ===== ===== 환경변수 =====
   * ''JAVA_OPTS'' : Java 기본 옵션들   * ''JAVA_OPTS'' : Java 기본 옵션들
줄 95: 줄 99:
     * Shard 는 최대 30GB가 될 정도 수준으로 구성.(Replica 도 계산시 단일 Shard로 쳐서)     * Shard 는 최대 30GB가 될 정도 수준으로 구성.(Replica 도 계산시 단일 Shard로 쳐서)
     * [[https://www.elastic.co/guide/en/elasticsearch/reference/current/tune-for-search-speed.html|Tune for search speed]]     * [[https://www.elastic.co/guide/en/elasticsearch/reference/current/tune-for-search-speed.html|Tune for search speed]]
 +    * [[https://qbox.io/blog/optimizing-elasticsearch-how-many-shards-per-index|Optimizing Elasticsearch: How Many Shards per Index?]]
  
 ===== Write Performance ===== ===== Write Performance =====
줄 105: 줄 110:
   * [[https://www.elastic.co/kr/blog/why-am-i-seeing-bulk-rejections-in-my-elasticsearch-cluster|Why am I seeing bulk rejections in my Elasticsearch cluster?]]   * [[https://www.elastic.co/kr/blog/why-am-i-seeing-bulk-rejections-in-my-elasticsearch-cluster|Why am I seeing bulk rejections in my Elasticsearch cluster?]]
   * [[https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html|Thread Pool]]   * [[https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-threadpool.html|Thread Pool]]
 +  * [[https://www.datadoghq.com/blog/elasticsearch-performance-scaling-problems/|How to solve 5 Elasticsearch performance and scaling problems]]
   * [[https://brunch.co.kr/@alden/36|rejected exception의 의미와 조치 방법]]   * [[https://brunch.co.kr/@alden/36|rejected exception의 의미와 조치 방법]]
   * ''cat threadpool''<code>   * ''cat threadpool''<code>
 GET /_cat/thread_pool GET /_cat/thread_pool
 </code> </code>
 +
 +===== Memory =====
 +  * **32GB** 넘기지 말 것.
 +  * [[https://brunch.co.kr/@alden/35|ElasticSearch와 Heap 메모리]]
 +
 ===== G1 GC ===== ===== G1 GC =====
   * G1 GC로 가려면 [[search:lucene|Lucene]] 관련 버그들이 해결된 [[java:10|Java 10]] 이상 버전 권장.   * G1 GC로 가려면 [[search:lucene|Lucene]] 관련 버그들이 해결된 [[java:10|Java 10]] 이상 버전 권장.
줄 114: 줄 125:
   * [[https://medium.com/naukri-engineering/garbage-collection-in-elasticsearch-and-the-g1gc-16b79a447181|Garbage Collection in Elasticsearch and the G1GC – Naukri Engineering – Medium]]   * [[https://medium.com/naukri-engineering/garbage-collection-in-elasticsearch-and-the-g1gc-16b79a447181|Garbage Collection in Elasticsearch and the G1GC – Naukri Engineering – Medium]]
   * [[https://sematext.com/blog/java-9-elasticsearch-benchmark/|Java 9 Elasticsearch Benchmark: upgrading benefits]]   * [[https://sematext.com/blog/java-9-elasticsearch-benchmark/|Java 9 Elasticsearch Benchmark: upgrading benefits]]
 +
 +
 +===== Disk Size =====
 +  * [[https://www.elastic.co/guide/en/elasticsearch/reference/current/tune-for-disk-usage.html|Tune for disk usage ]]
  
  
줄 134: 줄 149:
   * 한 번 Version Upgrade 한 뒤 indexing을 하면 다시 Downgrade 할 수 없다. index를 백업 한 뒤에 업그레이드하라.   * 한 번 Version Upgrade 한 뒤 indexing을 하면 다시 Downgrade 할 수 없다. index를 백업 한 뒤에 업그레이드하라.
   * 2.x 버전에서 Tokenizer Plugin 을 사용할 때, 기본 Tokenizer type 이름과 tokenizer 이름이 다를경우 해당 토크나이저의 설정 정보가 처음에는 올바른 상태로 그리고 다시 한 번은 null 인 상태로 ''XxxTokenizerFactory'' 생성자가 한 번 더 호출되는 문제가 있다. 이에 따라 type 이름과 토크나이저 이름을 동일하게 맞춰줘야 했다. 이 경우 생성자가 인덱스당 한 번씩만 호출되었다.   * 2.x 버전에서 Tokenizer Plugin 을 사용할 때, 기본 Tokenizer type 이름과 tokenizer 이름이 다를경우 해당 토크나이저의 설정 정보가 처음에는 올바른 상태로 그리고 다시 한 번은 null 인 상태로 ''XxxTokenizerFactory'' 생성자가 한 번 더 호출되는 문제가 있다. 이에 따라 type 이름과 토크나이저 이름을 동일하게 맞춰줘야 했다. 이 경우 생성자가 인덱스당 한 번씩만 호출되었다.
 +
 ===== 참조 ===== ===== 참조 =====
   * [[http://blog.trifork.com/2013/10/24/how-to-avoid-the-split-brain-problem-in-elasticsearch/|How to avoid the split-brain problem in elasticsearch]]   * [[http://blog.trifork.com/2013/10/24/how-to-avoid-the-split-brain-problem-in-elasticsearch/|How to avoid the split-brain problem in elasticsearch]]
줄 140: 줄 156:
   * [[https://www.javacodegeeks.com/2017/03/elasticsearch-java-developers-elasticsearch-java.html|Elasticsearch for Java Developers: Elasticsearch from Java | Java Code Geeks - 2017]]   * [[https://www.javacodegeeks.com/2017/03/elasticsearch-java-developers-elasticsearch-java.html|Elasticsearch for Java Developers: Elasticsearch from Java | Java Code Geeks - 2017]]
   * [[https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-mapping-charfilter.html|Mapping Char Filter | Elasticsearch Reference [6.2] | Elastic]] 특수 문자등의 검색   * [[https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-mapping-charfilter.html|Mapping Char Filter | Elasticsearch Reference [6.2] | Elastic]] 특수 문자등의 검색
 +  * [[https://esbook.kimjmin.net/|Elastic 가이드 북 - Elastic 가이드북]]
 +  * [[https://aws.amazon.com/ko/premiumsupport/knowledge-center/opensearch-latency-spikes/|Amazon OpenSearch Service의 검색 대기 시간 스파이크 문제 해결]]
search/elasticsearch.1556602754.txt.gz · 마지막으로 수정됨: 2019/04/30 14:39 저자 kwon37xi