title: Configure elasticsearch for high performance with SSD
body: <p>Before to move my elasticsearch cluster from HDD to SSD disks I decided to compare performance of these solutions. Results are absolutely unexpected for me: elasticsearch (ES) with hdd works a bit faster than ES with ssd.<br>
  I think I missed some important configurations.</p>
  
  <h2>How I tested it</h2>
  
  <p>All tests were run on Google Compute Engine virtual machines. Two machines were used (mark it as S and H):</p>
  
  <ul>
  <li>Both are n1-standard1 (1 cpu, 4G memory) with debian7</li>
  <li>Machine S has 10G SSD disk</li>
  <li>Machine H has 10G HDD disk</li>
  </ul>
  
  <p>Simple python script sends requests to one machine and saves statistic of average latency for each 20 seconds. Statistic for indexing and querying is saved separately. Search requests and indexed data are generated randomly but with the same parameters. Generated documents have the same properties with the same number of ascii symbols. Mapping of the document type is putted obviously. Script sends request in 10 threads for 3 hours.</p>
  
  <p>As recommended in the article at Elasticsearch official site, ES on H has one not default configuration:</p>
  
  <pre><code>index.merge.scheduler.max_thread_count: 1
  </code></pre>
  
  <p>(it allows to merge indexed data to the disk only in single thread)</p>
  
  <p>and ES on S has another not default configuration:</p>
  
  <pre><code>index.store.throttle.type: none
  </code></pre>
  
  <p>(which disables any restrictions on how many data can be merged to the disk per second)</p>
  
  <h2>Results</h2>
  
  <p>I expected that SSD will be noticeably faster than HDD.
  But results are:</p>
  
  <p><a href="https://www.dropbox.com/s/d9xx2ed36wxqxko/Querying.png?dl=0" rel="nofollow noreferrer">Querying</a> <br>
  <a href="https://www.dropbox.com/s/djhaor4fzig82eh/Indexing.png?dl=0" rel="nofollow noreferrer">Indexing</a></p>
  
  <p>(unfortunately I'm new on Stackoverflow and my reputation doesn't allow me to post images)</p>
  
  <p>Charts shows that in my case ES on HDD works a bit faster than ES on SSD.</p>
  
  <p>Partially it because I used remote SSD. But HDD is remote too. And Google documentation says that remote SSD is faster than HDD in times.</p>
  
  <p><a href="https://cloud.google.com/compute/docs/disks/#comparison_of_disk_types" rel="nofollow noreferrer">Comparison persistent SSD and HDD on compute engine</a>:<br></p>
  
  <p>Can somebody explain me what am I doing wrong? Which elasticsearch configurations should be set to use full SSD performance?</p>