Results 1 to 4 of 4

Thread: Using systemd cgroups to control CPU affinity?

  1. #1

    Question Using systemd cgroups to control CPU affinity?

    I run BOINC on one of my systems. I want to set the CPU affinty for 2 services (boinc-client and autofs) to use the same set of CPUs. From what I have read it should be as simple as:

    Code:
    sudo systemctl set-property autofs.service AllowedCPUs=8-15,24-31 
    sudo systemctl set-property boinc-client.service AllowedCPUs=8-15,24-31
    However after doing that, I see this:

    Code:
    ps -eo pid,psr,user | grep boinc
      315  30 boinc
      316   9 boinc
      520  28 boinc
      521   0 boinc
     1950  24 boinc
     2209  31 boinc
     2895   0 boinc
     2896  23 boinc
     3291  15 boinc
     3296  20 boinc
     3304  20 boinc
     5158  14 boinc
     5224   3 boinc
     6364  10 boinc
     6365  12 boinc
     6614  27 boinc
     6961   3 boinc
     6970   8 boinc
     6974   9 boinc
     6975  18 boinc
     6977  26 boinc
     7243  21 boinc
     7317  28 boinc
     7391  15 boinc
     7424   6 boinc
     7506   1 boinc
     7508  27 boinc
     8517  31 boinc
     8853  20 boinc
     8854  24 boinc
    10260  12 boinc
    10262  21 boinc
    10269  26 boinc
    11505   3 boinc
    11506  25 boinc
    11602  16 boinc
    12180  29 boinc
    13709  30 boinc
    14245   8 boinc
    14957  30 boinc
    14959  28 boinc
    14960  15 boinc
    14961  29 boinc
    15236  13 boinc
    15261  28 boinc
    15291  12 boinc
    15305  26 boinc
    15306   7 boinc
    15386  16 boinc
    15394  21 boinc
    15395  29 boinc
    15862  30 boinc
    15864   1 boinc
    15866   3 boinc
    15867   3 boinc
    16013  17 boinc
    16014  30 boinc
    16016  31 boinc
    16525  30 boinc
    16592  31 boinc
    16656  20 boinc
    16685   8 boinc
    16687  31 boinc
    16688  18 boinc
    16690  12 boinc
    16942  14 boinc
    16953  23 boinc
    16974  19 boinc
    16997   0 boinc
    17045  29 boinc
    17046  14 boinc
    18430   8 boinc
    18432  27 boinc
    18433   6 boinc
    18434   8 boinc
    19099  10 boinc
    19515  14 boinc
    19537  11 boinc
    19593  28 boinc
    19594  25 boinc
    21032  18 boinc
    21035  31 boinc
    21041   1 boinc
    21652  29 boinc
    21653   0 boinc
    21802  18 boinc
    22063  26 boinc
    22068   5 boinc
    22082  27 boinc
    22123  15 boinc
    22127  17 boinc
    23767  27 boinc
    24551  30 boinc
    24552   8 boinc
    25161  10 boinc
    25202  11 boinc
    25203  24 boinc
    26359   9 boinc
    26360  21 boinc
    26464  19 boinc
    26484   9 boinc
    26492  14 boinc
    26494  13 boinc
    26495  11 boinc
    26496  31 boinc
    26773   7 boinc
    26795  28 boinc
    26844  28 boinc
    26845  29 boinc
    26861  28 boinc
    26862   0 boinc
    26871   7 boinc
    26964  29 boinc
    26965   4 boinc
    27192   8 boinc
    28154  27 boinc
    28309   1 boinc
    28338   1 boinc
    28339  25 boinc
    28340   8 boinc
    30032  18 boinc
    31450  12 boinc
    31490  13 boinc
    31491  22 boinc
    31627  30 boinc
    31731  30 boinc
    31733  20 boinc
    31734  27 boinc
    31735  21 boinc
    32032  11 boinc
    32048   8 boinc
    32050  27 boinc
    32051  29 boinc
    32053   8 boinc
    32056  25 boinc
    32100   0 boinc
    32101  27 boinc
    32277  20 boinc
    32528   5 boinc
    32550  15 boinc
    32555  29 boinc
    32557  27 boinc
    32570  27 boinc
    32633  14 boinc
    32635   1 boinc
    Clearly this doesn't do what I thought it would. I am by no means a Linux guru and have been reading and trying things and undoing them for hours now. I am stuck, so I came here to ask for help before I put it down for the day.

  2. #2
    Join Date
    Sep 2012
    Posts
    7,869

    Default Re: Using systemd cgroups to control CPU affinity?

    Are you using unified cgroup hierarchy? It is not default on Leap (and I am not sure whether systemd version in Leap fully supports it).

  3. #3

    Default Re: Using systemd cgroups to control CPU affinity?

    Quote Originally Posted by arvidjaar View Post
    Are you using unified cgroup hierarchy? It is not default on Leap (and I am not sure whether systemd version in Leap fully supports it).
    After reading up on the unified cgroup hierachy, it turns out that, yes indeed, I am trying to use it. I'll have to enable it later tonight via
    Code:
    yast bootloader
    as per https://doc.opensuse.org/documentati...-cgroups-usage and see if that does the trick.

    Thanks for pointing that out.

  4. #4

    Default Re: Using systemd cgroups to control CPU affinity?

    Using yast bootloader to add the kernel argument
    Code:
    systemd.unified_cgroup_hierarchy=1
    and rebooting the system did the trick. Thank you @arvidjaar for your help. After researching this for many, many hours it's finally working as needed.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •