Just curious as to why I can find so "few" (13) pkg mirrors. In comparison Arch has 800+. I searched with
fastest_pkg, and on
https://pkg.freebsd.org/. I'm aware these are the official mirrors, but could not find any list of unofficial ones.
This interrogation actually stems from comparing the speed of Arch Linux
pacman and
pkg. One critical difference is the update download speed, the size being comparable. I then realized that there are seemingly near to no official pkg mirrors in my region (Germany). The nearest is pkg0.sjb.freebsd.org (Sweden) which is slower than pkg0.nyi.freebsd.org (NY). There seem to have been other European mirrors previously, like pkg0.fra.freebsd.org (Frankfurt), pkg.eu.FreeBSD.org.
Does anyone know why that is? I suspect a mix of lack of sponsors (as suggested by the Q1 and Q2 2024 Status Reports) and mirroring being more involved for FreeBSD.
In germany it pretty much depends on what (shitty) ISP you are using - e.g. Telekom and Vodafone have particularly bad upstream peering, hence often mirrors that are geographically very near are (much) slower than others that are halfway around the globe.
I just tried
ports-mgmt/fastest_pkg but it gives completely useless/bogus values:
Code:
% fastest_pkg
pkg0.your.freebsd.org: 579.0 B/s
pkg0.twn.freebsd.org: 0.0 B/s
pkg0.kwc.freebsd.org: 247.0 B/s
pkg0.bbt.freebsd.org: 278.0 B/s
pkg0.bra.freebsd.org: 322.0 B/s
pkg0.nyi.freebsd.org: 698.0 B/s
pkg0.kul.freebsd.org: 0.0 B/s
pkg0.pao.freebsd.org: 428.0 B/s
pkg0.sjb.freebsd.org: 1.4 kB/s
pkg0.son.freebsd.org: 410.0 B/s
pkg0.tuk.freebsd.org: 431.0 B/s
pkg0.syd.freebsd.org: 0.0 B/s
pkg0.jinx.freebsd.org: 0.0 B/s
Fastest:
pkg0.sjb.freebsd.org: 1.4 kB/s
These values fluctuate A LOT between runs and some that are reported with 0.0B/s on one run, are amongst the fastest on the next run and fast ones from one run are allegedly unavailable on the next...
Of course those values are also off by several orders of magnitude:
Code:
% fetch http://pkg0.bra.freebsd.org/FreeBSD:14:amd64/base_release_2/FreeBSD-clang-dbg-14.2p7.pkg > /dev/null
FreeBSD-clang-dbg-14.2p7.pkg 102 MB 8608 kBps 14s
(that mirror often comes up with 0.0B/s with fastest_pkg)
So if you derive your assumptions from that tool: just forget about it.
There are also quite a lot of community-operated mirrors available:
How to get FreeBSD: CD and DVD sets, FTP sites and how to install and use Git
docs.freebsd.org
I'm located in southern germany and the one in slovenia was always plenty fast back when I used public pkg repositories. That being said, I've been building my own packages for several years now (at home and work) - which is rather trivial on FreeBSD thanks to
ports-mgmt/poudriere. Apart from adjusting various options to my/our needs, given the number of hosts using those two repositories nowadays, this has become far more economical (and a lot faster thanks to 10-50G links to most of those hosts...) than downloading packages from (semi)official mirrors.
Especially amongst 'veterans' and professional users it is quite common to either build everything from ports and/or set up a local build environment and pkg repository with poudriere (as said: it's rather trivial and can be set up within a few minutes).
So I guess directly maintaining more 'officiall' mirrors does not have that high of a priority for the FreeBSD foundation - after all those all require manpower and fundings which are both badly needed at other places in the project.
I also see no reason to maintain >800 mirrors - a lot less mirrors but with reliable and larger uplinks would make much more sense IMHO than trying to keep a huge amount of mirrors in sync (which is absolutely impossible at that scale). I remember when debian tried to promote torrent as the future default way of distributing packages - there were several thousand peers, but 99% of them had abysmally bad transfer speeds so that the net download speeds were pretty much unusable - especially when accounting for the countless retransmissions due to peers vanishing in the middle of downloading a block... So in short: quality is much more important than quantity.
For the curious, the other speed difference comes from the storage: pacman uses plain files and directories, pkg uses sqlite.
Not sure what you mean by this. packages are also just files; pkg only stores metadata e.g. about available and installed packages in sqlite databases, not the packages itself.