# pkg update very slow



## Peter2121 (May 11, 2021)

I have a problem accessing 'latest' repository - it is very very slow:


```
njails-6# pkg update
Updating FreeBSD repository catalogue...
Fetching packagesite.txz:  15%    1 MiB  32.8kB/s    05:56 ETA
```

My configuration:

```
njails-6# cat /usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
```

What's happening? Should I try to force using another address?
I don't see any particular problem of accessing other network services...


----------



## SirDice (May 11, 2021)

Peter2121 said:


> Should I try to force using another address?


You can try switching to another mirror but there's no guarantee an individual mirror is up. 

http://pkg.freebsd.org/


----------



## Deleted member 67440 (May 11, 2021)

Already tried a -4?


----------



## Peter2121 (May 11, 2021)

> Already tried a -4?


I have no IPv6 addresses on this server.



> You can try switching to another mirror but there's no guarantee an individual mirror is up.


I've got 6.5MB/s using pkg0.pkt.freebsd.org.
So, there is a real problem of dispatching the traffic between the mirrors 
Any place to report it?


----------



## SirDice (May 11, 2021)

Peter2121 said:


> So, there is a real problem of dispatching the traffic between the mirrors


No, there is an issue with the connection between _you_ and a specific mirror. `pkg.freebsd.org` automatically switches you to a GeoDNS based "closest", available, mirror. That might not be the most optimal mirror, but the most optimal server could be offline (for whatever reason).


----------



## Peter2121 (May 11, 2021)

> No, there is an issue with the connection between _you_ and a specific mirror.


OK, how should _I_ reconfigure _my_ server, to be able to get packages at a reasonable speed, using the mirror where I can have a good connection?


----------



## mark_j (May 11, 2021)

Change the URL in the conf to the mirror that suits you best. But, as SirDice  says, if it goes down you'll get nothing until you change the conf file again.
Or you could build the packages using ports and set up your own mirror. Probably not the answer you were seeking...


----------



## suntzu00 (May 11, 2021)

use this to get the fastest mirror ports-mgmt/fastest_pkg


----------

