Solved "pkg" is hella slow (not internet speed)

Ummm... the FX 8350 is an 8-core processor that does not support multithreading, and it's EOL - processor was released in 2012. Also, 32 GB of RAM - According to the ASRock web site for the mobo, that is generally possible if OP is using 16-GB modules (as opposed to 8 GB).

32 GB - that was theoretical upper limit of what that processor could support when it was released. In practice, probably less RAM is actually 'visible' to the processor. The motherboard - even if it's compatible with the processor, it's still another bottleneck for how much RAM it can support in practice. By comparison, a Threadripper theoretically supports 1 or 2 TB of RAM, but most TRX4 motherboards only support 256 GB of RAM.

OP's build is really pushing the limits here. Theoretically, math of the specs does add up - but in practice, such close alignment requires paying close attention when putting the parts together. Sometimes, it helps to have a spreadsheet, and lay out the specs side by side. PCPartPicker.com can do the compatibility homework for you, but YMMV.
 
This is a network issue.
The pauses do not happen in the install phase, they happen in the download phase. And the happen before each individual download, consistently. There is no unpacking at that point, the received files are just dumped into /var/cache/pkg.
The download itself is fast, so this is most likely a DNS timeout or delay.
If I watched it properly, You did DHCP for network config (and there was also an error message shown there). Check what you get as the DNS settings (/etc/resolv.conf), and check if these work properly.
Further steps to try:
  • put a known working external resolver in /etc/resolv.conf (e.g. 8.8.8.8)
  • get rid of DHCP and do the network config manually with settings that are known to work
  • check if that interface card has difficulties negotiating linkspeed (some of them do)
  • run a tcpdump and capture what is happening during these pauses

Thank You, this did the trick.

"pkg" is working super fast now.

All I did was adding the code
Code:
nameserver 8.8.8.8
to the file
Code:
/etc/resolv.conf

Then I ran the code
Code:
/etc/./netstart

Now doing a
Code:
pkg install firefox
is superfast and functioning properly.

View: https://youtu.be/s1_br_UtvoI


Thanks for this fix.
 
Try adding -4 to the pkg(8) command, do you still get the delay? If the delay is gone it's likely an IPv6 issue.

Code:
     -4      pkg will use IPv4 for fetching repository and packages.

Yes, I have tried this before, did not work. It seems like I had to add "nameserver 8.8.8.8" to "resolv.conf" which did the trick.
Although it seems like it was an unpacking issue, when it really was a DNS issue.
Also I have not setup any IPv6 during the FreeBSD installation, I only set IPv4.
 
The pauses do not happen in the install phase, they happen in the download phase. And the happen before each individual download, consistently.

I'm annoyed I didn't spot the delay being before.
 
Hello everyone,

have been using FreeBSD for a long time. I just downloaded and installed FreeBSD 13.1

When I use "pkg install" to install basic applications, "pkg" takes like 2 mins to update repository catalogue and when installing an application which has like 5 dependencies, it will fetch and download each package super fast but will pause or hang after each download fetch like 30secs to 1 min. So installing basic apps like "vim" or nano will literally take 5 mins, which is crazy. Installing "firefox" via "pkg" will take an hour since it has to fetch like 135 dependencies.

So the issue is not the internet (I have fast low latency fiber optic internet) and speeds from the repository servers are fast.
I see that "pkg" downloads each fetch dependency super fast but pauses or freeze after each fetch for 30 secs to 1 min. This is where the issue relies.

I tried the same for FreeBSD 13 and 12.1 and have the same exact issue. (This wasn't the case when I used FreeBSD 13 and 12.1 when they were first released, "pkg" was super fast back then).

It seems like the latest "pkg" build has a bug. I haven't tried downgrading it and use a previous version of "pkg" but something is clearly wrong with the current "pkg".

I just installed GhostBSD and when I type on the terminal "freebsd-version" it shows "13.0-STABLE".
The odd thing is that installing applications using "pkg" is super fast and functioning properly. Would also like to point out that GhostBSD have already preinstalled "pkg", so I am assuming I am not using the latest version of "pkg" when I installed GhostBSD.

So with this said, I am convinced something is wrong with "pkg" after when it is installed manually from a fresh install of FreeBSD.

Thanks.

EDIT:

Here is the video captured, take a look.

I did a fresh install of FreeBSD 13.1

View: https://youtu.be/WT-h6HNlVe8


Around timestamp "9:00" is when I do a "pkg install firefox"... and you can clearly see fetch downloads are super fast, but unpacking takes forever...

I’m having the exact same problem right now. Tf is wrong with FreeBSD? I used it some time ago and it was fine. Now pkg is taking forever to install packages. Download speed is perfectly normal, but extracting the files takes literally sooo much more time than before. This is probably to blame on USB installations, yet this is the first time I’m experiencing something like this.
 
Anything can happen. I recently got this glitch too. But after 30 seconds it would start the update again and everything would go fine. Who the hell knows what it was.
# pkg update
Code:
Updating FreeBSD repository catalogue...
pkg: An error occurred while fetching package: No error
pkg: An error occurred while fetching package: No error
repository FreeBSD has no meta file, using default settings
pkg: An error occurred while fetching package: No error
pkg: An error occurred while fetching package: No error
pkg: An error occurred while fetching package: No error
pkg: An error occurred while fetching package: No error
Unable to update repository FreeBSD
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
Error updating repositories!
 
Who the hell knows what it was.
Likely a certificate issue.

 
This is probably to blame on USB installations, yet this is the first time I’m experiencing something like this.
I use ports, but at the moment, I'm trying a USB-based installation, and it's painfully slow. Well, in my case, I know the issue is somewhere in my hardware, which is supposed to be pretty good stuff (a ROG Zephyrus). So, for time being, I decided to just be patient and stubborn with my hardware, and just hope it doesn't get fried.
 
Back
Top