logzio / elasticsearch-stress-test

Stress test tool for Elasticsearch
Apache License 2.0
271 stars 110 forks source link

Not generating load #8

Closed neeraj20gupta closed 7 years ago

neeraj20gupta commented 7 years ago

Sample o/p on script run

Starting initialization of 127.0.0.1 Done! Creating indices.. Cluster timeout.... Cleaning up created indices.. Starting the test. Will print stats every 15 seconds. The test would run for 300 seconds, but it might take a bit more because we are waiting for current bulk operation to complete.

Test is done! Final results: Elapsed time: 10 seconds Successful bulks: 0 (0 documents) Failed bulks: 0 (0 documents) Indexed approximately 0 MB which is 0.00 MB/s

roiravhon commented 7 years ago

I think the sentence "Cluster timeout...." is the key here. Might be ES 5? I think this tool has some issues with it, PRs are welcomed :)

neeraj20gupta commented 7 years ago

I am running it on ES 2.4. Also its a single node cluster Below is the command

python elasticsearch-stress-test.py --es_address 127.0.0.1 --indices 10 --documents 10 --clients 1 --seconds 300 --number-of-shards 1 --number-of-replicas 0 --bulk-size 5000 --max-fields-per-document 10 --max-size-per-field 50 --no-cleanup --stats-frequency 15

roiravhon commented 7 years ago

Just making sure, running curl 127.0.0.1:9200 works?

neeraj20gupta commented 7 years ago

Yes. Below is the output

{
  "name" : "Mark Todd",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "UKU0_X6_RB2uiMTicqo_sA",
  "version" : {
    "number" : "2.4.1",
    "build_hash" : "c67dc32e24162035d18d6fe1e952c4cbcbe79d16",
    "build_timestamp" : "2016-09-27T18:57:55Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.2"
  },
  "tagline" : "You Know, for Search"
}
roiravhon commented 7 years ago

Can you try to add some prints around the timeout exception?

ZeroWiggliness commented 7 years ago

The problem I had was that line 373: map(lambda thread: thread.start(), clients) wasn't starting the threads (Ubuntu 16:04). Replaced with
for d in clients: d.start()

And it works. I have other issues but probably that's due to ES5.

Sorry company policy doesn't allow me to do changes to open source code and feed it back.

roiravhon commented 7 years ago

Too bad to hear :) If you can paste here a summary of the needed changes when you get it to work - would be great.

ZeroWiggliness commented 7 years ago

Only changes were to increase the maxsize to 25 and timeout to 30s for the elasticsearch library. Otherwise I got lots of timeouts all the time. Added extra stats for myself (documents/s etc) also as that's what i'm primarily interested in.

aboutte commented 7 years ago

10 has been merged....this issue can be closed.

roiravhon commented 7 years ago

Yep :) Thanks!

neeraj20gupta commented 7 years ago

Thanks :)