Does zypper throttle download speeds?

One of the few things that I dislike about opensuse is the slow downloads speeds I get with zypper. I’ve manually added the fastest server in my area with zypper but I only get speeds of less than 150kbps. I get speeds of 2MBps if I download the same file with Yast or manually download with aria2c. That’s almost 15x faster!

What makes zypper so slow?

Some users have complained about it, but strangely enough the one thing pointed to as being a likely culprit is the one you claim works (aria). It has been suggested that where the implementation of p2p takes place in zypper (with aria), that this is causing the slow down, where ISP’s are using traffic management on p2p.

Do you, or anyone else, know if there’s a way to disable the p2p feature of zypper? I checked out /etc/zypp/zypp.conf + zypper.conf but I didnt’ see anything about it.

I’ve been using aria as my main direct download manager for a while and never had problems, so it’s probably the p2p feature.

I have to leave the forum right now so I don’t have time to check this. There is a workaround I’m sure. Plenty of other help here so just keep a watch:)

On Mon, 25 Jan 2010 06:56:02 +0000, londy wrote:

> Do you, or anyone else, know if there’s a way to disable the p2p feature
> of zypper? I checked out /etc/zypp/zypp.conf + zypper.conf but I didnt’
> see anything about it.
>
> I’ve been using aria as my main direct download manager for a while and
> never had problems, so it’s probably the p2p feature.

I think there’s a little misunderstanding of what aria is here. Aria is
capable of doing p2p downloads using torrents or metalink, but that’s not
all it does. It also is capable of opening multiple connections to an
ftp or web server to download a file - and that’s what it does for the
downloads here (as far as I know, anyways) - so you’re not using its p2p
functionality to download patches.

It could be that it’s just picking a slow mirror or the mirrors are busy.

Jim

Jim Henderson
openSUSE Forums Moderator

The case with me is totally opposite :slight_smile: … Yast is so slow that I have disabled automatic refresh. I refresh the repos by using “zypper ref”. Even when I install someting using zypper, it is much faster than using Yast… The thing is I have to kill Yast many times because of its slow speed.

I just wish I knew exactly how zypper is using aria but that info doesn’t seem to be readily available. Zypper has always been slow since I installed opensuse a month ago. I’ve tested the mirrors that I added and they’re all fast, so I don’t think it’s a problem with the mirrors.

Yesterday, I download about 200MB of packages and it was downloading under 10kbps. Something definitely ain’t working right.

On Tue, 26 Jan 2010 05:06:02 +0000, vendetta18 wrote:

> The case with me is totally opposite :slight_smile: … Yast is so slow that I have
> disabled automatic refresh. I refresh the repos by using “zypper ref”.
> Even when I install someting using zypper, it is much faster than using
> Yast… The thing is I have to kill Yast many times because of its slow
> speed.

Interesting; I don’t see that kind of issue, but it could be a matter of
proximity to the mirror that’s selected, too - or different definitions
of “slow” for that matter. :slight_smile:

Jim


Jim Henderson
openSUSE Forums Moderator

On Tue, 26 Jan 2010 09:16:02 +0000, londy wrote:

> Yesterday, I download about 200MB of packages and it was downloading
> under 10kbps. Something definitely ain’t working right.

That is problematic - I download the 200 MB of updates fairly quickly,
usually at full speed. Sometimes I wish I could throttle the download
somehow, in fact.

You might look through the zypper log file (that’s how I discovered it
was using aria - I had problems with updates on one machine because the
code calls “aria2” rather than “/usr/bin/aria2” and I had previously
installed aria2 in /usr/local/bin before an upgrade - and the version I
had was too old).

The log files are very detailed, so it could take some time to review and
see where the bottleneck might be.

Jim


Jim Henderson
openSUSE Forums Moderator

At least in my location (using Comcast 16Mbps cable), downloads generally start off very fast, generally in the 300-700KB/s range.

Frequently, mid-download, this will suddenly throttle back to 10-20KB/s - sometimes less - and stay that way until the end of that file, then resume high speed download with the next file.

I am guessing that something in the download is triggering Comcast’s network management software to throttle back my connection.

Despite this, I don’t believe that Comcast throttles connections so severely. I suspect that I am seeing a poor interaction with however zypp communicates and the way that Comcast throttles bandwidth.

Any ideas on what I should try changing to get around this?

Is that serious? If so, take a look at /etc/zypp/zypp.conf, you can set speed maximums:

## Maximum download speed (bytes per second)
## 0 means no limit
# download.max_download_speed = 0

There are some other interesting options, too.

Unfortunately this will not help londy, since he would probably remember overwriting the default value.

For me zypper works perfectly, but: it often shows a low and / or erratic speed while actually downloading normally (usually at maximum speed, 1.7MB/sec in my case). I easily see that when huge packages are downloaded, for example ‘nexuiz-data’ (818MB), which is shown at being downloaded at a fracture of the maximum speed¹ and still is finished within reasonable time. Please check that.

¹…while the percentages are showed correctly.

For me zypper works perfectly, but: it often shows a low and / or erratic speed while actually downloading normally (usually at maximum speed, 1.7MB/sec in my case). I easily see that when huge packages are downloaded, for example ‘nexuiz-data’ (818MB), which is shown at being downloaded at a fracture of the maximum speed¹ and still is finished within reasonable time. Please check that.

¹…while the percentages are showed correctly.

You know what? You’re exactly right. I just tried downloading nexuiz-data and zypper reports a download speed of 100 KBps but “System Monitor” reports 1.8 MBps. I timed the download times and it was the same for both zypper and aria. I guess my mind was playing tricks on me because it sure felt like zypper was taking much longer to download.

Cool, I’m glad that solved the actual problem. I have no idea why zypper is behaving this way, so if anyone has a solution for that… post it, please. It’s not that important, yet it’s an inconsistency.

On Thu, 25 Feb 2010 09:26:02 +0000, gropiuskalle wrote:

> “hendersj” Wrote:
>> Sometimes I wish I could throttle the download somehow, in fact.
>
> Is that serious? If so, take a look at /etc/zypp/zypp.conf, you can set
> speed maximums:

Yes, it was serious, I didn’t know about the configuration file. I’ve
learned something today. :slight_smile:

Jim


Jim Henderson
openSUSE Forums Administrator

Glad to be of service, hendersj! That file indeed is pretty handy.

On Thu, 25 Feb 2010 21:26:01 +0000, gropiuskalle wrote:

> Glad to be of service, hendersj! That file indeed is pretty handy.

Just goes to show that we all can learn things from each other. :slight_smile:

Jim


Jim Henderson
openSUSE Forums Administrator

I also found this a great piece of information. Suitable credit applied:)

Oh thank you! blush

Here’s a small bonus: zypper creates an extensive logfile in /var/log/zypp/history, which is very useful for troubleshooting. It shows the exact time of any install / uninstall, used repositories, errors, warnings, rpm-output, modifications of repositories etc. etc. It’s much easier to handle than for example ‘rpm -qa --last’, since it keeps every information ever logged - you can easily create a history of even a single package:

kalle@hoppers:~> grep ffmpeg /var/log/zypp/history
2010-01-09 18:07:01 ffmpeg-0.5.21000svn-0.pm.1.2.i586.rpm installed ok
2010-01-09 18:07:01|install|ffmpeg|0.5.21000svn-0.pm.1.2|i586|7021:y2base|ftp.skynet.be-suse|548aa1acf78c836f8a3b78adfdb2ef61fb0586df
2010-01-13 05:36:33|install|ffmpeg|0.5.21000svn-0.pm.1.3|i586||ftp.skynet.be-suse|5026a0b7c430ecdfb954a52006996752205f1b12
2010-01-16 19:34:47|install|ffmpeg|0.5.21000svn-0.pm.1.5|i586||ftp.skynet.be-suse|edd4af948717b558f5eaf65da6e7b107ca2afa96
2010-01-28 10:06:28|install|ffmpeg|0.5.21000svn-0.pm.1.4|i586||ftp.skynet.be-suse|4644c6195c9e87fdbdf12cb5df73628dc96585d9
2010-02-03 01:26:12|install|ffmpeg|0.5.21000svn-0.pm.1.7|i586||ftp.skynet.be-suse|d48a43aa1b529d5af196d786d58beb094033d7b6
2010-02-07 19:40:35|install|ffmpeg|0.5.21651svn-0.pm.1.1|i586||Packman|6172facc614dd259ff3159aed0961da375f4a86c
2010-02-19 19:02:45|install|ffmpeg|0.5.21861svn-0.pm.1.1|i586||Packman|2fad2ad9628a331b99c90481c2c094bc30e1598a
2010-02-23 02:49:11|install|ffmpeg|0.5.21861svn-0.pm.1.2|i586||Packman|ffc3a84bfd3f70b1d7b49fcbfc276fabb1e270db
2010-02-24 16:37:05|install|ffmpeg|0.5.21861svn-0.pm.1.4|i586||Packman|f9950dce0bfc8a108452fcce942e2233ef5ecbf7

Actually, this is did know already and often refer to it myself and announce to others. Thanks

On Fri, 26 Feb 2010 06:26:03 +0000, caf4926 wrote:

> Actually, this is did know already and often refer to it myself and
> announce to others.

Same here - I used this to diagnose why my updates weren’t coming down at
all - turned out that I had upgraded my 11.1 system with aria2c installed
in /usr/local/bin and that was being picked up by zypper. The older
version didn’t have the features zypper needed - that log file was very
helpful to track that issue down.

Jim


Jim Henderson
openSUSE Forums Administrator