Performance issue django/haystack + elasticsearch on ec2's


(Paul Bormans) #1

For a new website i'm setting up i deploy nginx/gunicorn/django/haystack on a webserver instance; currently a t2.small. ES is running on a seperate instance which is currently a t2.micro. (I think this should for now not be a problem since i'm only having 17K documents; the head plugin tells me the index is currently 663Mi). Now a query on it's own is fast enough (ms's) but getting the results to haystack takes seconds.

My question is as follows:

  • How can i best measure/proof where the performance issue really is?
  • Can i return only a subset of documents; e.g. there are translated fields, obviously i only need one.
  • What is the best practice of deployment of es on ec2? Seperate node or deploy on webserver instance?

Thanks for any tips,
Paul


(Mark Walkom) #2

Well, it's a t2.micro :stuck_out_tongue:

How do you know the query takes ms? If you are confident that is the case then it's likely not to be ES.


(Paul Bormans) #3

Mark,

From the logging i got the full query statement, with facets and all. I just entered that in a sense-session. In the response a 'took' attribute is mentioned which i assume is the spend time to run the query by ES, it's on 11(ms).

I actually do not think the issue is within ES, but then still i have many candidates; the t2-micro performance obviously is a candidate. But also the I/O between the instances, haystack, size of documents, etc...

I'm posting on this forum to see from ES perspective what i can do to investigate this further?

Paul


(system) #4