Back

Clear Linux* for Intel® Architecture studying notes

hilaolu

hilaolu

February 3, 2018

Clear Linux* seems to have fantastic performance in some tests.I would like to use it for my next gen Minecraft server.But the offical documents are poor,and there isn't a large community either.So I can hardly believe this project started two years ago.Here are some notes about how to configure and optimize it.

Install ServerJRE

cd /tmp
wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/server-jre-8u162-linux-x64.tar.gz --no-check-certificate
#you need to generate a download link yourself
tar xzvf server*
mkdir /opt/jdk
mv jdk1.8.0_162 /opt/jdk/jdk1.8.0_162
ln -s /opt/jdk/jdk1.8.0_162/bin/java /usr/bin/java
java -version

Configure Hugepage

nano /usr/share/security/limits.conf

with

*  soft   memlock    512000
*  hard   memlock    512000

In KB,then

nano /usr/lib/sysctl.d/50-default.conf

Add vm.nr_hugepages=200,then

reboot
grep HugePages /proc/meminfo

Switch to low I/O scheduler on SSD

nano /usr/lib/kernel/cmdline-{linux-kernel-version}.native

Add elevator=noop,then

clr-boot-manager update

Open TRIM for SSD

nano /etc/fstab

Fill with /dev/sdaX / ext4 rw,noatime,discard,stripe=256,data=ordered 0 0.

Enable sftp-server

nano /etc/ssh/sshd_config

Fill with Subsystem sftp /usr/libexec/sftp-server,then

systemctl restart sshd
Comment has been closed