storage:
elasticsearch:
bulkActions: ${SW_STORAGE_ES_BULK_ACTIONS:4000} # Execute the bulk every 2000 requests
bulkSize: ${SW_STORAGE_ES_BULK_SIZE:40} # flush the bulk every 20mb
flushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:30} # flush the bulk every 10 seconds whatever the number of requests
concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:4} # the number of concurrent requests
metadataQueryMaxSize: ${SW_STORAGE_ES_QUERY_MAX_SIZE:8000}
-
调整bulkActions默认2000次请求批量写入一次改到4000次;
-
bulkSize批量刷新从20M一次到40M一次;
-
flushInterval每10秒刷新一次堆改为每30秒刷新;
-
concurrentRequests查询的最大数量由5000改为8000。
参考网址:https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.5/java-docs-bulk-processor.html
JVM参数调整
此部分主要是针对es的配置文件jvm.optio