This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. String Deduplication of G1 Garbage collector to Save Memory from Duplicate String in Java 8 | |
String deduplication is not enabled by default in Java 8 JVM. You can enable String deduplication feature | |
by using -XX:+UseStringDeduplication option. Unfortunately, String deduplication is only available for the | |
G1 garbage collector, so if you are not using G1 GC then you cannot use the String deduplication feature. | |
It means just providing -XX:+UseStringDeduplication will not work, you also need to turn on G1 garbage collector | |
using -XX:+UseG1GC option. String deduplication also doesn't consider relatively young String for processing. | |
The minimal age of processed String is controlled by -XX:StringDeduplicationAgeThreshold=3 option. | |
The default value of this parameter is 3. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get dist-upgrade | |
sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus | |
sudo apt-get install build-essential libncursesw5-dev libgdbm-dev libc6-dev | |
sudo apt-get install zlib1g-dev libsqlite3-dev tk-dev libbz2-dev libreadline6-dev ncurses-dev | |
sudo apt-get install tcl-dev tk-dev python-tk python3-tk blt-demo tix python-tk-dbg python3-tk-dbg | |
sudo apt-get install libssl-dev openssl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.tar.gz | |
sudo mkdir /opt/jdk | |
tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk | |
ls /opt/jdk | |
update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_05/bin/java 100 | |
update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_05/bin/javac 100 | |
java -version | |
update-alternatives --install /usr/bin/java java /opt/jdk/jdk.new.version/bin/java 110 | |
update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk.new.version/bin/javac 110 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# KEEP UBUNTU OR DEBIAN UP TO DATE | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get -y dist-upgrade | |
sudo apt-get -y autoremove | |
#INSTALL THE DEPENDENCIES | |