EOS Update Mirrors always delayed

When I update mirrors using the assistant in the eos-welcome app I always get a couple of failed attempts to connect and usually need to wait +50sec for the connection to succeed and get an upgrade result.

==> eos-rankmirrors: info: extracting /var/cache/pacman/pkg/endeavouros-mirrorlist-24.4-1-any.pkg.tar.zst ...
==> eos-rankmirrors: info: ranking EndeavourOS mirrors, please wait ...
==> Warning about https://endeavour.remi.lu/repo/$repo/$arch:
    Connection failed.
    Continuing.
==> Warning about https://mirror.sjtu.edu.cn/endeavouros/repo/$repo/$arch:
    Connection failed after 30 seconds.
    Continuing.
==> Info: Results of ranking EndeavourOS mirrors:

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# EndeavourOS mirrorlist, ranked by eos-rankmirrors at 02.06.2024 23:11:11.

Not sure why it would take that long.
Not an Issue now that I know, but before i closed the window several times before waiting long enough, thinking it’s just broken.

Someone else can correct me, but I think you’ve described a feature, not a bug…

The whole point of updating the mirrors is to discern which sources are prompt and reliable and which are not. This is not something that can be presumed without testing … and giving the candidates a chance to prove themselves.

It’s like trying to see how long you can hold your breath, and growing impatient because it takes so long to see how long it is. :wink:

It still takes that time just when i refreshed my mirror list with response time below a second on the top 15 mirrors.

And when I don’t know I’m supposed to wait, and get an immediate response from a program telling me Connection failed I assume something is broken and close it.

It would seem more reasonable to me, to not show those warnings and keep the

==> eos-rankmirrors: info: ranking EndeavourOS mirrors, please wait ...

as the last statement until the result is either complete, or the whole thing ran into an timeout.

Would it be possible for me to remove the two failing mirrors from my evaluation? as the not only seem to not respond, but further are at the other end of the world anyway.

1 Like

This is only informing you that the mirror is unavailable to you at that time.

pinging several different mirrors in different countries can take a few minutes. This is expected behavior.

1 Like

Thx, I guess I get a better grasp what is actually going on.

I will use a script to just run
eos-rankmirrors --ignore 'https://endeavour.remi.lu/repo/|https://mirror.sjtu.edu.cn/endeavouros/repo/'
in the future.

1 Like

Alternatively, you could use rate-mirrors in a terminal.

It is in the EnOS’ repo and can be installed with pacman.

rate-mirrors --help
Everyday-use client-side map-aware mirror ranking tool (Arch Linux; Manjaro; custom ones)

Usage: rate-mirrors [OPTIONS] <COMMAND>

Commands:
  stdin        accepts lines of urls OR lines with tab-separated urls and countries
  arch         test archlinux mirrors
  archlinuxcn  test archlinuxcn mirrors
  archarm      test archlinuxarm mirrors
  artix        test artix mirrors
  blackarch    test blackarch mirrors
  cachyos      test cachyos mirrors
  chaotic-aur  test chaotic-aur mirrors
  endeavouros  test endeavouros mirrors
  manjaro      test manjaro mirrors
  rebornos     test rebornos mirrors
  help         Print this message or the help of the given subcommand(s)

Options:
      --protocol <protocol>
          Test only specified protocols (can be passed multiple times)
          
          [env: RATE_MIRRORS_PROTOCOL=]

      --per-mirror-timeout <PER_MIRROR_TIMEOUT>
          Per-mirror speed test timeout in milliseconds. It is doubled in cases where slow connection times are detected
          
          [env: RATE_MIRRORS_PER_MIRROR_TIMEOUT=]
          [default: 8000]

      --min-per-mirror <MIN_PER_MIRROR>
          Minimum downloading time, required to measure mirror speed, in milliseconds
          
          [env: RATE_MIRRORS_MIN_PER_MIRROR=]
          [default: 300]

      --max-per-mirror <MAX_PER_MIRROR>
          Maximum downloading time, required to measure mirror speed, in milliseconds
          
          [env: RATE_MIRRORS_MAX_PER_MIRROR=]
          [default: 1000]

      --min-bytes-per-mirror <MIN_BYTES_PER_MIRROR>
          Minimum number of bytes to be downloaded, required to measure mirror speed
          
          [env: RATE_MIRRORS_MIN_BYTES_PER_MIRROR=]
          [default: 70000]

      --eps <EPS>
          Per-mirror: sigma to mean speed ratio
          
            1.0 -- 68% probability (1 sigma), no 100% error
            0.5 -- 68% probability (1 sigma), no 50% error;
            0.25 -- 68% probability (1 sigma), no 25% error;
            0.125 -- 95% probability (2 sigmas), no 25% error;
            0.0625 -- 95% probability (2 sigmas), no 12.5% error:
          
          [env: RATE_MIRRORS_EPS=]
          [default: 0.0625]

      --eps-checks <EPS_CHECKS>
          Per-mirror: after min measurement time elapsed, check such number of subsequently downloaded data chunks whether speed variations are less then "eps"
          
          [env: RATE_MIRRORS_EPS_CHECKS=]
          [default: 40]

      --concurrency <CONCURRENCY>
          Number of simultaneous speed tests
          
          [env: RATE_MIRRORS_CONCURRENCY=]
          [default: 16]

      --concurrency-for-unlabeled <CONCURRENCY_FOR_UNLABELED>
          Number of simultaneous speed tests for mirrors with unknown country
          
          [env: RATE_MIRRORS_CONCURRENCY_FOR_UNLABELED=]
          [default: 40]

      --max-jumps <MAX_JUMPS>
          Max number of jumps between countries, when finding top mirrors
          
          [env: RATE_MIRRORS_MAX_JUMPS=]
          [default: 7]

      --entry-country <ENTRY_COUNTRY>
          Entry country - first country (+ its neighbours) to test.
          You don't need to change it unless you are just curious.
          
          [env: RATE_MIRRORS_ENTRY_COUNTRY=]
          [default: US]

      --country-neighbors-per-country <COUNTRY_NEIGHBORS_PER_COUNTRY>
          Neighbor country to test per country
          
          [env: RATE_MIRRORS_COUNTRY_NEIGHBORS_PER_COUNTRY=]
          [default: 3]

      --country-test-mirrors-per-country <COUNTRY_TEST_MIRRORS_PER_COUNTRY>
          Number of mirrors to test per country
          
          [env: RATE_MIRRORS_COUNTRY_TEST_MIRRORS_PER_COUNTRY=]
          [default: 2]

      --top-mirrors-number-to-retest <TOP_MIRRORS_NUMBER_TO_RETEST>
          Number of top mirrors to retest
          
          [env: RATE_MIRRORS_TOP_MIRRORS_NUMBER_TO_RETEST=]
          [default: 5]

      --save <SAVE_TO_FILE>
          Filename to save the output to in case of success
          
          [env: RATE_MIRRORS_SAVE=]

      --allow-root
          Allow running by root
          
          [env: RATE_MIRRORS_ALLOW_ROOT=]

      --disable-comments
          Disable printing comments
          
          [env: RATE_MIRRORS_DISABLE_COMMENTS=]

      --disable-comments-in-file
          Disable printing comments to output file
          
          [env: RATE_MIRRORS_DISABLE_COMMENTS_IN_FILE=]

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version
1 Like
rate-mirrors

ist nicht zuständig für die eos mirrors (oder irre ich mich?).

Please look at file /etc/eos-rankmirrors.conf.
There are a few configurations that should help, like:

  • EOS_AUTORANK_TIMEOUT (default 30 seconds, maybe 5 is better for you?)
  • EOS_IGNORED_MIRRORS (add a list of mirror names to ignore them)
  • EOS_RANKMIRRORS_EXIT_CODE_VERBOSITY (level of verbosity on mirror failures)

Example:

EOS_AUTORANK_TIMEOUT=5   # or even less if possible
EOS_IGNORED_MIRRORS=(
    remi
    sjtu
)
EOS_RANKMIRRORS_EXIT_CODE_VERBOSITY=none

Mirror ranking takes time, and the timeout setting above can limit the time taken. You may want to experiment which timeout value is best for your case.

1 Like

Thx, I adjusted the settings in /etc/eos-rankmirrors.conf and for Arch-mirrors I enabled systemctl refracor.timer after going through the /etc/xdg/reflector/reflector.conf.

Would there be any concerns automating eos-rankmirrors with cron? so my maintenance mostly boils down to yay and pacdiff.

There are pros and cons.
Pros:

  • If a mirror is offline for longer time than expected, ranking can exclude the mirror (and later include it again when the mirror is available).

Cons:

  • Sometimes a mirror can be offline for a short time, and if cron happens to run at that time, the mirror list may not be optimal.

There’s also the question about whether to prefer the speed or age of mirrors. By default, eos-rankmirrors prefers age (i.e. the most up-to-date mirrors are first). You can use option --sort to change this.

If you know which mirrors are optimal in your case, then I wouldn’t recommend making it a cron job.
Instead, use variable ALWAYS_FIRST_EOS_MIRRORS in /etc/eos-rankmirrors.conf to list your preferred mirrors in order.
(This is my preferred setting.)

All in all, if the existing mirror list is working well, I see no real reason to automate the ranking process.