You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -886,26 +886,28 @@ OpenGroks Travis is here: https://travis-ci.org/OpenGrok/OpenGrok
886
886
10. Tuning OpenGrok for large code bases
887
887
---------------------------------------
888
888
889
-
While indexing big source repos you might consider using ZFS filesystem to give
889
+
While indexing big source repos you might consider using ZFS filesystem to give
890
890
you advantage of datasets which can be flipped over or cloned when needed.
891
-
If the machine is strong enough it will also give you an option to
891
+
If the machine is strong enough it will also give you an option to
892
892
incrementally index in parallel to having the current sources and index in sync.
893
-
(So tomcat sees certain zfs datasets, then you just stop it, flip datasets to
894
-
the ones that were updated by SCM/index and start tomcat again - outage is
893
+
(So tomcat sees certain zfs datasets, then you just stop it, flip datasets to
894
+
the ones that were updated by SCM/index and start tomcat again - outage is
895
895
minimal, sources+indexes are ALWAYS in sync, users see the truth)
896
896
897
-
OpenGrok script by default uses 2G of heap and 16MB per thread for flush size of
897
+
OpenGrok script by default uses 2G of heap and 16MB per thread for flush size of
898
898
lucene docs indexing(when to flush to disk).
899
899
It also uses default 32bit JRE.
900
900
This MIGHT NOT be enough. You might need to consider this:
901
901
Lucene 4.x sets indexer defaults:
902
+
902
903
DEFAULT_RAM_PER_THREAD_HARD_LIMIT_MB = 1945;
903
904
DEFAULT_MAX_THREAD_STATES = 8;
904
-
DEFAULT_RAM_BUFFER_SIZE_MB = 16.0;
905
+
DEFAULT_RAM_BUFFER_SIZE_MB = 16.0;
906
+
905
907
- which might grow as big as 16GB (though DEFAULT_RAM_BUFFER_SIZE_MB shouldn't
906
908
really allow it, but keep it around 1-2GB)
907
909
908
-
- the lucenes RAM_BUFFER_SIZE_MB can be tuned now using the parameter -m, so
910
+
- the lucenes RAM_BUFFER_SIZE_MB can be tuned now using the parameter -m, so
909
911
running a 8GB 64 bit server JDK indexer with tuned docs flushing(on Solaris 11):
910
912
911
913
# export JAVA=/usr/java/bin/`isainfo -k`/java
@@ -914,7 +916,7 @@ running a 8GB 64 bit server JDK indexer with tuned docs flushing(on Solaris 11):
914
916
# OPENGROK_FLUSH_RAM_BUFFER_SIZE="-m 256" ./OpenGrok index /source
915
917
916
918
Tomcat by default also supports only small deployments. For bigger ones you
917
-
MIGHT need to increase its heap which might necessitate the switch to 64-bit
919
+
MIGHT need to increase its heap which might necessitate the switch to 64-bit
918
920
Java. It will most probably be the same for other containers as well.
919
921
For tomcat you can easily get this done by creating conf/setenv.sh:
920
922
@@ -931,7 +933,7 @@ For tomcat you can easily get this done by creating conf/setenv.sh:
931
933
export JAVA_OPTS
932
934
933
935
934
-
For tomcat you might also hit a limit for http header size (we use it to send
936
+
For tomcat you might also hit a limit for http header size (we use it to send
935
937
the project list when requesting search results):
936
938
- increase(add) in conf/server.xml maxHttpHeaderSize
937
939
connectionTimeout="20000"
@@ -946,8 +948,12 @@ The same tuning to Apache can be done with the LimitRequestLine directive:
946
948
LimitRequestFieldSize 65536
947
949
948
950
Open File hard and soft limits
949
-
The initial index creation process is resource intensive and often the error "java.io.IOException: error=24, Too many open files" appears in the logs. To avoid this increase the ulimit value to a higher number.
950
-
It is noted that the hard and soft limit for open files of 10240 works for mid sized repositores and so the recommendation is to start with 10240.
951
+
The initial index creation process is resource intensive and often the error
952
+
"java.io.IOException: error=24, Too many open files" appears in the logs. To
953
+
avoid this increase the ulimit value to a higher number.
954
+
955
+
It is noted that the hard and soft limit for open files of 10240 works for mid
956
+
sized repositores and so the recommendation is to start with 10240.
951
957
952
958
11. Authors
953
959
-----------
@@ -965,9 +971,10 @@ Vladimir Kotal, Oracle. http://blogs.oracle.com/vlad/
0 commit comments