Skip to content

Instantly share code, notes, and snippets.

@surjikal
Last active May 7, 2017 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save surjikal/3b5da4104bf9ade63ae9b6a3b5e77c37 to your computer and use it in GitHub Desktop.
Save surjikal/3b5da4104bf9ade63ae9b6a3b5e77c37 to your computer and use it in GitHub Desktop.
Vertica Ubuntu 14.04 Notes
su dbadmin
admintools -t create_db -d <dbname> --hosts localhost
admintools -t start_db -d <dbname>
vsql -h 127.0.0.1 -d <dbname> -U dbadmin
apt-get install dialog
# Disable transparent_hugepage, and run on every boot
cat <<EOF > /etc/rc.local
#!/bin/sh -e
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
sysctl vm.swappiness=1
exit 0
EOF
# Not sure about this one...
mkdir -p /db/vertica
/opt/vertica/sbin/install_vertica –-hosts 127.0.0.1 –-data-dir /db/vertica/
/opt/vertica/sbin/install_vertica --hosts 127.0.0.1 --failure-threshold FAIL
# create swap file
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile none swap sw 0 0" >> /etc/fstab
# Read-ahead size must be increased
blockdev --setra 2048 /dev/sda
# Some optimizations
# https://thisdataguy.com/2013/09/11/vertica-optimisation-part-1-system/
# This might help tune the scheduler to give better performance
echo 'deadline' > /sys/block/sda/queue/scheduler
# Add 'noatime' to data partition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment