You are not logged in.
Hello,
I have a computer with a very, very slow storage. /var/cache/pacman is a tmpfs on it, to limit disk utilization.
But since pacman 7, downloads are now very slow, so it’s obviously done on the disk. But where? How can I make pacman download to tmpfs again? I did not found any configuration for this, the man page only show the CacheDir option, which is only used after the download as far as I understand.
Enabling DisableSandbox and disabling DownloadUser don’t fix it, it’s still downloading at the disk’s very slow rate (it even fails sometimes).
Thanks.
Last edited by Breizh (2024-09-19 21:03:18)
Offline
downloads are now very slow, so it’s obviously done on the disk
… or a slow mirror or general network problems?
Cause
it even fails sometimes
is rather not a thing, the kernel would cache the file in RAM until it can get flushed. I guess if you've go a huge file, little RAM and *very* slow writes you might eventually fail to flush the cache, stall libcurl and that might get you a timeout?
But it's *way* more likely that you're downloading from a bad mirror or there's a general network issue.
https://archlinux.org/packages/extra/any/reflector/
And get ABBS for a rudimentary speedtest.
CacheDir = /path/to/cache/dir
Overrides the default location of the package cache directory. The default is /var/cache/pacman/pkg/. Multiple cache directories can be specified, and they are tried in the order they are listed in the config file. If a file is not found in any cache directory, it will be downloaded to the first cache directory with write access. NOTE: this is an absolute path, the root path is not automatically prepended.
You could also checklsof on pacman.
lsof -p $(pidof pacman)
Offline
It worked well just before the update (and after it I couldn’t try much because how slow it was), but you’re right, it seems likes it was a coincidence. But I don’t understand how it could download as the alpm user into the cache directory since the cache directory is owned by root without write permission for other users…
But it seems like it works now (without sandboxing because the kernel on this computer don’t support landlock), so… my bad.
Thanks for the answer.
Offline
But I don’t understand how it could download as the alpm user into the cache directory since the cache directory is owned by root without write permission for other users…
The privileged user creates a subdirectory in the cache directory to which the download user has write permissions.
Offline
The privileged user creates a subdirectory in the cache directory to which the download user has write permissions.
Oh. KISS, obviously. ^^’
Offline