Child pages
  • Ramdisk Java

Versions Compared

Key

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

...

Use the following command to install the Squash FS tools.

 

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

...

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

Edit your /etc/fstab and define your mount point as a tmpfs by adding the following declarations:

Code Block
languagetext
# change the default size for the ramdisk
tmpfs /media/ramdisk-java-8-oracle tmpfs defaults,size=350M,mode=1777 0 0
/usr/lib/jvm/ramdisk/java-1.8.0.91-oracle.sqsh /media/ramdisk-java-8-oracle squashfs ro,defaults,loop 0 0

If you reboot at this point you will have a ramdisk of 350M defined at /media/ramdisk-java-8-oracle filled with your squashed JVM:

Code Block
languagebash
themeEmacs
user@machine:/media$ du -hs ramdisk-java-8-oracle/
349M ramdisk-java-8-oracle/

That way we know how correctly size what we need for our ramdisk.

350M for a java-1.8.0.91 from Oracle.

Installation

At this point you need to reboot to initialize the define and initialize the ramdisk with your Squashed JVM.