Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions datafusion-partitioned/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ bash rust-init.sh -y
export HOME=${HOME:=~}
source ~/.cargo/env

WITH_SWAP=false

if [ $(free -g | awk '/^Mem:/{print $2}') -lt 12 ]; then
echo "LOW MEMORY MODE"
# Enable swap if not already enabled. This is needed both for rustc and until we have a better
Expand All @@ -17,6 +19,7 @@ if [ $(free -g | awk '/^Mem:/{print $2}') -lt 12 ]; then
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
WITH_SWAP=true
fi
fi

Expand All @@ -41,3 +44,9 @@ echo "Run benchmarks for single parquet and partitioned"

echo "Load time: 0"
echo "Data size: $(du -bcs partitioned | grep total)"

if [ "$WITH_SWAP" = true ]; then
echo "Disable swap"
sudo swapoff /swapfile
sudo rm /swapfile
fi
9 changes: 9 additions & 0 deletions datafusion/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ bash rust-init.sh -y
export HOME=${HOME:=~}
source ~/.cargo/env

WITH_SWAP=false

if [ $(free -g | awk '/^Mem:/{print $2}') -lt 12 ]; then
echo "LOW MEMORY MODE"
# Enable swap if not already enabled. This is needed both for rustc and until we have a better
Expand All @@ -17,6 +19,7 @@ if [ $(free -g | awk '/^Mem:/{print $2}') -lt 12 ]; then
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
WITH_SWAP=true
fi
fi

Expand All @@ -41,3 +44,9 @@ echo "Run benchmarks"

echo "Load time: 0"
echo "Data size: $(du -bcs hits.parquet)"

if [ "$WITH_SWAP" = true ]; then
echo "Disable swap"
sudo swapoff /swapfile
sudo rm /swapfile
fi