Skip to content
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

cgroup memory limit is not awared in some scenarios #8588

Closed
amyangfei opened this issue Mar 20, 2023 · 0 comments · Fixed by #8589
Closed

cgroup memory limit is not awared in some scenarios #8588

amyangfei opened this issue Mar 20, 2023 · 0 comments · Fixed by #8589
Labels
affects-6.1 affects-6.5 affects-7.0 area/ticdc Issues or PRs related to TiCDC. severity/major type/bug The issue is confirmed as a bug.

Comments

@amyangfei
Copy link
Contributor

amyangfei commented Mar 20, 2023

What did you do?

  • Deploy ticdc server with tiup
  • Add MemoryMax=15G in systemd configuration.
$ cat /etc/systemd/system/cdc-8301.service
[Unit]
Description=cdc service
After=syslog.target network.target remote-fs.target nss-lookup.target

[Service]
LimitNOFILE=1000000
LimitSTACK=10485760
User=apple
ExecStart=/bin/bash -c '/home/apple/deploy/cdc-upstream-1/tidb-deploy/cdc-8301/scripts/run_cdc.sh'
Restart=always

RestartSec=15s
MemoryMax=15G

[Install]
WantedBy=multi-user.target
  • Restart ticdc server

What did you expect to see?

The memory limit of cdc server should be 15G

Instead it uses host memory as total memory, and sets memory limit to 6.3G in sorter engine

[2023/03/20 12:15:40.097 +08:00] [INFO] [server.go:210] ["sorter engine memory limit"] [memory="6.3 GB"]
$ free -h
               total        used        free      shared  buff/cache   available
Mem:            58Gi       6.4Gi        47Gi        15Mi       5.2Gi        51Gi
Swap:             0B          0B          0B

What did you see instead?

TiCDC server doesn't find the correct memory limit, and uses total memory of host instead.

It is also a known bug in TiDB library: pingcap/tidb#38659

Versions of the cluster

TiCDC version (execute cdc version):

master@41b40aa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.1 affects-6.5 affects-7.0 area/ticdc Issues or PRs related to TiCDC. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants