Aerospike数据库实战(四) -- Aerospike 安装部署

    xiaoxiao2021-03-26  11


    1 Aerospike Databases部署前准备工作

    尽量不要对ssd做RAID,RAID控制器会带来不必要的延迟如果必须做RAID,建议每块盘单独做RAID0。如果做了RAID,需要利用 LSI Mega CL 进行一些优化设置。参考:LSI Mega CLI: [[]]SSD硬盘不需要格式化,不需要挂载,直接attach到服务器母板上,Aerospike把SSD当raw disk使用。有些SSD需要预留部分空间给驱动控制器使用,这样能带来更好的性能。 对于intel CD S3500的SSD,Aerospike强烈建议进行分区,第一个分区79%,第二个分区21%。 使用第一个分区进行后面的ACT测试 SSD硬盘在第一次使用之前需要做清零操作,清零操作会清除SSD硬盘硬盘中的数据。新添加SSD硬盘对数据库存储容量进行扩容时,只需要对新添加的SSD硬盘做清零操作(参照下面信息进行清零操作)。 sudo dd if=/dev/zero of=/dev/<deviceID> bs=1M&

    出现提示:No space left on device or an out of space error 说明硬盘清零操作完毕。

    2 Aerospike Databases部署步骤

    依赖环境安装 sudo yum install openssl-devel sudo yum install gcc gcc-c++ server端安装步骤 wget -O aerospike.tgz '' tar -xvf aerospike.tgz cd aerospike-server-community-*-el6 sudo ./asinstall # will install the .rpm packages sudo service aerospike start sudo tail -f /var/log/aerospike/aerospike.log | grep cake

    wait for it. "service ready: soon there will be cake!"

    关闭Aerospike Databases节点机器之间的防火墙参考下面配置,修改Aerospike Server端conf文件。 service { user root group root paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1. pidfile /var/run/aerospike/ service-threads 32 transaction-queues 32 transaction-threads-per-queue 3 proto-fd-max 100000 fabric-workers 96 microbenchmarks true } logging { # Log file must be an absolute path. file /var/log/aerospike/aerospike.log { context any info } } network { service { address any port 3000 } heartbeat { mode multicast address port 9918 #interface-address # To use unicast-mesh heartbeats, remove the 3 lines above, and see # aerospike_mesh.conf for alternative. # #mode mesh #port 3002 #mesh-seed-address-port 3002 #mesh-seed-address-port 3002 interval 150 timeout 20 } fabric { port 3001 } info { port 3003 } } namespace test { replication-factor 2 memory-size 75G default-ttl 30d # 30 days, use 0 to never expire/evict. high-water-memory-pct 90 high-water-disk-pct 90 # Warning - legacy data in defined raw partition devices will be erased. # These partitions must not be mounted by the file system. storage-engine device { # Use one or more lines like those below with actual device paths. device /dev/sdb1 #device /dev/sdc1 #device /dev/fioa # The 2 lines below optimize for SSD. scheduler-mode noop write-block-size 128K # Use the line below to store data in memory in addition to devices. # data-in-memory true } } 启动Aerospike Databases sudo service aerospike start 或者 sudo /etc/init.d/aerospike start