Jetty / Solr Volume Up

I am running Cygwin with Jetty and Solr431.

Here is the contents of my .bat file used to run Solr:

@echo off C: chdir C:\cygwin\bin bash -c "cd /cygdrive/c/Databases/apache-solr-3.5.0/example/; java -Dsolr.solr.home="./example-DIH/solr/" -jar start.jar" 

After starting all the time, an error is displayed in the console window:

Java memory space

How can I see how much heap space is allocated right now and how to increase it? I read that I need to add a parameter, for example -Xmx500M , to the start command, but I do not know where.

UPDATE

with jps command I found the correct PID.

Then I got these results. I thought column P show the allowed space as a heap, but I can’t see if my command parameters affected?

without launch options

jstat -gcutil 4932 5000

  S0 S1 EOP YGC YGCT FGC FGCT GCT 100,00 0,00 74,91 65,67 99,23 300 0,348 4 0,146 0,494 100,00 0,00 74,91 65,67 99,23 300 0,348 4 0,146 0,494 

with parameters

bash -c "cd / cygdrive / c / Databases / apache-solr-3.5.0 / example /; java -Dsolr.solr.home =". / example -DIH / solr / "-jar -Xmx200m -Xmx400m start.jar" jstat-gcutil 2548 5000

  S0 S1 EOP YGC YGCT FGC FGCT GCT 0,00 89,57 67,80 62,74 99,45 307 0,337 4 0,147 0,484 0,00 89,57 67,80 62,74 99,45 307 0,337 4 0,147 0,484 
+6
source share
1 answer

You need to add -Xmx500m just before start.jar .

Additional Information -

 Initial Heap size -Xms<size> Maximum Heap size -Xmx<size> 

To find out the heap size for the current current process, you need jstat -gc <pid> . See here for more details.

+7
source

Source: https://habr.com/ru/post/957425/


All Articles