On Github nizsheanez / git-presentation
Author - Alex Sharov
It's mean that we must have another world environment
Same
exec "$_RUNJDB" "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \ -classpath "$CLASSPATH" \ -sourcepath "$CATALINA_HOME"/../../java \ -Djava.security.manager \ -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \ -Dcatalina.base="$CATALINA_BASE" \ -Dcatalina.home="$CATALINA_HOME" \ -Djava.io.tmpdir="$CATALINA_TMPDIR" \ org.apache.catalina.startup.Bootstrap "$@" start
Query live cycle
Indexing live cycle. Transactional, Rest API
Objects which handle requests, contain cache etc
Solr kill Searcher object after requests limit or ttl
Object which handle inserts and updates. Transactional
max_results * max_concurrent_queriesotherwise will need refetch documents during the request.
Start from Hit Rate
Solr use LFU/LRU algorithms from cache invalidating. When you increase cache size you lose speed on Cache invalidation support
We must use cache when our data bigger than RAM Our data is less, we don't disturb HDD anyway. 2-20 ms before and after - depend of venture and weather
From Solr docs:
Note: This cache cannot be used as a source for autowarming because document IDs will change when anything in the index changes so they can't be used by a new searcher.
Java world usually don't use 'fork' command (From POSIX world). Java use MultiThreading.
N_threads = N_cpu * U_cpu * (1 + W / C)
N_threads - the optimal number of threads N_cpu - the number of prcessors; U_cpu - the target CPU utilization (1 if you want to use the full available resources) W / C - the ratio of wait time to compute time (0 for CPU-bound task, maybe 10 or 100 for slow I/O tasks)
-XX:+UseParallelGC and XX:ParallelGCThreads=n
-XX:+UseCompressedStrings
-XX:+UseCompressedOops
Move Solr consumers to same server with Solr instance Set 'cache=false' to range by float filters More threads for indexing If you have a lot of CPU and big response - turn on traffic compression(Tomcat/Jetty)
Slides - https://github.com/nizsheanez/lzd-solr-tune.git
Author - Alex Sharov