Version : 1.6.5
Storage : AWS S3
DB : H2
Search seems to have slowed down as well. In 1.6.2, search usually takes about 3 seconds but now it takes 10 to 30 seconds to return results.
Version : 1.6.5
Storage : AWS S3
DB : H2
Search seems to have slowed down as well. In 1.6.2, search usually takes about 3 seconds but now it takes 10 to 30 seconds to return results.
There are a couple of reasons for this. But the one you are running into most likely together with your other thread ( Getfolders api call takes a long time ) is that you are running out of memory or did not adjust memory usage.
Now that I see that you are using the embedded database (H2) it is even more important to fine tune memory. I suggest the following:
Hope this helps.
Thanks once again for replying Nitai. I’m not sure if it’s H2. We’ve been on H2 with 1.6.2 and things were really rock solid for our current load until I upgraded to 1.6.5.
For your info, the razuna instance is running in an AWS EC2 m3.2xlarge instance with 15GB of memory. Since 1.6.2, the instance is configured as per the instructions on the wiki pages.
This is what our setenv.sh looks like.
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib
export LD_LIBRARY_PATH
export JAVA_OPTS="-Xms2000m -Xmx9000m"
CATALINA_OPTS="$CATALINA_OPTS -server -Xms2000m -Xmx9000m -Djava.awt.headless=true -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -XX:+PrintGCDateStamps -XX:-OmitStackTraceInFastThrow"
PRGDIR=dirname $0
RAZUNA_MAX_PERM_SIZE=256m
if [ -f “${PRGDIR}/permgen.sh” ]; then
echo “Detecting JVM PermGen support…”
. ${PRGDIR}/permgen.sh
if [ $JAVA_PERMGEN_SUPPORTED = “true” ]; then
echo “PermGen switch is supported. Setting to ${RAZUNA_MAX_PERM_SIZE}”
CATALINA_OPTS="-XX:PermSize=${RAZUNA_MAX_PERM_SIZE} -XX:MaxPermSize=${RAZUNA_MAX_PERM_SIZE} ${CATALINA_OPTS}"
else
echo “PermGen switch is NOT supported and will NOT be set automatically.”
fi
fi
export CATALINA_OPTS
Just a thought. Could indexing have anything to do with search slowing down ?
It’s a fresh install and we have a lot of assets. It’s hard to tell even whether all the assets have already been indexed.
H2 is a Java database and is using the same memory space as Razuna. If you run into memory issues my recommended advise is to move the data to another server process, hence MySQL.
9GB memory allocation is way too high and most likely you are causing an overallocation and thus a slow down. I recommend to change the whole memory allocation to this:
CATALINA_OPTS="-server -Xss1G -Xms3G -Xmx3G -XX:NewSize=1G -Xincgc $CATALINA_OPTS"
You should set Xms and Xmx to the same value for best performance. Additionally, set the value for “RAZUNA_MAX_PERM_SIZE” to “1024m”.
Regarding indexing, this could cause a slow down, but as mentioned above it has to do something with the memory allocation. I would apply these and restart the server. You should immediately see a performance boost.
Thank you so much for sharing this. I did see marked improvement in page load time. Search would work after restart but after a few minutes it would stop working. It would either time out or take a long time to return any results.
What I ended up doing and it seems to have worked is to delete the scheduled task that indexes new content. I had configured this to run every 15 minutes.
After deleting the scheduled task, search works flawlessly and does not time out.
This was not a problem before with 1.6.2 not sure if it’s because this is a newly migrated instance.
Should I run a scheduled task to rebuild the search index ?
I see. The schedule task engine gets sometimes out of sync. I did not think of this earlier. Glad you figured it out.
Only run the re-index if you see that search results are out of sync. Please note, that re-indexing the while database assets can take a considerable time to finish and takes up a lot of resources (depending on the amount of files).