Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Good night, Austin, Texas, wherever you are!


aus+uk / uk.comp.os.linux / Re: cgroups are not nice

SubjectAuthor
* cgroups are not nice#Paul
+- cgroups are not niceRichard Kettlewell
`* cgroups are not niceGrant Taylor
 `- cgroups are not nice#Paul

1
cgroups are not nice

<bm944kx6ud.ln2@threeformcow.myzen.co.uk>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=1102&group=uk.comp.os.linux#1102

  copy link   Newsgroups: uk.comp.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: news20k.noreply@threeformcow.myzen.co.uk (#Paul)
Newsgroups: uk.comp.os.linux
Subject: cgroups are not nice
Date: Tue, 05 Dec 2023 19:19:07 +0000
Organization: A noiseless patient Spider
Lines: 39
Sender: Paul Kinsler <kinsler@silence.kinsler.org>
Message-ID: <bm944kx6ud.ln2@threeformcow.myzen.co.uk>
Injection-Info: dont-email.me; posting-host="2a6fedf8c1c587ce9869d06950a343bd";
logging-data="404373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ymSwI7rEofGREETQ/aXvl"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.117 (x86_64))
Cancel-Lock: sha1:I7UpGe+/SS9o9+yFdK/eSPKSxlg=
 by: #Paul - Tue, 5 Dec 2023 19:19 UTC

Does anyone here understand cgroups?

I have to put up with running some really quite intensive processing
on an ubuntu machine (running 20.04 LTS, on the basis of uname -a)
that I do not admin (or have any sudo privileges). You may assume I
have zero influence over those who do admin it.

Just as some context, generally each processing run - managed by a
bash script - creates as many background jobs (via &, but not nohup)
as I need to saturate the cpu cores. Some processing is run manually
from a terminal, some automatically from cron.

Once upon a time I could use nice (and/or renice) to change priorities,
so that things I wanted finished sooner would run faster than ones I
was happy to wait for; but if the fast ones finished, I didn't have to
waste any cpu time as the others jobs could take up the slack.

Now we have "cgroups", which no doubt has many advantages, but seems
imo bizarrely complicated. And although I can still "nice" processes,
it never makes any difference at all -- not even between a set of jobs
created by the same shell or processing script, which I would have
thought of as sensible, and as seems to be implied by some doco as what
should happen (but ime does not).

Unfortunately, despite several attempts, I can't make head or tail of
what to do (if anything can be done) from any of: the cgroups
documentation, various blog posts, posts on stackoveflow/exchange,
"askubuntu", etc. Many of the what-to-do" "explanations" seem to
involve being root and/or sudo; and the most useful looking questions
I have found are without answers.

Can anyone help?

#Paul

Re: cgroups are not nice

<wwvbkb4jnzq.fsf@LkoBDZeT.terraraq.uk>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=1103&group=uk.comp.os.linux#1103

  copy link   Newsgroups: uk.comp.os.linux
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: invalid@invalid.invalid (Richard Kettlewell)
Newsgroups: uk.comp.os.linux
Subject: Re: cgroups are not nice
Date: Tue, 05 Dec 2023 22:14:33 +0000
Organization: terraraq NNTP server
Message-ID: <wwvbkb4jnzq.fsf@LkoBDZeT.terraraq.uk>
References: <bm944kx6ud.ln2@threeformcow.myzen.co.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="45151"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:s6r6kwiiDqcWfGUDtkbEoQF5th4=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
 by: Richard Kettlewell - Tue, 5 Dec 2023 22:14 UTC

news20k.noreply@threeformcow.myzen.co.uk (#Paul) writes:
> Does anyone here understand cgroups?
>
> I have to put up with running some really quite intensive processing
> on an ubuntu machine (running 20.04 LTS, on the basis of uname -a)
> that I do not admin (or have any sudo privileges). You may assume I
> have zero influence over those who do admin it.
>
> Just as some context, generally each processing run - managed by a
> bash script - creates as many background jobs (via &, but not nohup)
> as I need to saturate the cpu cores. Some processing is run manually
> from a terminal, some automatically from cron.
>
> Once upon a time I could use nice (and/or renice) to change priorities,
> so that things I wanted finished sooner would run faster than ones I
> was happy to wait for; but if the fast ones finished, I didn't have to
> waste any cpu time as the others jobs could take up the slack.
>
>
> Now we have "cgroups", which no doubt has many advantages, but seems
> imo bizarrely complicated. And although I can still "nice" processes,
> it never makes any difference at all -- not even between a set of jobs
> created by the same shell or processing script, which I would have
> thought of as sensible, and as seems to be implied by some doco as what
> should happen (but ime does not).

I think it would be worth investigating why you can’t get ‘nice’
working. For example, start by checking what nice value your processes
get when you do or don’t nice them.

> Unfortunately, despite several attempts, I can't make head or tail of
> what to do (if anything can be done) from any of: the cgroups
> documentation, various blog posts, posts on stackoveflow/exchange,
> "askubuntu", etc. Many of the what-to-do" "explanations" seem to
> involve being root and/or sudo; and the most useful looking questions
> I have found are without answers.

AFAIK directly createing a control group normally needs root
permission. But you can create a user slice with a CPU resource policy
attached and systemd will create a suitable one for you.

A very simplistic example:

richard@sfere:~$ cat .config/systemd/user/test.slice
[Slice]
CPUQuota=50%
richard@sfere:~$ systemctl --user daemon-reload
richard@sfere:~$ systemd-run --user --slice test.slice sh -c 'yes > /dev/null'
Running as unit: run-r2fa6a01b9fdb4ce49d208f7f58f8187c.service

[...]

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2504272 richard 20 0 5792 864 780 R 50.0 0.0 0:24.58 yes
805434 news 20 0 122264 96872 52212 S 1.0 0.6 40:13.91 innd

See ‘man systemd.resource-control’ for further options. (You should
probably find an introduction to systemd first if you’re not already
comfortable with it.)

--
https://www.greenend.org.uk/rjk/

Re: cgroups are not nice

<ukq7p5$s37$1@tncsrv09.home.tnetconsulting.net>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=1104&group=uk.comp.os.linux#1104

  copy link   Newsgroups: uk.comp.os.linux
Path: i2pn2.org!rocksolid2!news.neodome.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.198.18.1.140!not-for-mail
From: gtaylor@tnetconsulting.net (Grant Taylor)
Newsgroups: uk.comp.os.linux
Subject: Re: cgroups are not nice
Date: Wed, 6 Dec 2023 10:33:41 -0600
Organization: TNet Consulting
Message-ID: <ukq7p5$s37$1@tncsrv09.home.tnetconsulting.net>
References: <bm944kx6ud.ln2@threeformcow.myzen.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 6 Dec 2023 16:33:41 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="198.18.1.140";
logging-data="28775"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <bm944kx6ud.ln2@threeformcow.myzen.co.uk>
 by: Grant Taylor - Wed, 6 Dec 2023 16:33 UTC

On 12/5/23 13:19, #Paul wrote:
> Does anyone here understand cgroups?

I have a vague understanding of them.

> Once upon a time I could use nice (and/or renice) to change priorities,
> so that things I wanted finished sooner would run faster than ones I
> was happy to wait for; but if the fast ones finished, I didn't have to
> waste any cpu time as the others jobs could take up the slack.

Sounds like you were leveraging (,re,io)nice to adjust the weight /
priority of your processes as you see fit. I would consider this to be
a very traditionally Unix thing to do.

> Now we have "cgroups", which no doubt has many advantages, but seems
> imo bizarrely complicated. And although I can still "nice" processes,
> it never makes any difference at all -- not even between a set of jobs
> created by the same shell or processing script, which I would have
> thought of as sensible, and as seems to be implied by some doco as what
> should happen (but ime does not).

My speculation is that more of your processes than you care for are run
in different (instances of a) cgroup(s). So when you're shuffling
priority as you had been doing, you're probably doing so against one or
maybe two other processes inside of a cgroup. Unfortunately this has no
relation to much less impact on or between other cgroup(s).

> Can anyone help?

I would work with the people that do have root / sudo access to the
system your on and get them to help enable you to do what you want.
Even if that means that all of your processes end up in one cgroup so
that you can shuffle things therein as you desire.

This seems to me like what a system administrator is supposed to do, as
in help their users achieve their desired goal.

But, sadly, it sounds like you might have more of a dictator form of
system administrator.

I'm sorry, but I don't have an answer for you.

--
Grant. . . .

Re: cgroups are not nice

<7imt4kx7i6.ln2@threeformcow.myzen.co.uk>

  copy mid

https://news.novabbs.org/aus+uk/article-flat.php?id=1143&group=uk.comp.os.linux#1143

  copy link   Newsgroups: uk.comp.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: news20k.noreply@threeformcow.myzen.co.uk (#Paul)
Newsgroups: uk.comp.os.linux
Subject: Re: cgroups are not nice
Date: Fri, 15 Dec 2023 10:32:07 +0000
Organization: A noiseless patient Spider
Lines: 12
Sender: Paul Kinsler <kinsler@silence.kinsler.org>
Message-ID: <7imt4kx7i6.ln2@threeformcow.myzen.co.uk>
References: <bm944kx6ud.ln2@threeformcow.myzen.co.uk> <ukq7p5$s37$1@tncsrv09.home.tnetconsulting.net>
Injection-Info: dont-email.me; posting-host="1995e7411471fa136544d79326bc6b10";
logging-data="1990221"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18gzrt5m3TUausOyxO11OWR"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.117 (x86_64))
Cancel-Lock: sha1:DaEAVVEgLyc2kxC5y4sAJCLtoC4=
 by: #Paul - Fri, 15 Dec 2023 10:32 UTC

Richard Kettlewell <invalid@invalid.invalid> wrote:
[...]

Grant Taylor <gtaylor@tnetconsulting.net> wrote:
[...]

Thanks both, the extra context helps. I'll try to remember to
post back here if I manage to get something to work out, but
atm the box is less heavily loaded atm so it's not such a
priority.

#Paul

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor