You are not logged in.

#1 2024-09-19 18:46:08

Breizh
Member
From: France
Registered: 2018-06-11
Posts: 9
Website

[SOLVED] Where is the download folder with pacman 7?

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

#2 2024-09-19 20:33:58

seth
Member
Registered: 2012-09-03
Posts: 60,776

Re: [SOLVED] Where is the download folder with pacman 7?

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.


man 5 pacman.conf wrote:

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

#3 2024-09-19 21:03:01

Breizh
Member
From: France
Registered: 2018-06-11
Posts: 9
Website

Re: [SOLVED] Where is the download folder with pacman 7?

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

#4 2024-09-19 22:03:07

loqs
Member
Registered: 2014-03-06
Posts: 18,213

Re: [SOLVED] Where is the download folder with pacman 7?

Breizh wrote:

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

#5 2024-09-19 22:19:13

Breizh
Member
From: France
Registered: 2018-06-11
Posts: 9
Website

Re: [SOLVED] Where is the download folder with pacman 7?

loqs wrote:

The privileged user creates a subdirectory in the cache directory to which the download user has write permissions.

Oh. KISS, obviously. ^^’

Offline

Board footer

Powered by FluxBB