# Installing ScyllaDB in AWS with DPDK enabled # Prerequisites: # - Red Hat Enterprise Linux 7.2 (HVM) # - Instance type that supports enhanced networking (see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enhanced_networking_instance_types) # - Secondary NIC installed via Network Interfaces in AWS # - Instance type with 2 hard drives for RAID0 array ########## DO THIS FIRST ################ # Fetch the latest linux kernel yum update -y yum install -y kernel-devel # REBOOT instance to load into new kernel ######################################### ######### Install DPDK ################## PCI_SLOT=00:04.0 NR_HUGEPAGES=64 yum install -y gcc pciutils curl http://dpdk.org/browse/dpdk/snapshot/dpdk-2.2.0.tar.gz -s | tar -xz -C /usr/local/ cd /usr/local/dpdk-2.2.0 make install T=x86_64-native-linuxapp-gcc modprobe uio insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko ./tools/dpdk_nic_bind.py --bind=igb_uio $PCI_SLOT for n in /sys/devices/system/node/node?; do echo $NR_HUGEPAGES > $n/hugepages/hugepages-2048kB/nr_hugepages done ######################################### ######### Create RAID0 Array ############ yum install mdadm -y umount /dev/xvdb yes | mdadm --create --verbose /dev/md0 --level=0 --name=MY_RAID --raid-devices=2 /dev/xvdb /dev/xvdc mkfs.xfs -f -K /dev/md0 mkdir /var/lib/scylla mount /dev/md0 /var/lib/scylla ######################################### ######### Install ScyllaDB ############## curl -s -o epel-release-latest-7.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -ivh epel-release-latest-7.noarch.rpm curl http://downloads.scylladb.com/rpm/centos/scylla.repo -s -o /etc/yum.repos.d/scylla.repo yum install scylla-server scylla-jmx scylla-tools -y ######################################### # Starts scylla in foreground to verify that DPDK is working cd /var/lib/scylla; /usr/bin/scylla --network-stack native --dpdk-pmd # Scylla needs to be started as 'root' in order to start in DPDK mode # Currently the 0.19 build of Scylla has an issue where systemctl will not start as root, even if USER is set to root in sysconfig # Additionally, the scylla_prepare script attempts to bind the NIC to driver 'uio_pci_generic' as opposed to 'igb_uio' # For these reasons, I was unable to start ScyllaDB in DPDK mode using systemctl