Poll: How users use DNF
Miroslav Suchý
msuchy at redhat.com
Thu Dec 11 16:28:03 UTC 2014
On 12/11/2014 12:56 PM, Dan Horák wrote:
> On Wed, 10 Dec 2014 14:20:32 -0800
> Samuel Sieb <samuel at sieb.net> wrote:
>
>> On 12/10/2014 02:09 PM, Marcin Juszkiewicz wrote:
>>> I am using web proxy on Synology NAS at home and all my Fedora
>>> machines use it for dnf/yum fetching. With on-disk cache set to
>>> 10GB it makes all system upgrades and mock builds very fast.
>>>
>> How does the proxy work with the various mirrors? Do you have client
>> side settings to deal with that?
>>
>> I wrote my own proxy in python that is specifically for yum and
>> matches filenames from any url. It's quite a hack and fails once in
>> a while, but it saves me a huge amount of time and bandwidth with the
>> large amount of Fedora computers I manage. I suppose I could mirror
>> the whole thing locally, but this way I only download the packages I
>> need as I need them.
>
> http://sharkcz.livejournal.com/2534.html
Some variables for squid, which we used in Spacewalk Proxy and you can find it useful:
# Average object size, used to estimate number of objects your
# cache can hold. The default is 13 KB.
# I done the calculation across all RHEL package we had in DB several years ago
store_avg_object_size 817 KB
# rpm will hardly ever change, force to chache it for very long time
refresh_pattern \.rpm$ 10080 100% 525960 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern . 0 100% 525960
# if transport is canceled, finish downloading anyway
quick_abort_pct -1
quick_abort_min -1 KB
# when range is required, download whole file anyway
# when we request rpm header, we will nearly always get
# request for the rest of the file
range_offset_limit -1 KB
# we download only from 1 server, default is 1024
# which is too much for us
fqdncache_size 4
And of course, it is good idea to tune this according your HW:
cache_mem 400 MB
maximum_object_size 200 MB
maximum_object_size_in_memory 1024 KB
# Size should be about 60% of your free space
cache_dir ufs /var/spool/squid 15000 16 256
--
Miroslav Suchy, RHCE, RHCDS
Red Hat, Senior Software Engineer, #brno, #devexp, #fedora-buildsys
More information about the devel
mailing list