{"id":2371,"date":"2022-08-30T15:24:18","date_gmt":"2022-08-30T15:24:18","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/01\/05\/solr-performance-tomcat-high-load-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:24:18","modified_gmt":"2022-08-30T15:24:18","slug":"solr-performance-tomcat-high-load-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/solr-performance-tomcat-high-load-collection-of-common-programming-errors\/","title":{"rendered":"Solr performance (tomcat) &#8211; High load-Collection of common programming errors"},"content":{"rendered":"<p>First, 512MB is just a bit too little to run Solr 3.6 with Tomcat, Solr 4.0 may crash. I Used to run Solr 4.0 on EC2 micro, it has 613 MB ram. it was not enough to run a small Solr site (5-10 req\/s)<\/p>\n<p>To Run Solr safely, you will need the 1GB linode. But I do recommend a 2GB machine to run SOLR smoothly.<\/p>\n<p>On my 1.6GB SMall EC2 Server, I set SOLR max memory to 1.2GB, and leave the remaining 400MB for OS caching and other small services like monit, munin, ssh, apt-get, rsync, backups, etc.<\/p>\n<p>this is my JAVA_OPTS that I set on my .bashrc file:<\/p>\n<pre><code>export JAVA_HOME=\"\/usr\/lib\/jvm\/java-7-openjdk-amd64\/\"\nexport SOLR_HOME=\"\/mnt\/Solr\/Home\"\nexport CATALINA_HOME=\"\/mnt\/Tomcat\/Home\"\nexport LOGGING_CONFIG=\"-Djava.util.logging.config.file=\/dev\/null\"\nunset JAVA_OPTS\nexport JAVA_OPTS=\"$JAVA_OPTS -Xms1200m -Xmx1200m -server -d64 -XX:MaxPermSize=200m\"\nexport JAVA_OPTS=\"$JAVA_OPTS -Djava.awt.headless=true\"\nexport JAVA_OPTS=\"$JAVA_OPTS -Dsolr.solr.home=\/mnt\/Solr\/Home\"\n<\/code><\/pre>\n<p>Amazon EC2 CPU is very low compared to Linode, but I have great performance with it since Solr uses almost no CPU but a lot of ram&#8230; you could go with EC2 medium for a large Solr Server.<\/p>\n<p>PS. Also I noticed your Screenshot that you have the kswapd0 process that recorded a lot of CPU IO time. I have that issue with linode and it was because of an outdated kernel. you should reboot your maching with a newer kernel.<\/p>\n<p id=\"rop\"><small>Originally posted 2014-01-05 22:34:21. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>First, 512MB is just a bit too little to run Solr 3.6 with Tomcat, Solr 4.0 may crash. I Used to run Solr 4.0 on EC2 micro, it has 613 MB ram. it was not enough to run a small Solr site (5-10 req\/s) To Run Solr safely, you will need the 1GB linode. But [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2371","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2371","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2371"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2371\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2371"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2371"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}