Apt-cacher-ng no hits and requests, upgrades are slow too

Hi, as the title says, I am experiencing a problem where apt-cacher-ng is insanely slow, and has no hits at all.

Cache efficiency
  	Requests 	  	            Data
  	Hits 	Misses 	Total 	  	Hits 	Misses 	Total
 	9 (0.91%)	981 (99.09%)	990	 	0.00 MiB (0.00%)	3088.94 MiB (100.00%)	3088.94 MiB
 	1 (0.08%)	1315 (99.92%)	1316	 	127.48 MiB (4.40%)	2766.83 MiB (95.60%)	2894.31 MiB
 	19 (4.24%)	429 (95.76%)	448	 	177.73 MiB (7.11%)	2322.59 MiB (92.89%)	2500.32 MiB

Everything is working as usual am I missing something? my disk space is like 20 gb bind-dirs are setup and it has enough ram

There’s something seriously wrong here, but without more information
it’s hard to diagnose.
By contrast, on this system, Hits average around 75%, across numerous
template updates.
The only time I would expect to see results like yours would be when
the cache is being set up for the first time.
Alternatively I could imagine that this occurs if repositories are not
being correctly remapped

How did you set up this caching proxy?
How are the templates set up to use it?
What templates are you using?
Can you check the contents of /rw/bind-dirs/var/cache/apt-cacher-ng/,
and confirm that the contents cohere with /etc/var/cache/apt-cacher-ng/,
and that the largest subdirectories are remapped, like debrep, fedrep.

I never presume to speak for the Qubes team. When I comment in the Forum I speak for myself.

reposting since unman cant see edits

reposting since unman cant see edits

The configuration of the /rw/config/qubes-bind-dirs.d/50_user.conf

binds+=( '/var/cache/apt-cacher-ng' )
binds+=( '/var/log/apt-cacher-ng' )
binds+=( '/etc/apt-cacher-ng/acng.conf' )
binds+=( '/etc/apt-cacher-ng/archlx_mirrors_extra' )
binds+=( '/etc/apt-cacher-ng/debian_mirrors_extra' )
binds+=( '/etc/apt-cacher-ng/fedora_mirrors_extra' )

(repost since you cant see edits)
Hello @unman,

I used your salt script to setup this caching proxy,

Exactly described like in your github guide like http://HTTPS

Inside /rw/bind-dirs/var/cache/apt-cache-ng/ there is indeed debrep and fedrep, There is no folder such as /etc/var/cache/apt-cacher-ng/ /var/cache/apt-cacher-ng does exist.

Debian & Fedora, commented out everything that has to do with kicksecure and whonix

It’s a bit strange because I have the same contents of apt-cacher-ng in /rw/bind-dirs/etc/apt-cacher-ng/ as in /etc/apt-cacher-ng/, Are these two locations conflicting with each other? or is that the point of bind-dirs?

No, that’s how bind mounts work. The binds are mounted over the
destination - result is that it looks like two locations, but they are
one.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

/var/cache/apt-cacher-ng should also contain debrep and fedrep.
/etc/var/cache/apt-cacher-ng/ is garbage of my making - ignore it.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

1 Like

… looks good.
Connect a qube with netvm set as cacher, open a
browser, and connect to IP_ADDRESS_OF_CACHER:8082

You should see welcome page for apt-cacher-ng.
Run some maintenance tasks to see if you have garbage in the
cached repositories.

Then open a terminal in cacher, and run:
watch -n1 tail /var/log/apt-cacher-ng/apt-cacher.log
Run update in a template.
Observe logging. Report.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

The cache efficiency

Cache efficiency
  	Requests 	  	            Data
  	Hits 	Misses 	Total 	  	Hits 	Misses 	Total
 	55 (2.28%)	2354 (97.72%)	2409	 	419.74 MiB (15.05%)	2369.76 MiB (84.95%)	2789.49 MiB
 	24 (5.36%)	424 (94.64%)	448	 	309.96 MiB (37.46%)	517.50 MiB (62.54%)	827.46 MiB
 	5 (0.48%)	1028 (99.52%)	1033	 	0.00 MiB (0.00%)	4250.51 MiB (100.00%)	4250.51 MiB

Some what an improvement but why are the Requests so low?
The logging I can see the packages coming through and it works so I don’t know, what to look further for.