Question: Should the GODEBUG=madvdontneed=1 environment variable be set in a production environment? What impact does setting this parameter have on the operation of TiDB?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 请教一个问题:GODEBUG= madvdontneed=1环境变量,正式环境需要设置吗?设置了这个参数之后对TiDB的运行有啥影响吗?

| username: tracy0984

[TiDB Usage Environment] Production\Test Environment\POC
[TiDB Version] TiDB
[Encountered Problem] Optimizing TiDB
I would like to ask everyone a question: Does the GODEBUG=madvdontneed=1 environment variable need to be set in the production environment? What impact does setting this parameter have on the operation of TiDB?

| username: ddhe9527 | Original post link

Consider adjusting TiDB settings if the memory is not large or if you have experienced OOM (Out of Memory) issues. It’s essentially trading CPU for memory.

| username: buddyyuan | Original post link

What version are you using? The new version does not require any settings; the systemd service will call run_tidb.sh, and the script itself includes everything needed.

| username: tracy0984 | Original post link

Got it, thanks, TiDB v5.3

| username: tracy0984 | Original post link

Okay, thank you.

| username: tracy0984 | Original post link

I confirmed that the run_tidb.sh script in version 5.3 also has this parameter set. So it is set by default. Thanks~~

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.