On Wed, Apr 3, 2013 at 8:47 PM, Shawn Heisey <s...@elyograg.org> wrote: > On 4/2/2013 3:09 AM, Dotan Cohen wrote: >> I notice that this only occurs on queries that run facets. I start >> Solr with the following command: >> sudo nohup java -XX:NewRatio=1 -XX:+UseParNewGC >> -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled >> -Dsolr.solr.home=/mnt/SolrFiles100/solr -jar >> /opt/solr-4.1.0/example/start.jar & > > It looks like you've followed some advice that I gave previously on how > to tune java. I have since learned that this advice is bad, it results > in long GC pauses, even with heaps that aren't huge. >
I see, thanks. > As others have pointed out, you don't have a max heap setting, which > would mean that you're using whatever Java chooses for its default, > which might not be enough. If you can get Solr to successfully run for > a while with queries and updates happening, the heap should eventually > max out and the admin UI will show you what Java is choosing by default. > > Here is what I would now recommend for a beginning point on your Solr > startup command. You may need to increase the heap beyond 4GB, but be > careful that you still have enough free memory to be able to do > effective caching of your index. > > sudo nohup java -Xms4096M -Xmx4096M -XX:+UseConcMarkSweepGC > -XX:CMSInitiatingOccupancyFraction=75 -XX:NewRatio=3 > -XX:MaxTenuringThreshold=8 -XX:+CMSParallelRemarkEnabled > -XX:+ParallelRefProcEnabled -XX:+UseLargePages -XX:+AggressiveOpts > -Dsolr.solr.home=/mnt/SolrFiles100/solr -jar > /opt/solr-4.1.0/example/start.jar & > Thank you, I will experiment with that. > If you are running a really old build of java (latest versions on > Oracle's website are 1.6 build 43 and 1.7 build 17), you might want to > leave AggressiveOpts out. Some people would argue that you should never > use that option. > Great, thank for the warning. This is what we're running, I'll see about updating it through my distro's package manager: $ java -version java version "1.6.0_27" OpenJDK Runtime Environment (IcedTea6 1.12.3) (6b27-1.12.3-0ubuntu1~12.04.1) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) -- Dotan Cohen http://gibberish.co.il http://what-is-what.com