#[SOLVED] Extremely slow pacman/AUR speeds

207 messages · Page 1 of 1 (latest)

turbid rose
#

Linux newbie here,
I always get under 1MB/s while downloading any pacman/aur packages although my bandwidth is around 3.5MB/s
ive ran reflector several times and even tried using the GUI app but nothing works.

have attached an image with what exactly happens when i run any reflector command.

Please ping me when you reply

polar lantern
turbid rose
#

also i should mention that its no different even when i keep download timeout to around 20 (that was suggested under some forums regarding this issue)

polar lantern
#

reflector doesn't follow the config

turbid rose
polar lantern
#

yeah this won't change that

#

--download-timeout n can be used to change the timeout in reflector

turbid rose
polar lantern
#

How did you measure your internet speed

#

What country are you in

#

which one is nearest to you

#

For me I'd do

$ wget -O /dev/null --quiet --show-progress --report-speed=bits --no-cache https://hel1-speed.hetzner.com/100MB.bin
/dev/null                                     100%[===============================================================================================>] 100.00M   316Mb/s    in 2.7s

To test the speed

turbid rose
turbid rose
turbid rose
turbid rose
#

it did go up to around 800kbs at one point but yea still extremely slow

polar lantern
#

There's probably nothing you can do

turbid rose
#

how am i supposed to deal with such speeds

polar lantern
#

How are you going to get a faster internet

#

Is the speed the same on windows

turbid rose
#

nah

polar lantern
#

the speedtest speed can be faked by your ISP

#

Whats the speedtest speed on linux?

turbid rose
polar lantern
#

web browser

#

to be identical to the windows test you did

turbid rose
#

the image i sent

#

its on linux

#

on linux

#

everything except aur and pacman works perfectly fine

polar lantern
#

Try the wget with this url

#

https://speedtest.chennai.linode.com/100MB-chennai.bin

turbid rose
#

~3.5mbs

polar lantern
#

Try a different tool instead of reflector

#

Install rate-mirrors from the aur

turbid rose
#

okay

polar lantern
#

After you get rate-mirrors run rate-mirrors --protocol https arch | sudo tee /etc/pacman.d/mirrorlist

#

Someone said it's been more reliable than reflector for him

turbid rose
#

now thats weird

#

i actually

#

manually put the india mirrors in my mirrorslist lol

#

but ill try out rate-mirrors once

polar lantern
#

Save your current mirror list

turbid rose
#

right

polar lantern
#

just cat /etc/pacman.d/mirrorlist and paste it here :P

turbid rose
#
Server = https://in.mirrors.cicku.me/archlinux/$repo/os/$arch
Server = https://mirrors.nxtgen.com/archlinux-mirror/$repo/os/$arch
Server = http://in.mirrors.cicku.me/archlinux/$repo/os/$arch
Server = http://in-mirror.garudalinux.org/archlinux/$repo/os/$arch
Server = http://mirrors.saswata.cc/archlinux/$repo/os/$arch
Server = https://mirror.del2.albony.in/archlinux/$repo/os/$arch
Server = https://in.arch.niranjan.co/$repo/os/$arch
Server = http://mirrors.nxtgen.com/archlinux-mirror/$repo/os/$arch
Server = https://mirrors.saswata.cc/archlinux/$repo/os/$arch
Server = https://mirror.maa.albony.in/archlinux/$repo/os/$arch
Server = https://mirrors.abhy.me/archlinux/$repo/os/$arch
Server = https://archlinux.kushwanthreddy.com/$repo/os/$arch
Server = https://mirror.sahil.world/archlinux/$repo/os/$arch
Server = http://mirror.sahil.world/archlinux/$repo/os/$arch
Server = https://in-mirror.garudalinux.org/archlinux/$repo/os/$arch ```
#

i think its working? @polar lantern

#

only an indian mirror failed, interesting

#

infact the results dont have any indian mirrors at all

polar lantern
turbid rose
#

reflector?

polar lantern
#

Nah since that says re-testing

#

so it was tested before

turbid rose
#

uh wait

#

that should be IN i believe

#

i dont see any indian mirrors tbh

turbid rose
polar lantern
#

Speed Issue fixed maybe?

turbid rose
#

wellll yes im satisfied with it xdd

#

but still its weird hwo the indian mirrors wont work on either of those testing methods

#

not that i personally care that much as long as my speed is alright

polar lantern
#

Put in Server = https://in-mirror.garudalinux.org/archlinux/$repo/os/$arch as the first mirror in the mirrorlist

#

and installl something

turbid rose
#

speed is okay right now

#

i dont think itll make a differnece

#

but ill keep it

#

indian mirrors will be faster anyways

polar lantern
#

If access to it is intermittent then the download falls back to the next mirror when the first mirror can't be reached

polar lantern
turbid rose
polar lantern
turbid rose
polar lantern
#

Surprising that the JP mirror was the fastest

turbid rose
#

right, i thought SG was gonna be the fastest after IN ones

polar lantern
#

Show your mirrorlist

turbid rose
#

added the first one after you asked me to

#

WAIT

#

i was download vs code while the first IN mirror was active and was getting miserable speeds of around 500kbs

#

i just commented the IN one and it jumped up to 3mb/s

polar lantern
#

Indian mirrors are low quality I guess

turbid rose
#

🔥

#

can i like automate the rate-mirrors command somehow so that it tests it daily

polar lantern
#

You can automate anything with systemd services and timers

#

reflector does a naive speedtest only I guess

#

So it's at least slower to test

#

Do that

#

I read through it and it's correct

turbid rose
polar lantern
#

OnCalendar=daily

turbid rose
#

oh okay thats great

#

and would i know when its running? or itll just run in the background

polar lantern
turbid rose
#

manual trigger didnt work

polar lantern
#

Show the log using the journalctl command

turbid rose
#

this should be it i believe

polar lantern
#

Hmm --save is an option, It's mentioned in the readme

#

run rate-mirrors --help

turbid rose
polar lantern
#

ah it's at the end

turbid rose
#

--save <file?

polar lantern
#

should be before

#

move it to before --protocol

turbid rose
#

alright

#

the service file right?

polar lantern
#

The program doesn't want options after the last non option

#

in this case arch

polar lantern
#

then sudo systemctl daemon-reload

#

and systemctl restart rate-mirrors

#

or start since it's not running

turbid rose
#

well i didnt reload/restart beforehand but still, doesnt work

#

maybe i did something wrong?

polar lantern
turbid rose
# polar lantern Show the log

can you give me the command for that, idk why but the results on mine show the time being 11 42 when its 11 54 right now

polar lantern
#

the journalctl

turbid rose
polar lantern
#

oh

turbid rose
#

oh root?

polar lantern
#

There's a --allow-root option for rate-mirrors

turbid rose
#

should i add that before protocol?

polar lantern
#

Yeah

#

Here's a alternative

ExecStart=/bin/bash -c '\
  TMPFILE=$(mktemp) && \
  /usr/bin/runuser -u userhere -- /usr/bin/rate-mirrors --save="$TMPFILE" --protocol https arch && \
  mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist-backup && \
  mv "$TMPFILE" /etc/pacman.d/mirrorlist
'
#

I didn't test

turbid rose
#

manually its working right now i believe

polar lantern
#

Ok

turbid rose
#

well its not showing any text or anything on my terminal though

#

like it normally would

#

but i guess its just this way

polar lantern
turbid rose
#

alright

polar lantern
#

you can see the output in the journal

turbid rose
#

yea it concluded

polar lantern
#

Feel free to use it if you want but it's not necessary

turbid rose
#

yupp it works

#

i checked the logs

#

thanks a lot for helping me through this 🙏

#

really appreciate it a lot

polar lantern
#

Now to add notifications

#

Add this below ExecStart

#

ExecStartPost=systemd-run [email protected] --user /usr/bin/notify-send "Mirrorlist updated" "rate-mirrors successfully refreshed /etc/pacman.d/mirrorlist." -u normal -i system-software-update

#

@turbid rose

#

The command works for me outside a systemd service

#

systemd-run has to be used to run notify-send in the users session

#

if just notify-send is used then it wont work because the notify bus and other stuff is running under the user

#

and the service doesn't know about those

turbid rose
#

i dont think ill get the notifications cuz im on hyprland and am using a very minimal setup sent by a friend xd

polar lantern
#

notify-send hello

#

try this

turbid rose
polar lantern
#

Install swaync

#

then try again

turbid rose
#

yes

#

works

polar lantern
#

No need to start it in your hypr config because it's activated via D-Bus

turbid rose
#

hm okay

polar lantern
#

If there were multiple notification daemons installed then you should start your preferred one

turbid rose
polar lantern
#

Now add the thing to the service

turbid rose
#

service file?

#

alright

polar lantern
#

Yeah

#

And replace the REPLACEWITHUSERNAME

#

You can also add a ExecStartPre with the same command and just replace the messages

turbid rose
#

okay i added it

#

and replaced username

polar lantern
#

restart the service

#

or start because it's a oneshot

#

and doesn't linger

turbid rose
#

have to refresh daemons right

polar lantern
#

yeah

turbid rose
#

running it

#

ill let yk if it works

#

hell yeah it works

#

thanks a lot dude

polar lantern
#

Epic

turbid rose
#

😭

polar lantern
#

You're welcome

turbid rose
#

❤️

#

il close this forum now ig

#

thanks a lot again

polar lantern
#

... solved

jagged rapidsBOT
#

#17680 📣 If there is nothing else that we can do for you, please close this thread by adding "[SOLVED]" to the title.

  • You can do this on desktop by clicking the three dots on the top right of the page, and pressing "Edit Post".
  • You can also do this on Android / iOS by long tapping your post in the text channel list, and tapping "Edit Post".

Your title should be like so: http://0x0.st/8Rt9.png
Thank you

turbid rose
#

ah aight

#

[SOLVED] Extremely slow pacman/AUR speeds

polar lantern
#

About systemd services

turbid rose
#

hmm makes sense

turbid rose
#

ill check this out, thanks

polar lantern
#

Remember to save the service and timer somewhere if you reinstall