Hi
I noticed that pkg was downloading stuff really slower than axel on the same computer or other windows and Linux machines and even my Android phone on the same network
searching the forums I saw a lot of posts about pkg being slow and always users answer was that "the problem is the mirrors not the pkg tool itself"
While believing in that the mirrors could be a problem sometimes I doubted that pkg was not a slow on itself
So I did some testing
At first I did a "pkg update -f" meanwhile using netstat to get the IP of the mirror that pkg used And measuring the time and speed of pkg downloading only the "packagesite.pkg" file the downloading speed was 172.6 KB/s downloading the 6.42 MB file in 36 seconds then I copied the repo URL in /etc/pkg/FreeBSD.conf And started downloading packagesite.pkg from it with -n 32 argument for axel (Exact file that pkg downloads in repo/FreeBSD:FreeBSDVersion:architecture/latest/packagesite.pkg with exactly the same size)
I used the IP that netstat gave just to make sure both pkg was, and axel is, downloading from the same mirror, and they were (IPs were the same)
axel downloaded the same file in 12 seconds at 523.65 KB/s!
I tested that multiple times and always axel was at least 3 times faster.
It's a simple test that you can do too.
I always add -n 16 to 32 for axel just to speed it even more
Another benefit of axel is that it has a better resume compatibility it seems like pkg will sometimes prompt a" size mismatch, fetching from remote" when it's resuming a download
also I have a problem that I don't have an explanation for, sometimes when downloading a package after while the download speed decrees over time resting at 16.4 KB/s I don't have a good explanation for it, nor I did enough testing for that, so I can't say that it's a pkg problem but all I can say is that same doesn't happen with axel or aria2 manually downloading from mirrors
Pkg is slow and that's a fact,
so I suggest a solution : like the ports that you can change the fetch commands with the FETCH_CMD please add an option in pkg.conf to change it for pkg.
You may ask if it is possible to change the port's fetch command, why not use that instead of pkg ? I acutely do that and for many small programs it's nice speedy and lets you customize a lot but for some bigger programs you will get many dependencies sometimes going 10 layers deep so that not really efficient to use if you don't want to customize the software
Thanks in advance!
I noticed that pkg was downloading stuff really slower than axel on the same computer or other windows and Linux machines and even my Android phone on the same network
searching the forums I saw a lot of posts about pkg being slow and always users answer was that "the problem is the mirrors not the pkg tool itself"
While believing in that the mirrors could be a problem sometimes I doubted that pkg was not a slow on itself
So I did some testing
At first I did a "pkg update -f" meanwhile using netstat to get the IP of the mirror that pkg used And measuring the time and speed of pkg downloading only the "packagesite.pkg" file the downloading speed was 172.6 KB/s downloading the 6.42 MB file in 36 seconds then I copied the repo URL in /etc/pkg/FreeBSD.conf And started downloading packagesite.pkg from it with -n 32 argument for axel (Exact file that pkg downloads in repo/FreeBSD:FreeBSDVersion:architecture/latest/packagesite.pkg with exactly the same size)
I used the IP that netstat gave just to make sure both pkg was, and axel is, downloading from the same mirror, and they were (IPs were the same)
axel downloaded the same file in 12 seconds at 523.65 KB/s!
I tested that multiple times and always axel was at least 3 times faster.
It's a simple test that you can do too.
I always add -n 16 to 32 for axel just to speed it even more
Another benefit of axel is that it has a better resume compatibility it seems like pkg will sometimes prompt a" size mismatch, fetching from remote" when it's resuming a download
also I have a problem that I don't have an explanation for, sometimes when downloading a package after while the download speed decrees over time resting at 16.4 KB/s I don't have a good explanation for it, nor I did enough testing for that, so I can't say that it's a pkg problem but all I can say is that same doesn't happen with axel or aria2 manually downloading from mirrors
Pkg is slow and that's a fact,
so I suggest a solution : like the ports that you can change the fetch commands with the FETCH_CMD please add an option in pkg.conf to change it for pkg.
You may ask if it is possible to change the port's fetch command, why not use that instead of pkg ? I acutely do that and for many small programs it's nice speedy and lets you customize a lot but for some bigger programs you will get many dependencies sometimes going 10 layers deep so that not really efficient to use if you don't want to customize the software
Thanks in advance!