bind to different nodes

This commit is contained in:
Alexander Kuzmenkov 2020-09-25 13:19:37 +03:00 committed by GitHub
parent 26abe8cb30
commit 425150e783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,9 +7,6 @@ trap 'kill $(jobs -pr) ||:' EXIT
stage=${stage:-}
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# https://github.com/jemalloc/jemalloc/wiki/Getting-Started
export MALLOC_CONF="confirm_conf:true"
function wait_for_server # port, pid
{
for _ in {1..60}
@ -80,8 +77,12 @@ function restart
while killall clickhouse-server; do echo . ; sleep 1 ; done
echo all killed
# https://github.com/jemalloc/jemalloc/wiki/Getting-Started
export MALLOC_CONF="percpu_arena:disabled,confirm_conf:true"
set -m # Spawn servers in their own process groups
numactl --cpunodebind=1 --localalloc \
left/clickhouse-server --config-file=left/config/config.xml \
-- --path left/db --user_files_path left/db/user_files \
&>> left-server-log.log &
@ -89,6 +90,7 @@ function restart
kill -0 $left_pid
disown $left_pid
numactl --cpunodebind=0 --localalloc \
right/clickhouse-server --config-file=right/config/config.xml \
-- --path right/db --user_files_path right/db/user_files \
&>> right-server-log.log &
@ -98,6 +100,8 @@ function restart
set +m
unset MALLOC_CONF
wait_for_server 9001 $left_pid
echo left ok