[Elasticsearch] HighLevelRestClient 를 이용한 Bulk Indexing 로컬 테스트 결과

Elastic/Elasticsearch 2018. 6. 28. 11:35


arirang plug 을 적용해서 돌려본 실행 속도 입니다.


[DEBUG] 2018-07-02 13:12:18.407 [main] MainIndexer - Bulk operation elapsed time [811.0869750976562] sec

[DEBUG] 2018-07-02 13:14:16.595 [main] MainIndexer - Force merge operation elapsed time [118.18800354003906] sec


[Settings]

"settings":{
"number_of_shards":1,
"number_of_replicas":0,
"index.refresh_interval":"1h",
"index.routing.allocation.require.box_type":"indexing",
"index.similarity.default.type":"BM25",
"index":{
"analysis":{
"analyzer":{
"arirang_custom_analyzer":{
"tokenizer":"arirang_tokenizer",
"filter":[
"lowercase",
"trim",
"custom_synonym",
"arirang_filter"
]
}
},
"filter":{
"custom_synonym":{
"type":"synonym_graph",
"synonyms":[]
}
}
}
}
}


[Mappings]

"mappings" : {
"_doc": {
"_source": {
"enabled": true
},
"dynamic_templates": [
{
"strings": {
"match_mapping_type": "string",
"mapping": {
"type": "text",
"analyzer": "arirang_custom_analyzer",
"fields": {
"raw": {
"type": "keyword",
"ignore_above": 50
}
}
}
}
}
]
}
}





얼마전 밋업에서 김종민님이 공유해 주신 위키피디아 문서를 가지고 테스트한 결과 입니다.

그냥 제가 만든 Indexer 모듈에 대한 성능 테스트용도로 한번 실험 삼아 돌려 본거라 별 도움이 안될 수 있습니다.


아래 문서는 언제까지 올라가 있을지 모르겠습니다.

빨리 받으시면 될 듯 하내요.


문서 다운로드 링크)

https://s3.ap-northeast-2.amazonaws.com/kr.elastic.co/sample-data/kr-wikipedia-dump.json.tar.gz


위키피디아 문서 색인 테스트 결과)

MacBook Pro

CPU 2.8G i7

MEM 16GB

API : HighLevelRestClient

REST API : _bulk

Settings

primary shard : 1

replica shard : 0

refresh_interval : 1h

similarity : BM25

default analyzer (standard)

Mappings

dynamic mapping

Indexing File Source Size 

3.6GB

Indexing Segment File Size (force merge 전)

11 GB

Indexing Segment File Size (force merge 후)

4.28 GB

Bulk Request Thread Size

5

Bulk Request Document Size (per thread)

500

Bulk Indexing / Force Merge Time

[DEBUG] 2018-06-28 11:06:13.780 [main] MainIndexer - Bulk operation elapsed time [366.6780090332031] sec

[DEBUG] 2018-06-28 11:08:22.254 [main] MainIndexer - Force merge operation elapsed time [128.47300720214844] sec

Indexing Documents

Total indexed document are 1020662


결과적으로 튜닝한 내용은 전혀 없고 그냥 색인기 기능 테스트 정도로 보셔도 될 것 같습니다.


: