Skip to content

Commit

Permalink
*) large memory pages will only be used if start script can confirm t…
Browse files Browse the repository at this point in the history
…hat Linux supports them or that the OS is Solaris, this should eliminate all sorts of weird behavior including not working shutdown

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5048 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
low012 committed Aug 10, 2008
1 parent a087090 commit f825e88
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion startYACY.sh
Expand Up @@ -79,7 +79,32 @@ done

#get javastart args
#JAVA_ARGS="";
JAVA_ARGS="-server -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+UseAdaptiveSizePolicy -XX:+UseLargePages";

#check if Linux system supports large memory pages or if OS is Solaris which
#supports large memory pages since version 9
#(according to http://java.sun.com/javase/technologies/hotspot/largememory.jsp)
ENABLEHUGEPAGES=0;

if [ $OS = "Linux" ]
then
HUGEPAGESTOTAL="`cat /proc/meminfo | grep HugePages_Total | sed s/[^0-9]//g`"
if [ -n "$HUGEPAGESTOTAL" ] && [ $HUGEPAGESTOTAL -ne 0 ]
then
ENABLEHUGEPAGES=1
elif [ $OS = "SunOS" ]
then
ENABLEHUGEPAGES=1
fi
fi


JAVA_ARGS="-server -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+UseAdaptiveSizePolicy";
#turn on support for large memory pages if supported by OS
if [ $ENABLEHUGEPAGES -eq 1 ]
then
JAVA_ARGS="$JAVA_ARGS -XX:+UseLargePages"
fi

#JAVA_ARGS="-verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails $JAVA_ARGS";

if [ ! -f $CONFIGFILE -a -f DATA/SETTINGS/httpProxy.conf ]
Expand Down

0 comments on commit f825e88

Please sign in to comment.