title: How to index records in Solr faster (and not impact ColdFusion web server)? Two JVM?
body: <p>I have a 64 bit server, 8 GB RAM, dual quad CPU. No resources are ever hitting 100% (except, I guess, the JVM -- right?).</p>
  
  <p>I need to index several million records for Solr, but the machine is in production. I recognize having a second machine for indexing would be helpful.</p>
  
  <p>Should I dedicate a second instance of the JVM, dedicated to Solr?</p>
  
  <p>Right now, when I run an index, pages which are normally served in 200 milliseconds will serve up in about 1.5 seconds, sometimes more... hitting, even, the dreaded "Service is Unavailable" error.</p>
  
  <p>I adjusted my JVM Heap as follows:</p>
  
  <pre><code>-Xmx1024m
  -XX:MaxPermSize256m
  </code></pre>
  
  <p>In case I'm chasing the wrong solution, allow me to broaden the landscape a bit. It seems that I can't affect the indexing speed of Solr. I had previously been indexing about 150,000 records per hour on a dev server virtualized on a workstation. In a production environment with much more hardware available, I'm indexing at the exact same speed.</p>
  
  <p>Without data to prove it, I think that my JVM adjustments did not speed up the indexing, although it may have allowed the CF server to continue serving pages. I must say, the indexing speed is terribly slow, but I do know that it's not a function of the data access layer. I rewrote it from pure ORM to objects backed by SQL Stored Procedures thinking that was the slowdown (no effect).</p>