voltdb安装及使用

1、下载voltdb后直接解压:

$ tar -zxvf LINUX-voltdb-ent-3.6.tar.gz

2、两点注意事项,切记切记:

1.1.

Disable Swapping

Swapping is an operating system feature that optimizes memory usage when running multiple processes. However, memory is a critical component of the VoltDB server process. Any contention for memory, including swapping, will have a very negative impact on performance and functionality.

We recommend using dedicated servers and disabling swapping when running the VoltDB database server process. Use the swapoff command to disable swapping on Linux systems. If swapping cannot be disabled for any reason, you can reduce the likelihood of VoltDB being swapped out by setting the kernel parameter vm.swappiness to zero.

voltdb是内存数据库,常驻内存非常重要,因此需要将交换分区(虚拟内存)完全关闭。可以使用swapoff命令关闭,如果无法使用swapoff命令,则将内核参数vm.swappiness修改为0。

1.2.

Turn off TCP segmentation offload and generic receive offload if cluster stability is a problem.

There is an issue where, under certain conditions, the use of TCP segmentation offload (TSO) and generic receive offload (GRO) can cause nodes to randomly drop out of a cluster. The symptoms of this problem are that nodes timeout — that is, the rest of the cluster thinks they have failed — although the node is still running and no other network issues (such as a network partition) are the cause.

Disabling TSO and GRO is recommended for any VoltDB clusters that experience such instability. The commands to disable offloading are the following, where N is replaced by the number of the ethernet card:

ethtool -K ethN tso off
ethtool -K ethN gro off

Note that these commands disable offloading temporarily. You must issue these commands every time the node reboots.

这个是使用集群时需要注意的事项。

3、如果是旧版本升级需要按以下顺序执行:

The process for upgrading VoltDB for a running database is as follows:

    Place the database in admin mode using the @Pause system procedure (or VoltDB Enterprise Manager).

    Perform a manual snapshot of the database (using @SnapShotSave).

    Shutdown the database (using @Shutdown).

    Upgrade VoltDB.

    Recompile the application catalog using the new version of VoltDB.

    Restart the database using the create option, the new catalog, and starting in admin mode (specified in the deployment file).

    Restore the snapshot created in Step #2 (using voltadmin restore).

    Return the database to normal operations (using voltadmin resume).

4、将voltdb添加至环境变量中.

JAVA_HOME=/opt/jdk1.7.0_40
VOLTDB_HOME=/opt/voltdb-3.5.0.1
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$VOLTDB_HOME/bin

export JAVA_HOME VOLTDB_HOME PATH

5、以下开始学习使用简单的voltdb命令。

先创建一个指定目录:helloworld

定义表结构:

CREATE TABLE HELLOWORLD (
   HELLO VARCHAR(15),
   WORLD VARCHAR(15),
   DIALECT VARCHAR(15) NOT NULL,
   PRIMARY KEY (DIALECT)
);
发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>