# Pkg slow as hell



## BsDjUsTbSd (May 10, 2020)

They pkg manager is being slow as hell.
apt on debain based distros is fast COMPARED to pkg
pacman and yay on arch based distros are fast COMPARED to pkg
dnf and yum on fedora are fast COMPARED to pkg

even when pkg's mirrors are fast. they aren't nearly close to the performance of others
why's that. It's getting really annoying


----------



## zirias@ (May 10, 2020)

BsDjUsTbSd said:


> even when pkg's mirrors are fast.


I don't buy that. pkg is super fast here, with a repository hosted in the LAN. So if pkg is slow, it's most definitely due to a slow mirror.


----------



## pyret (May 10, 2020)

BsDjUsTbSd, you have created three posts and each of them is "Why is FreeBSD not..." and then you continue with "In Linux...", so on its face you just appear to be trolling.


----------



## BsDjUsTbSd (May 10, 2020)

I don't appear to be trolling.
You and people like you appear to not give answers to my questions
and just talk generarly


----------



## k3y5 (May 10, 2020)

Have you curated the list of available mirrors to a geolocation that is close to you?


----------



## BsDjUsTbSd (May 10, 2020)

k3y5 first of all thanks for trying to help me and be friendly. yes i have tried the available mirrors that are close to me and others in countries close to me but nothing.


----------



## k3y5 (May 10, 2020)

Have you inspected your wireless network traffic? (wireshark) Is your ISP throttling your connection? I know my network gets a bit wanky if I'm trying to pull down gigs at a time. 

I would also check that your wireless driver is setup correctly or test a wired connection if possible.


----------



## k3y5 (May 10, 2020)

Also, your username makes it look like you're trolling. Its in "sarcasm font," if you will. I don't care. This community is here to help and support, even if you're trolling. : )


----------



## rootbert (May 10, 2020)

yes, pkg is painfully slow compared to other package managers, at least on all my systems here in Europe. pkg per se is slow, but the current problems with mirrors do not help neither. My OpenBSD systems always feel a little sluggish compared to FreeBSD, however, when working with pkg they seem lightning fast. I am sorry I can't help, can just confirm your problem and also state that it is annoyingly slow.


----------



## BsDjUsTbSd (May 10, 2020)

i am non trolling. My username in my machine linux machine for instance is SuDoSySaDmIn. It's not weird font it's lowercase and uppercase


----------



## BsDjUsTbSd (May 10, 2020)

rootbert said:


> yes, pkg is painfully slow compared to other package managers, at least on all my systems here in Europe. pkg per se is slow, but the current problems with mirrors do not help neither. My OpenBSD systems always feel a little sluggish compared to FreeBSD, however, when working with pkg they seem lightning fast. I am sorry I can't help, can just confirm your problem and also state that it is annoyingly slow.


Thanks man. you are the only one i've found that admits it. that says that basically pkg's mirrors aren't the best.
I like a community when i see people like you who aren't toxic and admit the truth


----------



## zirias@ (May 10, 2020)

I can only repeat (and please, try it yourself): `pkg` isn't slow at all, you will see with a repo on your local network. It might be that mirrors are slow indeed, can't say anything about that.


----------



## drhowarddrfine (May 10, 2020)

Same here. After 16 years of personal and company usage, I have never had a problem with pkg being slow.

BsDjUsTbSd  I strongly suggest you tone things down. This place and these users aren't like your Linux forums you are used to.


----------



## shkhln (May 10, 2020)

Pkg basically does 3 things: querying/updating the package database(s), downloading packages, unpacking packages. In comparison to Arch:

The database is certainly not a bottleneck — SQLite, which is used by pkg, is in fact much faster than Pacman's flat file storage.
Downloading is obviously limited by network/mirrors.
Package installation depends on the compression format (xz vs zstd might be noticeable with a slow CPU) as well as file system (zfs vs ext4) performance.


----------



## Crivens (May 10, 2020)

A traceroute to the pkg server(s) might help here...


----------



## BsDjUsTbSd (May 10, 2020)

drhowarddrfine said:


> Same here. After 16 years of personal and company usage, I have never had a problem with pkg being slow.
> 
> BsDjUsTbSd  I strongly suggest you tone things down. This place and these users aren't like your Linux forums you are used to.


btw i don't even use linux forums.
the only forum I just have an account an barely use it is arch forums


----------



## scottro (May 11, 2020)

Do you have ipv6 connectivity? I seem to remember that pkg was defaulting to ipv6 and my ISP, which supposedly has it, doesn't--so it would have to time out before going to ipv4 and fetching packages. 
If you try, using `pkg -4` is that any quicker?

I don't who was talking  about Linux forums, but I guess it  depends upon which one.  CentOS and Fedora are pretty much good at avoiding nastiness.  Those are the only ones that I'm familiar with, and for full disclosure, I'm still a mod on CentOS forums.


----------



## gnath (May 11, 2020)

BsDjUsTbSd said:


> pkg manager is being slow as hell.


Definitely it is not like hell, compare to others. Like Shkhin said, all managers does those operations. Only difference is total download size for you. In recent time I have seen lot of packet loss for me. Some time this happens but not "really annoying". Use for some more time, you will definitely enjoy it.


----------



## rootbert (May 11, 2020)

one tip: use an unprivileged user where possible. "pkg search" as root downloads metadata, and here in central Europe "pkg search" needs roughly 30 seconds (even on a gigabit connection); using "pkg search" as unprivileged user is much faster


----------



## rootbert (May 11, 2020)

wow ... the holy gods of FreeBSD mirros just read my words here I think ... "pkg search" as root is currently down to 0.4 seconds. I think I have not experienced this speed in 2020. Awesome!


----------



## k3y5 (May 12, 2020)

rootbert said:


> wow ... the holy gods of FreeBSD mirros just read my words here I think ... "pkg search" as root is currently down to 0.4 seconds. I think I have not experienced this speed in 2020. Awesome!



Also why I think the post was taken as trolling. `pkg` has always been crazy fast and much more dependable then other alternatives.


----------



## SirDice (May 12, 2020)

It's not pkg(8) itself that's slow. It's typically the (local) network and/or a mirror. Is pkg(8) itself perfect? No, it's not. Just like any other piece of complex code, this too can and will have bugs. Most of the time it does what it's supposed to do. I've been using it since it became available and never had any major problems with it.

Development of pkg(8) itself happens here: https://github.com/freebsd/pkg
Some additional  information: https://wiki.freebsd.org/pkgng

And with that I'm going to close this thread. Intentional or not, it reads like flamebait.


----------

