# pkg0.syd.freebsd.org is slow



## gpw928 (Oct 3, 2022)

My internet connection emerges from a router in Sydney.  Package installations today are being sourced from the host pkg0.syd.freebsd.org (103.2.119.197) and they have been running at about 50 Kilobytes/sec for some weeks now.  I'm pretty used to slow Internet, but other parts of FreeBSD downloads (e.g. the provides database) run at pretty much wire speed (700 to 800 Kilobytes per second for me).  Linux package updates also happen at wire speed.

Does anyone know why pkg0.syd.freebsd.org might be so slow?


----------



## SirDice (Oct 3, 2022)

You could pick a different mirror, ports-mgmt/fastest_pkg might be useful. But note:


```
IMPORTANT: We do NOT guarantee uptime of any particular mirror. We provide SRV fallbacks for redundancy.
```


----------



## gpw928 (Oct 3, 2022)

```
[strand.289] $ sudo pkg install py39-fastest_pkg

[strand.290] $ dig +short _http._tcp.pkg.freebsd.org srv
50 10 80 pkg0.tuk.freebsd.org.
50 10 80 pkg0.nyi.freebsd.org.
50 10 80 pkg0.isc.freebsd.org.
50 10 80 pkg0.bme.freebsd.org.
50 10 80 pkg0.pkt.freebsd.org.
10 10 80 pkgmir.geo.freebsd.org.

[strand.291] $ fastest_pkg
pkg0.nyi.freebsd.org: 447.1 kB/s
pkg0.isc.freebsd.org: 0.0 B/s
pkg0.bme.freebsd.org: 18.4 kB/s
pkg0.pkt.freebsd.org: 367.9 kB/s
pkg0.tuk.freebsd.org: 81.6 kB/s

Fastest:
pkg0.nyi.freebsd.org: 447.1 kB/s

Write configuration:
mkdir -p /usr/local/etc/pkg/repos/
echo 'FreeBSD: { url: "http://pkg0.nyi.freebsd.org/${ABI}/latest" }' \
        > /usr/local/etc/pkg/repos/FreeBSD.conf

[strand.292] $ diff /usr/local/etc/pkg/repos/FreeBSD.conf.orig /usr/local/etc/pkg/repos/FreeBSD.conf
1,3c1
< FreeBSD: {
<   url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
< }
---
> FreeBSD: { url: "http://pkg0.nyi.freebsd.org/${ABI}/latest" }
```
*Fetching the packagesite.pkg is now 10 times faster.*

```
Fetching packagesite.pkg: 100%    6 MiB 608.8kB/s    00:11
```


----------



## smithi (Oct 3, 2022)

gpw928 said:


> ```
> ...
> [strand.292] $ diff /usr/local/etc/pkg/repos/FreeBSD.conf.orig /usr/local/etc/pkg/repos/FreeBSD.conf
> 1,3c1
> ...



Good for you, and thanks for the tute (dig dig!) but as one who will also likely be getting pkgs via Sydney, who needs bugging about Oz mirror/s?

My hunt early this year for working ftpN.au.freebsd.org didn't turn up much either, compared to the olden days.

Still now:
ftp.au (aarnet) resets my ftp connections, but resolves - sometimes!
ftp1.au does not resolve
ftp2.au (optus) is broken at /pub/, resolves rarely (drill) yet pings!
ftp3.au (internode) works: 12.3, 13.0, 13.1, some RCs
ftp4.au = ftp2.au, same IP.


----------



## Lamia (Oct 5, 2022)

smithi said:


> ftp3.au (internode) works: 12.3, 13.0, 13.1, some RCs


Internode never disappoints. It is a pity that we changed from them. Yet I like their thought process about OSS support.


----------



## gpw928 (Oct 5, 2022)

I agree.  For many years, Internode had the best technical support for retail Internet services in Australia. It's had a series of ownership changes (iiNet in 2011, and TPG in 2015), though my impression is that they are still well regarded (but seem to have retreated in the marketplace, and avoid competing too directly with their parent company).

Their original co-founder, Simon Hacket, was probably best known for connecting a toaster to the Internet at Interop in San Jose in 1990, and controlling it with SNMP.  It was both original and amusing, generating much attention.


----------



## smithi (Oct 5, 2022)

gpw928 said:


> Their original co-founder, Simon Hacket, was probably best known for connecting a toaster to the Internet at Interop in San Jose in 1990, and controlling it with SNMP.  It was both original and amusing, generating much attention.



The RTFM numberplate on his Tesla Roadster won me, plus his link to Redflow flow batteries.  How rare is riches yet still generousity of spirit?

Our local solar power company chose internode for their first broadband link, c.2000 IIRC.


----------



## bgroper (Oct 6, 2022)

And the VH-TCP registration/callsign on Simon Hackett's aeroplane often seen at ADL.


----------



## smithi (Oct 6, 2022)

Back on topic, kind of, after checking servers once again:

https://docs.freebsd.org/en/books/handbook/mirrors/ shows for Oz

ftp.au.freebsd.org and
ftp3.au.freebsd.org

And guess what?  You can't guess?

ftp.au.freebsd.org (mirror.aarnet.edu.au) *no longer supports ftp!*  It just resets ftp connections!

https, sure.  Good ol' aarnet, recent everything and history galore.  rsync likely works too, and both do ipv6, apparently. 

And running ftpd just to serve an explanatory README is way too much to expect.

Ah, the march of 'progress'.

And ftp3 (internode) works.  Maybe _it_ should be 'ftp.au'?

 But I doubt it'd help to bug hostmaster@au.freebsd.org


----------



## gpw928 (Oct 13, 2022)

Today pkg0.syd.freebsd.org (103.2.119.197) was delivering packages at the rate of 4 to 10 Kilobytes per second.

pkg0.nyi.freebsd.org (96.47.72.71) was stone dead.

So I switched manually to pkg0.tuk.freebsd.org (204.15.11.66).  That got me back to about 700 Kilobytes/sec.

Constant fiddling of the pkg configuration is a pain in the proverbial.  And it's going to discourage new entrants.

Does anyone know if there scope to complain about this?  Or should I just be happy to get more than what I pay for?


----------



## Lamia (Oct 13, 2022)

gpw928 said:


> Today pkg0.syd.freebsd.org (103.2.119.197) was delivering packages at the rate of 4 to 10 Kilobytes per second.
> 
> pkg0.nyi.freebsd.org (96.47.72.71) was stone dead.
> 
> ...


Did you not have luck with this?


----------



## gpw928 (Oct 13, 2022)

Lamia said:


> Did you not have luck with this?


Yes, it worked a treat.  But it comes with an important caveat:


SirDice said:


> IMPORTANT: We do NOT guarantee uptime of any particular mirror. We provide SRV fallbacks for redundancy.


i.e. I hard coded the best option (pkg0.nyi.freebsd.org) into pkg configuration, and it promptly failed (disappeared off the Internet).


----------



## juha (Oct 14, 2022)

pkg0.syd.freebsd.org has always been very fast for me, maybe show us a traceroute or similar?

```
$ fetch [URL]http://pkg0.syd.freebsd.org/FreeBSD:13:amd64/release_1/Latest/pkg-devel.txz[/URL]
pkg-devel.txz                                           10 MB   10 MBps    01s

$ ftp ftp0.syd.freebsd.org
Trying 2402:9200:0:7::15:1:21 ...
Connected to ftp0.syd.freebsd.org.
....
ftp> get FreeBSD-13.1-RELEASE-amd64-memstick.img
local: FreeBSD-13.1-RELEASE-amd64-memstick.img remote: FreeBSD-13.1-RELEASE-amd64-memstick.img
229 Entering Extended Passive Mode (|||53337|)
150 Opening BINARY mode data connection for FreeBSD-13.1-RELEASE-amd64-memstick.img (1172165120 bytes).
100% |***********************************|  1117 MiB   11.41 MiB/s    00:00 ETA
226 Transfer complete.
1172165120 bytes received in 01:37 (11.41 MiB/s)

traceroute to pkg0.syd.freebsd.org (103.2.119.197), 64 hops max, 40 byte packets
 1  gateway  0.097 ms  0.098 ms  0.100 ms
 2  loop180150280.bng.syd.aussiebb.net (180.150.28.1)  4.591 ms  8.629 ms  9.268 ms
 3  HundredGigE0-0-0-11.cfl2.nextdc-s2.syd.aussiebb.net (180.150.1.148)  9.900 ms  5.599 ms
    HundredGigE0-0-0-11.cfl1.nextdc-s2.syd.aussiebb.net (180.150.1.146)  5.572 ms
 4  * 10.241.13.74 (10.241.13.74)  8.986 ms *
 5  10.241.13.109 (10.241.13.109)  5.878 ms  5.933 ms  5.568 ms
 6  be3.core5.nextdc-s1.syd.aussiebb.net (180.150.1.119)  6.110 ms  5.746 ms  5.587 ms
 7  be4.core1.equinix-sy3.syd.aussiebb.net (159.196.252.47)  5.792 ms  6.293 ms  5.577 ms
 8  be3.core1.equinix-sy1.syd.aussiebb.net (180.150.1.158)  6.404 ms  6.159 ms  5.717 ms
 9  be2.acc1.equinix-sy1.syd.aussiebb.net (119.18.32.215)  6.073 ms  12.065 ms  12.919 ms
10  119-18-13-61.cust.aussiebb.net (119.18.13.61)  12.167 ms  5.238 ms  5.810 ms
11  pkg0.syd.freebsd.org (103.2.119.197)  5.377 ms  5.199 ms  5.708 ms
```


----------



## gpw928 (Oct 14, 2022)

juha said:


> pkg0.syd.freebsd.org has always been very fast for me, maybe show us a traceroute or similar?


It's an intermittent problem.  Some days are diamonds, some days are stones...
My Internet is 3G cellular.  And it has to traverse a private enclave (10.194.x.x) operated by Optus.
I'm away from home at the moment. Will reply again when I can demonstrate the problem.


----------

