How to speed up zypper and YAST2 when installing appz?

I found zypper and YAST2 are comparatively slower than apt-get in my situation.Because when one application,e.g KDE 4.6,which has a lot of dependent appz,those depencies are installed after downloaded one by one.But in the case of apt-get ,they are installing and downloading simultaneously.No doubt that apt-get are faster than zypper.

You can modify zypper/YaST to download all packages first then install them by adding the option


commit.downloadMode = DownloadInAdvance

To /etc/zypp/zypp.conf

On 02/16/2011 10:36 AM, ah7013 wrote:
>
> You can modify zypper/YaST to download all packages first then install
> them by adding the option

how does that affect YaST? (some think yast software management is a
gui front end for zypper, but it is not…instead both yast and zypper
use the same libs, but are different front ends for those libs)

> To /etc/zypp/zypp.conf

does that file use some non-standard way of commenting out lines?

that is, i see that almost all lines begin with two ##, and a few with
just one #

should i assume that either one or two ## comments out the line, and
only those with none are read?

but that means that … well, you see my question/wonder??


DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.0.11, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11

IMHO it is far better to install one by one AFTER download, than to install one by one DURING download.

What happens if 1/2 through a critical download you lose the internet connection and one has installed 1/2 of the apps already (but other 1/2 are missing). That could be bad news. One may not be able to boot afterward.

Is that the way apt-get works ?

If that indeed is the way apt-get works, then I certainly would want no part of it.

Apt-get downloads everything first, and then installs. It isn’t simultaneous.

/etc/zypp/zypp.conf should affect both YaST and zypper (libzypp config file). /etc/zypp/zypper.conf should be zypper only.

This might be an apples and oranges argument anyway - it will depend on the number of repos enabled, and how fast the server connections are anyway.

ok…thx


DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.0.11, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11

On 2011-02-16 16:02, DenverD wrote:
> On 02/16/2011 10:36 AM, ah7013 wrote:

> how does that affect YaST?

Unknown.

>> To /etc/zypp/zypp.conf
>
> does that file use some non-standard way of commenting out lines?
>
> that is, i see that almost all lines begin with two ##, and a few with
> just one #
>
> should i assume that either one or two ## comments out the line, and
> only those with none are read?

Simple. A double is a comment, a single is a variable or setting commented
out, but which you can activate by uncommenting it out.

That’s programmesse advanced training >:-P


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2011-02-16 16:36, oldcpu wrote:
>
> axishero;2290642 Wrote:
>> I found zypper and YAST2 are comparatively slower than apt-get in my
>> situation.Because when one application,e.g KDE 4.6,which has a lot of
>> dependent appz,those depencies are installed after downloaded one by
>> one.But in the case of apt-get ,they are installing and downloading
>> simultaneously.No doubt that apt-get are faster than zypper.
>
> IMHO it is far better to install one by one AFTER download, than to
> install one by one DURING download.

It is indifferent :slight_smile:

> What happens if 1/2 through a critical download you lose the internet
> connection and one has installed 1/2 of the apps already (but other 1/2
> are missing). That could be bad news. One may not be able to boot
> afterward.

Assume the situation:

a) download a.rpm
b.1) install a.rpm
b.2) simultaneously (another thread) downloads b.rpm

Failures:

a.rpm fails to install. The situation is the same if b.rpm is also being
downloaded or not. It doesn’t matter. Depending on what is the cause it
will attempt to redownload, skip, or whatever, asking the user. At the same
time as all this is happening, another thread is downloading b, then c,
then d… which is time saving, keep the slow network busy. At worst, all
those packages will be unused if the user aborts.

There are just two threads: one that keeps downloading everything, one by
one, and another that installs everything, one after another, as soon as
they become available and the thread is ready for the next archive. They
are independent threads, and both work sequentially.

Install two packages at the same time? No, impossible the rpm database
doesn’t allow concurrent write access.

Failure: package b.rpm fails to download mid-ways, while a.rpm is being
installed.

The situation is the same as we currently have: download a, install a,
download b, install b, when download b fails midway. The a.rpm package is
already installed. You can modify the behaviour to install in batches of
related packages, when all the batch has been downloaded, but that is not
the default.

> Is that the way apt-get works ?
>
> If that indeed is the way apt-get works, then I certainly would want no
> part of it.

I would, very much >:-)

And I think that the old YaST did so, 10 years ago.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

That can be a problem.

And its more likely to happen if rpms are are installed immediately after downloading than if they are all downloaded first and only then installed.

Thats the beauty of Linux, we both have the choice to tune it the way we prefer.

On 02/17/2011 02:03 AM, Carlos E. R. wrote:
> Simple. A double is a comment, a single is a variable or setting commented
> out, but which you can activate by uncommenting it out.

thanks, i had guessed that an removed both ## for those i wanted active…

but, that does prompts another question:

since there were zero settings uncommented, that must mean that all of
the ones with a single # are the default and carried somewhere else
as active (uncommented) right?


DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.0.11, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11

On 2011-02-17 10:26, DenverD wrote:
> On 02/17/2011 02:03 AM, Carlos E. R. wrote:
>> Simple. A double is a comment, a single is a variable or setting commented
>> out, but which you can activate by uncommenting it out.
>
> thanks, i had guessed that an removed both ## for those i wanted active…

A double “##” indicates that you should not uncomment that line: it is a
real comment, not a deactivated setting.

> but, that does prompts another question:
>
> since there were zero settings uncommented, that must mean that all of
> the ones with a single # are the default and carried somewhere else
> as active (uncommented) right?

It is nice of programmers to provide us with a configuration file with all
the default settings written, but commented out. It behaves as if the file
did not exist, but shows us what the file would look like, and it makes for
easy changes.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2011-02-17 10:36, oldcpu wrote:
>
> robin_listas;2290989 Wrote:
>>
>> Failure: package b.rpm fails to download mid-ways, while a.rpm is being
>> installed.
>
> That can be a problem.
>
> And its more likely to happen if rpms are are installed immediately
> after downloading than if they are all downloaded first and only then
> installed.

The default zypper behaviour is to download a.rpm, then install a.rpm, then
download b.rpm, then install b.rpm, etc. In that situation, moving the
download to a different thread is of no consequence, except speed.

If you select to download all first, then it is not possible to parallelize.

If you select to download and install in batches, it could download the
next batch while the previous batch is being installed. A failure to
install a part of the batch is then no different than what we have now (the
batch is fully downloaded at that time).

>
> robin_listas;2290989 Wrote:
>>> If that indeed is the way apt-get works, then I certainly would want
>> no
>>> part of it.
>>
>> I would, very much >:-)
>>
> Thats the beauty of Linux, we both have the choice to tune it the way
> we prefer.

/IF/ zypper was threaded, which it is not.

What I intend to show is that parallel download/install is as safe as
sequential download/install. The exception would be if the download program
itself, or its libraries, is changed while it is running. Or perhaps not,
because unix/linux does not delete an “in-use” file.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

True.

There is a difference. The difference is in the probability of occurence. In the case of downloading one, installing, downloading another, installing, a failure in the internet connection will cause an interuption in the installation at potentially a bad location. But if one needs to download all rpms first and ONLY after a successful download start the install, then the internet reliability is no longer part of the equation.

Well, we differ in our views here. I don’t see Internet reliability as being guaranteed, and far too often have I seen in a large download an internet hiccup causing a problem.

But as noted, the beauty of Linux is we both can tune this the way we like. The flexibility is there for each of us to set this up the way that we think works best for us and not have the views of the other (with whom we don’t agree) imposed.

On 02/17/2011 12:03 PM, Carlos E. R. wrote:
>> thanks, i had guessed that an removed both ## for those i wanted active…
>
> A double “##” indicates that you should not uncomment that line: it is a
> real comment, not a deactivated setting.

of course, i wasn’t thinking when i wrote here…yes i didn’t try to
make a comment (with ##) an option !!


DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.0.11, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11

On 2011-02-17 13:06, oldcpu wrote:

> robin_listas;2291207 Wrote:
>> If you select to download and install in batches, it could download the
>> next batch while the previous batch is being installed. A failure to
>> install a part of the batch is then no different than what we have now
>> (the batch is fully downloaded at that time).
>
> There is a difference. The difference is in the probability of
> occurence. In the case of downloading one, installing, downloading
> another, installing, a failure in the internet connection will cause an
> interuption in the installation at potentially a bad location.

Yes, that is what zypper does now by default. This is what we have, and it
is bad.

What I say that you could have this option enabled:

DownloadInHeaps, Similar to DownloadInAdvance, but try to split

the transaction into heaps, where at the end of

each heap a consistent system state is reached.

The key is that it first downloads all the packages conforming a batch,
then installs all of those packages, reaching a consistent system state.
That is what zypper does currently if that setting is active. The
improvement would be that at the same time it is installing the first batch
it could start downloading the second batch. These two processes are
independent, the failure of one does not affect the other.

It is a technical matter, not a matter of opinion :wink:
The problem is that you are not understanding what I try to explain.

> But if
> one needs to download all rpms first and ONLY after a successful
> download start the install, then the internet reliability is no longer
> part of the equation.

Obviously. But you have to select that behaviour, it is not the default.
The default is:

DownloadAsNeeded Alternating download and install. Packages are

cached just to avid CD/DVD hopping. This is the

traditional behaviour.

> robin_listas;2291207 Wrote:
>> What I intend to show is that parallel download/install is as safe as
>> sequential download/install. The exception would be if the download
>> program
>> itself, or its libraries, is changed while it is running. Or perhaps
>> not, because unix/linux does not delete an “in-use” file.
>
> Well, we differ in our views here. I don’t see Internet reliability as
> being guaranteed, and far too often have I seen in a large download an
> internet hiccup causing a problem.

It is not guaranteed. I never said that.

What I say is that you can get the same reliability with parallelization or
without.

> But as noted, the beauty of Linux is we both can tune this the way we
> like. The flexibility is there for each of us to set this up the way
> that we think works best for us and not have the views of the other
> (with whom we don’t agree) imposed.

Not yet, we don’t have the parallel behaviour option.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)