0

When I install many packages at once, I use emerge --jobs=8 firefox vim.

This will install the packages, but it won't run everything in paralel. For example, it will wait compile rust before compiling vim, while only 1 job (rust) is running.

Are there any options to improve this?

2
  • Please provide the output from emerge --jobs=8 -pav firefox vim
    – eyoung100
    May 4, 2021 at 22:17
  • Without being familiar with emerge, I will say that many tasks cannot run in parallel. Installation of packages is one case that causes problems. Dependencies are only one issue--they must be installed first. Another issue is what happens when two or more installations try to modify he same file? One may open the file and clobber the edits made by the other. You will need to give a specific scenario and all those details before anyone can give a reasonable answer.
    – C. M.
    Jul 11, 2021 at 21:18

2 Answers 2

0

In this context jobs mean threads. So in your example, rust package will compile in 8 threads. I don't think there is a way to parallelize the compilation of multiple packages in one command, because it would be counterproductive. But you can run the second emerge instance to install vim and it will take some CPU time from the first emerge instance and compile and install vim package in parallel. Always keep in mind that multiple emerge instances share CPU time.

0

I do this in screen, running different emerge instances. Keep in mind that while compilation can happen in parallel (with shared resources) installation frequently has to wait for other installations to finish, so ultimately you might not gain that much time overall.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .