diff --git a/embed/templates/scripts/run_pd.sh.tpl b/embed/templates/scripts/run_pd.sh.tpl index a7547181be..a46462c2fb 100644 --- a/embed/templates/scripts/run_pd.sh.tpl +++ b/embed/templates/scripts/run_pd.sh.tpl @@ -18,9 +18,9 @@ cd "${DEPLOY_DIR}" || exit 1 {{- end}} {{- if .NumaNode}} -exec numactl --cpunodebind={{.NumaNode}} --membind={{.NumaNode}} bin/pd-server \ +exec numactl --cpunodebind={{.NumaNode}} --membind={{.NumaNode}} env GODEBUG=madvdontneed=1 bin/pd-server \ {{- else}} -exec bin/pd-server \ +exec env GODEBUG=madvdontneed=1 bin/pd-server \ {{- end}} --name="{{.Name}}" \ --client-urls="{{.Scheme}}://{{.ListenHost}}:{{.ClientPort}}" \ diff --git a/embed/templates/scripts/run_pd_scale.sh.tpl b/embed/templates/scripts/run_pd_scale.sh.tpl index 6541eb5bc5..97e99079e7 100644 --- a/embed/templates/scripts/run_pd_scale.sh.tpl +++ b/embed/templates/scripts/run_pd_scale.sh.tpl @@ -18,9 +18,9 @@ cd "${DEPLOY_DIR}" || exit 1 {{- end}} {{- if .NumaNode}} -exec numactl --cpunodebind={{.NumaNode}} --membind={{.NumaNode}} bin/pd-server \ +exec numactl --cpunodebind={{.NumaNode}} --membind={{.NumaNode}} env GODEBUG=madvdontneed=1 bin/pd-server \ {{- else}} -exec bin/pd-server \ +exec env GODEBUG=madvdontneed=1 bin/pd-server \ {{- end}} --name="{{.Name}}" \ --client-urls="{{.Scheme}}://{{.ListenHost}}:{{.ClientPort}}" \