How to increase query performance?

Hello everyone,

In my current setup I have a 2 node elasticsearch cluster (EC2 m1.medium
machines),
and the need of making a 100+ query batch at certain times in my
application.
The queries follow this structure:
http://pastebin.com/HbZSET16
But may vary in the number of conditions inside the "must" or the "should"
(as a general rule it will not exceed, say, 6 conditions).
The Example on pastebin has 3 conditions, which are "has_child" queries,
each running on a different child type (we may assume that this will always
be the case).
Running 60 of those queries took 15 seconds, which is too slow for my
application, is there any way to speed it up?
The obvious question being: Putting more and more powerful machines on the
cluster (say, 10 xlarge machines) will speed this process up? could I
achieve a < 5s time?

Thanks in advance,
Matheus Salvia

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAOJV22YWTLDN%2B4vcVOajFj335Q_DzunNfacDT1q1mLPhc_N%3DuQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi,

Yes, adding/upgrading nodes should decrease the time for each query. While
adding nodes, adding more replicas should help support more concurrent
queries. Which should also decrease your total time because you seem to
have many queries running at once.

Since you're on EC2, it should be pretty easy to add some more nodes to
your cluster and do a quick test to see how much better performance gets.
On Dec 2, 2013 6:21 PM, "Matheus Salvia" matheus2740@gmail.com wrote:

Hello everyone,

In my current setup I have a 2 node elasticsearch cluster (EC2 m1.medium
machines),
and the need of making a 100+ query batch at certain times in my
application.
The queries follow this structure:
http://pastebin.com/HbZSET16
But may vary in the number of conditions inside the "must" or the "should"
(as a general rule it will not exceed, say, 6 conditions).
The Example on pastebin has 3 conditions, which are "has_child" queries,
each running on a different child type (we may assume that this will always
be the case).
Running 60 of those queries took 15 seconds, which is too slow for my
application, is there any way to speed it up?
The obvious question being: Putting more and more powerful machines on the
cluster (say, 10 xlarge machines) will speed this process up? could I
achieve a < 5s time?

Thanks in advance,
Matheus Salvia

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAOJV22YWTLDN%2B4vcVOajFj335Q_DzunNfacDT1q1mLPhc_N%3DuQ%40mail.gmail.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHXA0_1YrvZJQ_W5ro21NiBM8D2deKyYcXGjmj2GY5o4BLPNzg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

I have found ec2 to be pretty poor in terms of performance. It is really handy for scaling up and down, but mot so good for speed. This is even more the case if you want your data on ebs, which is handy but non-local.
Have you you considered different hosting options. You can get 1 month deals from linode, and hetzner has eur99/month dedicated servers.
You might find this type of setup easier to manage than a cluster of machines...

Cheers

James

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3e88c92f-4883-4920-bd68-a120444cdf46%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.