-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
op-guide: add TiDB binary deployment doc #944
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made a few suggestions.
op-guide/binary-deployment.md
Outdated
| vm.swappiness | Set `vm.swappiness = 0` | | ||
|
||
|
||
> **Note**: To adjust the operating system parameters, contact your system administrator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be more specific than this. As I understand, the only required change is to file limits. We should show an example of how to change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use
sudo echo 100000 > /proc/sys/fs/file-max
to change User Open Files Limit to 100000
like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@morgo Please see Jason's reply. If this is not what you mean, is it possible that you help add an example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zz-jason afaik the sudo only applies to the echo there. We could denote it is a root command with '#'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@morgo @zz-jason The echo
approach only applies to current session. When the system get rebooted, this setting will get lost. To make the setting persistent, users have to modify /etc/security/limits.conf
like what tidb-ansible does https://github.com/pingcap/tidb-ansible/blob/master/roles/bootstrap/tasks/root_tasks.yml#L23-L31
{{ deploy_user }} soft nofile 1000000
{{ deploy_user }} hard nofile 1000000
{{ deploy_user }} soft stack 10240
The {{ deploy_user }}
is the user which runs tidb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a fair amount of confidence that only the fs.file-max
limit needs to be changed. Context: tikv/tikv#3387
@ethercflow I like the idea of leaving the others at default and linking to the guide with some suggestions of "what to look at". @tennix how do you feel about only suggesting fs.file-max
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TiKV checks some other kernel parameters and reports warnings in the logs. I think it's better to tune these parameters to make TiKV happy. And I believe that's what TiDB Ansible does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This document does not actually involve parameter tuning. I think these parameters can be added, some parameters are consistent with tidb-ansible
, and some parameters are system defaults. Setting these parameters is good for performance, and no setting has no affect on deployment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For further improvement, we can do it later. As long as it does not affect the deployment and testing, I hope this PR can be merged soon. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and no setting has no affect on deployment.
@liubo0127 if they don't changefs.file-max
it is possible tikv won't start in a really weird way. Context: tikv/tikv#3387
I am happy with it for now, but I would like to see them described as optional (except fs.file-max
).
@morgo PTAL. |
@c4pt0r LGTM. I suggest that we move monitoring from this document to a sub-document where we can offer the binary install, or docker compose. |
Co-Authored-By: liubo0127 <liubo@pingcap.com>
@morgo We can move the monitoring service in another PR. Is it a good place here? @liubo0127 and I updated some sections. PTAL again~ Thanks! |
LGTM |
Since the monitoring section has been added to another file, I removed it from this one. Ref: #965 |
op-guide/binary-deployment.md
Outdated
| CPU Frequency Scaling | It is recommended to turn on CPU overclocking | | ||
| Transparent Hugepages | For Red Hat 7+ and CentOS 7+ systems, it is required to set the Transparent Hugepages to `always` | | ||
| I/O Scheduler | Set the I/O Scheduler of data disks to the `deadline` mode | | ||
| vm.swappiness | Set `vm.swappiness = 0` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to be consistent with the parameters in tidb-ansible, it is recommended to add the following two parameters.
| net.core.somaxconn | Set net.core.somaxconn = 32768
in sysctl.conf
|
| net.ipv4.tcp_syncookies | Set net.ipv4.tcp_syncookies = 0
in sysctl.conf
|
LGTM |
1 similar comment
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@lilin90 PTAL