Child pages
  • Ramdisk Java

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
themeEmacs
sudo apt-get update
sudo apt-get install squashfs-tools

Make a squashfs file out of your desired JVM:, use LZMA2 compression rather than gzip.

Code Block
languagebash
themeEmacs
cd /usr/lib/jvm
sudo mkdir ramdisk
mksquashfs /usr/lib/jvm/java-8-oracle /usr/lib/jvm/ramdisk/java-1.8.0.91-oracle.sqsh -comp xz

At this point you have an existing JVM squashed in .sqsh file with a roughly size of 176M:

Code Block
languagebash
themeEmacs
user@machine:/media$ ls --block-size=M -al /usr/lib/jvm/ramdisk/java-1.8.0.91-oracle.sqsh 
-rw-r--r-- 1 user users 176M May 12 15:53 /usr/lib/jvm/ramdisk/java-1.8.0.91-oracle.sqsh

Mount Point

Create a mountpoint for the ramdisk:

Code Block
languagebash
themeEmacs
sudo mkdir /media/ramdisk-java-8-oracle

...