opencontainers / opencontainers/runc

container main process cpu affinity is different on different kernel

Open
#4,814 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
13.5k
Forks
2.3k
Avg merge
2d 8h
Merged PRs (30d)
30

Description

new kernel 6.6.25
set CPUAffinity=0-3 at  /etc/systemd/system.conf

root        2206  0.0  0.0 1240884 16288 pts/0   Sl   12:27   0:00 /usr/bin/containerd-shim-runc-v2 -namespace default -id 9572451f45d17061c3b36af
root        2215  0.0  0.1 735400 29024 pts/0    Sl   12:27   0:00  \_ /usr/bin/nerdctl _NERDCTL_INTERNAL_LOGGING /var/lib/nerdctl/1935db59
root        2239  0.0  0.0   1232   384 ?        Ss   12:27   0:00  \_ sleep 1000
[root@anolis ~]# taskset -pc 2206
pid 2206's current affinity list: 0-3
[root@anolis ~]# taskset -pc 2239
pid 2239's current affinity list: 0-3

but on old kernel 5.10.134 (total cpu is 8)
container process
[root@anolis ~]# taskset -pc 2239
pid 2239's current affinity list: 0-7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported CPU affinity difference with kernel 6.6.25 and 5.10.134, using the systemd CPUAffinity=0-3 setting and taskset checks shown in the report. Trace the runc container process setup to determine where affinity changes between kernels; done means the cause is identified and container affinity behavior is consistent or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.