[pacman-dev] pacman-4.2 plans?

Anatol Pomozov anatol.pomozov at gmail.com
Sat Apr 13 19:52:17 EDT 2013


Hi

On Sat, Apr 13, 2013 at 2:49 PM, Xyne <xyne at archlinux.ca> wrote:
> Allan McRae wrote:
>
>>We need all packages downloaded to perform conflict checking.
>>Installing in parallel would be difficult as we need to maintain
>>dependency ordering.
>
> Aside from that, wouldn't parallel disk IO be slower due to the write
> head having to jump back and forth more often?

No, it should not be. Kernel IO scheduler takes care of optimizing
block requests order e.g. it merges requests that access adjacent disk
sectors and optimizes head path. Also modern disks have NCQ feature
that allows to optimize head movement in case of long request queues.
SSD allows one IO per bank (if I recall correctly) so having multiple
requests per drive (but to different banks) hides IO latency. The rule
of thumb is "the longer requests queue - better for throughput but
worse for latency". Plus package installation includes other activity
(e.g. unpacking archive), intermixing CPU bound and IO bound workload
is better for overall throughput. But only real-world testing on
rotational disks and SSD could tell us the real gain.

> How would pacman's output handle simultaneous downloading and
> installing without making things really cluttered and difficult to
> read?

In case of multiple processes the only way to make output readable is
to buffer job output and write it to console only after the job
(package installation) is finished. Write to console should be
serialized by a mutex. For example "tup" build tool [1] does it, try
to compile a project with "tup upd -j40" and you'll see that its
output is *much* better than for "make -j40".

> Installing in parallel would be difficult as we need to maintain
> dependency ordering.

But packages have this information, and it is possible to build
dependency graph, right?

> What happens if the network connection is dropped while
> packages are still downloading after package installation has started?

In this case only those packages that are already downloaded will be
installed. And because installation respects dependency order then
partial installation will not brick the system, no?


> We need all packages downloaded to perform conflict checking.
:(

[1] https://aur.archlinux.org/packages/tup-git


More information about the pacman-dev mailing list