title: How to increase the performance of mass indexer in Hibernate Search
body: <p>I am running FullTextEntityManager.createIndexer() to create indexes in elasticsearch on a table that has around 400000 records.</p>
  
  <p>The time taken is really not acceptable. After searching in the internet I tried increasing the heap size (min 1g and max 6g), set the number of open file descriptors to 64000, still no good improvements. I have pasted down the measurements for different values for configuring the indexer:</p>
  
  <pre><code>Threads Batch Time    ESmin  ESmax
  10       30     7min
  10       100    5min
  10       1000   5min
  20       100    4min
  20       1000   9min
  5        500    6min
  20       500    4min    1g    6g 
  10       500    4min    1g    6g  
  5        1000   6min    1g    6g
  10       1000   5min    1g    6g 
  </code></pre>
  
  <p>This was just a poc, the production data has a billion records. Could someone please give me some inputs on what can be done to increase the performance to an acceptable level.</p>
  
  <p>Please note that on hibernate I am using cp30 connection pooling, with the settings as shown below:</p>
  
  <pre><code>&lt;property name="hibernate.c3p0.min_size" value="5"/&gt;
  &lt;property name="hibernate.c3p0.max_size" value="20"/&gt;
  &lt;property name="hibernate.c3p0.timeout" value="1800"/&gt;
  &lt;property name="hibernate.c3p0.max_statements" value="50"/&gt;
  </code></pre>
  
  <p>Thanks!!!</p>