Hi everyone!
Basically we have the same problem. ES - 1.6
from the client we are trying to send 10k rows in one bulk query. And we've tried to do this 2 ways: via BulkRequestBuilder with our "handmade" threads and via BulkProcessor(5 concurent threads). The initial data for send - 1.5-2mb
So, we have next results for BulkProcessor.
(for example :On ES side = 6301,    Our side MS: 9200,      diff: 2899* - means that 6301 this is time from bulkresponse.timeinmiliss, 9200- it's 6301+transport issues, 2899 - ...)
2015-07-02 18:19:22,561 [elasticsearch[Lighting Rod][transport_client_worker][T#6]{New I/O worker #6}] INFO  SenderThread2 - OK2: On ES side = 6301,    Our side MS: 9200,      diff: 2899
2015-07-02 18:19:22,562 [elasticsearch[Lighting Rod][transport_client_worker][T#5]{New I/O worker #5}] INFO  SenderThread2 - OK2: On ES side = 5779,    Our side MS: 9295,      diff: 3516
2015-07-02 18:19:22,566 [elasticsearch[Lighting Rod][transport_client_worker][T#4]{New I/O worker #4}] INFO  SenderThread2 - OK2: On ES side = 5498,    Our side MS: 9713,      diff: 4215
2015-07-02 18:19:22,571 [elasticsearch[Lighting Rod][transport_client_worker][T#6]{New I/O worker #6}] INFO  SenderThread2 - OK2: On ES side = 6008,    Our side MS: 8264,      diff: 2256
2015-07-02 18:19:22,573 [elasticsearch[Lighting Rod][transport_client_worker][T#5]{New I/O worker #5}] INFO  SenderThread2 - OK2: On ES side = 6455,    Our side MS: 8362,      diff: 1907
2015-07-02 18:19:22,578 [elasticsearch[Lighting Rod][transport_client_worker][T#4]{New I/O worker #4}] INFO  SenderThread2 - OK2: On ES side = 6037,    Our side MS: 8471,      diff: 2434
2015-07-02 18:19:22,585 [elasticsearch[Lighting Rod][transport_client_worker][T#5]{New I/O worker #5}] INFO  SenderThread2 - OK2: On ES side = 6962,    Our side MS: 7393,      diff: 431
2015-07-02 18:19:22,677 [elasticsearch[Lighting Rod][transport_client_worker][T#4]{New I/O worker #4}] INFO  SenderThread2 - OK2: On ES side = 6556,    Our side MS: 7588,      diff: 1032
2015-07-02 18:19:22,719 [elasticsearch[Lighting Rod][transport_client_worker][T#6]{New I/O worker #6}] INFO  SenderThread2 - OK2: On ES side = 6765,    Our side MS: 7400,      diff: 635
2015-07-02 18:19:23,145 [elasticsearch[Lighting Rod][transport_client_worker][T#5]{New I/O worker #5}] INFO  SenderThread2 - OK2: On ES side = 7021,    Our side MS: 7303,      diff: 282
2015-07-02 18:19:23,963 [elasticsearch[Lighting Rod][transport_client_worker][T#6]{New I/O worker #6}] INFO  SenderThread2 - OK2: On ES side = 7602,    Our side MS: 7709,      diff: 107
2015-07-02 18:19:24,195 [elasticsearch[Lighting Rod][transport_client_worker][T#4]{New I/O worker #4}] INFO  SenderThread2 - OK2: On ES side = 8245,    Our side MS: 8448,      diff: 203
2015-07-02 18:19:25,266 [elasticsearch[Lighting Rod][transport_client_worker][T#6]{New I/O worker #6}] INFO  SenderThread2 - OK2: On ES side = 2536,    Our side MS: 2674,      diff: 138
2015-07-02 18:19:25,266 [elasticsearch[Lighting Rod][transport_client_worker][T#4]{New I/O worker #4}] INFO  SenderThread2 - OK2: On ES side = 8738,    Our side MS: 8888,      diff: 150
2015-07-02 18:19:26,671 [elasticsearch[Lighting Rod][transport_client_worker][T#5]{New I/O worker #5}] INFO  SenderThread2 - OK2: On ES side = 3543,    Our side MS: 10182,     diff: 6639
2015-07-02 18:19:26,750 [elasticsearch[Lighting Rod][transport_client_worker][T#4]{New I/O worker #4}] INFO  SenderThread2 - OK2: On ES side = 3996,    Our side MS: 4058,      diff: 62
2015-07-02 18:19:28,039 [elasticsearch[Lighting Rod][transport_client_worker][T#6]{New I/O worker #6}] INFO  SenderThread2 - OK2: On ES side = 4681,    Our side MS: 4787,      diff: 106
2015-07-02 18:19:28,040 [elasticsearch[Lighting Rod][transport_client_worker][T#5]{New I/O worker #5}] INFO  SenderThread2 - OK2: On ES side = 4558,    Our side MS: 4882,      diff: 324
2015-07-02 18:19:28,476 [elasticsearch[Lighting Rod][transport_client_worker][T#5]{New I/O worker #5}] INFO  SenderThread2 - OK2: On ES side = 4506,    Our side MS: 4552,      diff: 46
2015-07-02 18:19:29,298 [elasticsearch[Lighting Rod][transport_client_worker][T#4]{New I/O worker #4}] INFO  SenderThread2 - OK2: On ES side = 5215,    Our side MS: 5480,      diff: 265
2015-07-02 18:19:29,712 [elasticsearch[Lighting Rod][transport_client_worker][T#6]{New I/O worker #6}] INFO  SenderThread2 - OK2: On ES side = 5251,    Our side MS: 5693,      diff: 442
2015-07-02 18:19:30,222 [elasticsearch[Lighting Rod][transport_client_worker][T#4]{New I/O worker #4}] INFO  SenderThread2 - OK2: On ES side = 5943,    Our side MS: 6013,      diff: 70
java.lang.OutOfMemoryError: Java heap space
Dumping heap to /home/ElasticSearchSender-1.01-SNAPSHOT/java_pid16578.hprof ...
and next for the ours threads:
2015-07-02 18:09:25,185 [ElasticSearchSender-Thread-7-Client-7] INFO  SenderThread - OK1: On ES side = 3411,    Our side MS: 3470,      diff: 59
2015-07-02 18:09:25,455 [ElasticSearchSender-Thread-5-Client-5] INFO  SenderThread - OK1: On ES side = 3653,    Our side MS: 3749,      diff: 96
2015-07-02 18:09:25,634 [ElasticSearchSender-Thread-8-Client-8] INFO  SenderThread - OK1: On ES side = 3781,    Our side MS: 3914,      diff: 133
2015-07-02 18:09:29,254 [ElasticSearchSender-Thread-1-Client-1] INFO  SenderThread - OK1: On ES side = 5352,    Our side MS: 5703,      diff: 351
2015-07-02 18:09:29,674 [ElasticSearchSender-Thread-6-Client-6] INFO  SenderThread - OK1: On ES side = 5592,    Our side MS: 5800,      diff: 208
2015-07-02 18:09:31,442 [ElasticSearchSender-Thread-4-Client-4] INFO  SenderThread - OK1: On ES side = 6248,    Our side MS: 6396,      diff: 148
2015-07-02 18:09:31,924 [ElasticSearchSender-Thread-7-Client-7] INFO  SenderThread - OK1: On ES side = 6300,    Our side MS: 6601,      diff: 301
2015-07-02 18:09:31,979 [ElasticSearchSender-Thread-3-Client-3] INFO  SenderThread - OK1: On ES side = 6779,    Our side MS: 6869,      diff: 90
2015-07-02 18:09:40,108 [ElasticSearchSender-Thread-8-Client-8] INFO  SenderThread - OK1: On ES side = 6605,    Our side MS: 14383,     diff: 7778
2015-07-02 18:09:40,108 [ElasticSearchSender-Thread-4-Client-4] INFO  SenderThread - OK1: On ES side = 1806,    Our side MS: 8575,      diff: 6769
2015-07-02 18:09:40,109 [ElasticSearchSender-Thread-5-Client-5] INFO  SenderThread - OK1: On ES side = 6797,    Our side MS: 14472,     diff: 7675
2015-07-02 18:09:40,118 [ElasticSearchSender-Thread-2-Client-2] INFO  SenderThread - OK1: On ES side = 7014,    Our side MS: 14792,     diff: 7778
2015-07-02 18:09:40,118 [ElasticSearchSender-Thread-1-Client-1] INFO  SenderThread - OK1: On ES side = 3760,    Our side MS: 10747,     diff: 6987
2015-07-02 18:09:40,118 [ElasticSearchSender-Thread-6-Client-6] INFO  SenderThread - OK1: On ES side = 3175,    Our side MS: 10261,     diff: 7086
2015-07-02 18:09:43,219 [ElasticSearchSender-Thread-7-Client-7] INFO  SenderThread - OK1: On ES side = 3037,    Our side MS: 3097,      diff: 60
2015-07-02 18:09:44,994 [ElasticSearchSender-Thread-1-Client-1] INFO  SenderThread - OK1: On ES side = 4545,    Our side MS: 4592,      diff: 47
2015-07-02 18:09:45,174 [ElasticSearchSender-Thread-4-Client-4] INFO  SenderThread - OK1: On ES side = 4578,    Our side MS: 4787,      diff: 209
2015-07-02 18:09:45,200 [ElasticSearchSender-Thread-3-Client-3] INFO  SenderThread - OK1: On ES side = 4766,    Our side MS: 4812,      diff: 46
2015-07-02 18:09:45,214 [ElasticSearchSender-Thread-2-Client-2] INFO  SenderThread - OK1: On ES side = 4763,    Our side MS: 4814,      diff: 51
2015-07-02 18:09:45,214 [ElasticSearchSender-Thread-5-Client-5] INFO  SenderThread - OK1: On ES side = 4785,    Our side MS: 4840,      diff: 55
2015-07-02 18:09:45,497 [ElasticSearchSender-Thread-8-Client-8] INFO  SenderThread - OK1: On ES side = 4860,    Our side MS: 5074,      diff: 214
2015-07-02 18:09:45,503 [ElasticSearchSender-Thread-6-Client-6] INFO  SenderThread - OK1: On ES side = 4973,    Our side MS: 5091,      diff: 118
2015-07-02 18:09:46,987 [ElasticSearchSender-Thread-7-Client-7] INFO  SenderThread - OK1: On ES side = 3540,    Our side MS: 3585,      diff: 45
2015-07-02 18:09:48,709 [ElasticSearchSender-Thread-1-Client-1] INFO  SenderThread - OK1: On ES side = 3514,    Our side MS: 3629,      diff: 115
2015-07-02 18:09:50,491 [ElasticSearchSender-Thread-3-Client-3] INFO  SenderThread - OK1: On ES side = 4849,    Our side MS: 4903,      diff: 54
2015-07-02 18:09:50,494 [ElasticSearchSender-Thread-2-Client-2] INFO  SenderThread - OK1: On ES side = 4844,    Our side MS: 4891,      diff: 47
I believe, that this is a possible to save much quickly that 4-5s for 1.5 mb... Please, tell me what is wrong with our solution?
ES config
index.number_of_shards: 5
index.number_of_replicas: 1
path.conf: /home/elasticsearch-1.6.0/config
bootstrap.mlockall: true
#index
indices.memory.index_buffer_size: 30%
index.store.type: mmapfs
#index.store.type: niofs
index.translog.flush_threshold_ops: 50000
index.refresh_interval: -1
indices.memory.min_shard_index_buffer_size: 100mb
indices.memory.min_index_buffer_size: 100mb
#throttle
index.store.throttle.max_bytes_per_sec: 60mb
indices.store.throttle.type: none
threadpool.bulk.queue_size: 3000
#indices.fielddata.cache.size: 25%
cluster.routing.allocation.disk.watermark.low: 80%
cluster.routing.allocation.disk.watermark.high: 50gb
cluster.info.update.interval: 1m
index.warmer.enabled: false
Search pool
threadpool.search.type: fixed
threadpool.search.size: 20
threadpool.search.queue_size: 100
Bulk pool
threadpool.bulk.type: fixed
#threadpool.bulk.size: 60
threadpool.bulk.queue_size: 3000
Index pool
threadpool.index.type: fixed
threadpool.index.size: 20
threadpool.index.queue_size: 100
Cache Sizes
indices.fielddata.cache.size: 15%
indices.fielddata.cache.expire: 6h
indices.cache.filter.size: 15%
indices.cache.filter.expire: 6h
index.merge.scheduler.max_thread_count: 1
bulk.udp.enabled: true
bulk.udp.host: "localhost"
marvel.agent.exporter.es.hosts: "http://10.1.24.93:9200"
thank you very much!