public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Peter Humphrey <peter@prh.myzen.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Controlling emerges
Date: Mon, 18 Sep 2023 14:44:20 +0100	[thread overview]
Message-ID: <8292274.T7Z3S40VBb@wstn> (raw)
In-Reply-To: <73f47a82-4e46-44fe-a604-c3b8b0fa8b53@users.sourceforge.net>

On Monday, 18 September 2023 13:59:03 BST Jack wrote:
> 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.

It may be less complex than you think, Jack. I envisage a package being marked 
as solitary, and when portage reaches that package, it waits until all current 
jobs have finished, then it starts the solitary package with the environment 
specified for it, and it doesn't start the next one until that one has finished. 
The dependency calculation shouldn't need to be changed.

It seems simple the way I see it.

-- 
Regards,
Peter.





  reply	other threads:[~2023-09-18 13:44 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
2023-09-18 13:44   ` Peter Humphrey [this message]
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=8292274.T7Z3S40VBb@wstn \
    --to=peter@prh.myzen.co.uk \
    --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