What a great news in „VoltDBRIEF January-February 2017“! New version of VoltDB is out. VoltDB is a one of brightest jewells in my „I-want-to-use-and-learn“ list of database solutions. With no doubt we will hear about this product in near future. Let’s have a look on Community edition.
There are lot of differencies between Enterprise and Community editions, anyway from „user“ perspective, the most important for Community is a need for compiling it from source. Sounds hard, right?! 🙂 Hopefully, there is a good document describing few basic things. My way:
1) Consolidate proper java(jdk) version in your computer. I have no reason to trust openjdk, so I’m using the one from Oracle:
1 2 3 4 5 6 7 8 9 10 11 |
[root@db2111 voltdb]# rpm -i /home/j/jdk-8u121-linux-x64.rpm Unpacking JAR files... tools.jar... plugin.jar... javaws.jar... deploy.jar... rt.jar... jsse.jar... charsets.jar... localedata.jar... [root@db2111 voltdb]# |
Java is installed in /usr/java („Indeed, Watson!“) and the only thing is to setup this one jdk as active one:
1 |
[root@db2111 java]# update-alternatives --config java |
There are 4 programs which provide ‚java‘.
1 2 3 4 5 6 7 8 9 |
Selection Command ----------------------------------------------- 1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java *+ 2 /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java 3 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java 4 /usr/java/jdk1.8.0_121/jre/bin/java Enter to keep the current selection[+], or type selection number: 4 [root@db2111 java]# |
Keeping on mind „don’t spend your time with garbage“, choosing proper one line is a matter of one second.
2) Next phase is to install all required packages for building VoltDB Community.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@db2111 ~]# wget https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm --2017-02-06 11:14:23-- https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm Resolving globalproxy.dhl.com... 165.72.0.21 Connecting to globalproxy.dhl.com|165.72.0.21|:8080... connected. Proxy request sent, awaiting response... 200 OK Length: 14540 (14K) [application/x-rpm] Saving to: “epel-release-6-8.noarch.rpm” 100%[====================================================================================>] 14,540 --.-K/s in 0.002s 2017-02-06 11:14:24 (5.97 MB/s) - “epel-release-6-8.noarch.rpm” saved [14540/14540] [root@db2111 ~]# rpm -Uvh epel*.rpm warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:epel-release ########################################### [100%] [root@db2111 ~]# yum -y install ant ant-nodeps ant-junit ant-scripts ant-javadoc ant-trax gcc gcc-c++ python valgrind ntp python26 git-all python-httplib2 python-setuptools python-devel ccache cmake bzip2 |
The last command will install a lot of dependencies, which are essentials!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
... Installed: ant-javadoc.x86_64 0:1.7.1-15.el6 ant-scripts.x86_64 0:1.7.1-15.el6 ccache.x86_64 0:3.1.6-2.el6 cmake.x86_64 0:2.8.12.2-4.el6 git-all.noarch 0:1.7.1-4.el6_7.1 python-httplib2.noarch 0:0.7.7-1.el6 Dependency Installed: cvsps.x86_64 0:2.2-0.6.b1.el6 emacs-git.noarch 0:1.7.1-4.el6_7.1 git-cvs.noarch 0:1.7.1-4.el6_7.1 git-email.noarch 0:1.7.1-4.el6_7.1 git-gui.noarch 0:1.7.1-4.el6_7.1 git-svn.noarch 0:1.7.1-4.el6_7.1 gitk.noarch 0:1.7.1-4.el6_7.1 perl-Authen-SASL.noarch 0:2.13-3.el6 perl-Digest-HMAC.noarch 0:1.01-22.el6 perl-Digest-SHA1.x86_64 0:2.12-2.el6 perl-GSSAPI.x86_64 0:0.26-6.el6 perl-IO-Socket-SSL.noarch 0:1.31-3.el6_8.2 perl-Net-LibIDN.x86_64 0:0.12-3.el6 perl-Net-SMTP-SSL.noarch 0:1.01-4.el6 perl-Net-SSLeay.x86_64 0:1.35-10.el6_8.1 perl-TermReadKey.x86_64 0:2.30-13.el6 subversion-perl.x86_64 0:1.6.11-15.el6_7 tcl.x86_64 1:8.5.7-6.el6 tk.x86_64 1:8.5.7-5.el6 Complete! [root@db2111 ~]# |
3) GIT time!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
[root@db2111 ~]# git clone https://github.com/VoltDB/voltdb.git Initialized empty Git repository in /root/voltdb/.git/ remote: Counting objects: 333817, done. remote: Compressing objects: 100% (210/210), done. remote: Total 333817 (delta 76), reused 0 (delta 0), pack-reused 333595 Receiving objects: 100% (333817/333817), 440.07 MiB | 545 KiB/s, done. Resolving deltas: 100% (226569/226569), done. [root@db2111 ~]# [root@db2111 ~]# cd voltdb/ [root@db2111 voltdb]# ant Buildfile: build.xml catalog: dbbpool_gen_check: .... buildbundles: default: BUILD SUCCESSFUL Total time: 17 minutes 14 seconds [root@db2111 voltdb]# |
4) Tiny kernel adjustment
Transparent huge pages are not supported by VoltDB, so we can disable this feature:
1 2 |
[root@db2111 bin]# echo never > /sys/kernel/mm/transparent_hugepage/enabled [root@db2111 bin]# echo never > /sys/kernel/mm/transparent_hugepage/defrag |
for current session or disable THP on a kernel modules level (GRUB parameter), so my line in /boot/grub/grub.conf looks like:
1 2 3 |
title Oracle Linux Server Unbreakable Enterprise Kernel (4.1.12-61.1.25.el6uek.x86_64) root (hd0,1) kernel /boot/vmlinuz-4.1.12-61.1.25.el6uek.x86_64 ro root=UUID=5c5bdb6d-4819-4793-9084-a569bfaa674b rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 transparent_hugepage=never KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet |
That would be fine in case you are not using RHEL/clone and its caveats.
There should be still background services which turn THP on.
Adepts for service name = ktune, tuned – so you just need to disable these services from starting.
4.5) Reboot your linux machine.
5) Happy VoltDB user 😉
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
[root@db2111 bin]# ./voltdb init nitializing VoltDB... _ __ ____ ____ ____ | | / /___ / / /_/ __ \/ __ ) | | / / __ \/ / __/ / / / __ | | |/ / /_/ / / /_/ /_/ / /_/ / |___/\____/_/\__/_____/_____/ -------------------------------- Build: 7.0 voltdb-7.0-39-g22231a2 Community Edition When using the INIT command, some deployment file settings (hostcount, voltdbroot path, and admin-mode) are ignored Initialized VoltDB root directory voltdbroot [root@db2111 bin]# ./voltdb start WARNING: Unsupported release: oracle release 6.8 Initializing VoltDB... _ __ ____ ____ ____ | | / /___ / / /_/ __ \/ __ ) | | / / __ \/ / __/ / / / __ | | |/ / /_/ / / /_/ /_/ / /_/ / |___/\____/_/\__/_____/_____/ -------------------------------- Build: 7.0 voltdb-7.0-39-g22231a2 Community Edition Loaded node-specific settings from voltdbroot/config/path.properties Connecting to VoltDB cluster as the leader... Host id of this node is: 0 Starting a new database cluster Initializing the database. This may take a moment... WARN: Strict java memory checking is enabled, don't do release builds or performance runs with this enabled. Invoke "ant clean" and "ant -Djmemcheck=NO_MEMCHECK" to disable. WARN: This is not a highly available cluster. K-Safety is set to 0. WARN: Durability is turned off. Command logging is off. Server Operational State is: NORMAL Server completed initialization. |
Server is up and running. Just two more notices:
a) client resides also in bin directory and it’s called „sqlcmd“
b) dashboard resides in http://<hostname>:8080, e.g.:
For further exploring this fantastic software I warmly recommend documentation section.
-a-