Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
util: add `affinity-cpus` starting argument #10773
What problem does this PR solve?
when TiDB deployed in NUMA machine, we often need startup multiple processes and self-binding to numa node's cpu, so we should do this.
the question's (2)(3) is not easy to use and often forgot to do (3)
What is changed and how it works?
make (2)(3) easier, add an optional argument when TiDB-server start.
just run this:
to bind proc to cpu 2 and 3, it will also be base step to make tidb-ansible to make deploy easier after ansible detect (1)
Notice: this argument only works on linux.
take a look
run sysbench point-get and see
@@ Coverage Diff @@ ## master #10773 +/- ## =========================================== Coverage 81.0223% 81.0223% =========================================== Files 418 418 Lines 89268 89268 =========================================== Hits 72327 72327 Misses 11717 11717 Partials 5224 5224