public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Jack <ostroffjh@users.sourceforge.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Controlling emerges
Date: Mon, 18 Sep 2023 08:59:03 -0400	[thread overview]
Message-ID: <73f47a82-4e46-44fe-a604-c3b8b0fa8b53@users.sourceforge.net> (raw)
In-Reply-To: <4531844.LvFx2qVVIh@wstn>

[-- Attachment #1: Type: text/plain, Size: 1953 bytes --]

On 9/18/23 08:00, Peter Humphrey wrote:
> Hello list,
>
> We've had a few discussions here on how to balance the parameters to emerge
> to make the most of the resources available. Here's another idea:
>
> One the one hand, big jobs should be able to use the maximum CPU
> performance and RAM capacity, but on the other we don't want to flood the
> system.
>
> Therefore, I think it would be useful to be able to specify in env and
> package.env that a job should be run on its own - if any other emerge jobs are
> scheduled, wait until they're finished. Combine that with a specific MAKEOPTS,
> and we'd have a more flexible deployment of resouces.
>
> Is this feasible? What have I not thought of?

I've had exactly the same thought for some time now.  My guess is that 
it is theoretically possible to add some USE flag or ENV var for portage 
to recognize, but I don't know the portage internals well enough to 
guess how much effort it would be.  Given that portage orders ebuilds in 
a single emerge session based on some dependency graph, that seems like 
a good place to put the necessary hooks.

As a starting point, one option might be to create a special/magic 
ebuild and make it a dependency of those jobs that need to be run alone, 
and have something about it that won't run if anything else is still 
running.  But, I don't know if those pre-checks (such as checking for 
enough RAM and/or disk space) can be run at build time and not just at 
portage startup time.  The other possible problem with that approach 
would be to be sure that ebuild gets run separately for each other 
ebuild that depends on it - not all of them depending on it being run 
once.Also, those blocking ebuilds have work so that if several of them 
are queued (and running their "wait for everything else to finish" 
scripts - exactly one of them needs to start. I don't know if those 
pre-check scripts count as running before or within the ebuild itself.

[-- Attachment #2: Type: text/html, Size: 2402 bytes --]

  reply	other threads:[~2023-09-18 13:03 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18 12:00 [gentoo-user] Controlling emerges Peter Humphrey
2023-09-18 12:59 ` Jack [this message]
2023-09-18 13:44   ` Peter Humphrey
2023-09-18 13:48     ` Alan McKinnon
2023-09-18 16:03       ` Peter Humphrey
2023-09-18 16:13         ` Alan McKinnon
2023-09-18 17:54           ` Laurence Perkins
2023-09-18 22:44             ` William Kenworthy
2023-09-19  9:09               ` Peter Humphrey
2023-09-19  9:14                 ` William Kenworthy
2023-09-19  9:37                   ` Andreas Fink
2023-09-19  9:48                   ` Peter Humphrey
2023-09-19 10:06                     ` Rich Freeman
2023-09-19 10:13                     ` William KENWORTHY
2023-09-18 17:59           ` Michael
2023-09-18 18:10           ` John Blinka
2023-09-18 18:18           ` Dale
2023-09-18 18:49           ` Rich Freeman
2023-09-19 12:28           ` Peter Humphrey
2023-09-20 22:06           ` Wol
2023-09-21 19:26             ` Laurence Perkins
2023-09-21 20:30               ` Tsukasa Mcp_Reznor
2023-09-22  1:13                 ` Dale
2023-09-22  7:13                   ` Michael
2023-09-22 10:07                   ` Rich Freeman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73f47a82-4e46-44fe-a604-c3b8b0fa8b53@users.sourceforge.net \
    --to=ostroffjh@users.sourceforge.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox