summaryrefslogtreecommitdiff
path: root/experiment/scripts/shard.sh
diff options
context:
space:
mode:
Diffstat (limited to 'experiment/scripts/shard.sh')
-rwxr-xr-xexperiment/scripts/shard.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/experiment/scripts/shard.sh b/experiment/scripts/shard.sh
index 4160c5d..921605f 100755
--- a/experiment/scripts/shard.sh
+++ b/experiment/scripts/shard.sh
@@ -25,7 +25,7 @@ function setup_config() {
fi
# Get hardware info to tune in postgresql.conf
- SHARED_MEM=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo) / 3 ))
+ SHARED_MEM=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo) / 4 ))
CACHE_SIZE=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo) * 3/4))
NUM_CPU=$(lscpu | grep "CPU(s)" | head -n 1 | awk '{print $2}')
@@ -41,6 +41,9 @@ function setup_config() {
sysctl -p
fi
+ # disable swap
+ swapoff -a
+
# Configure postgres with an additional file and include this
# in the main configuration
echo "