Bug 1225400

Summary: Stop downloading same data for each user
Product: [Fedora] Fedora Reporter: Marcin Juszkiewicz <mjuszkie>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jsilhan, mluscon, packaging-team-maint, pnemade, rholy, tim.lauridsen, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-30 14:51:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marcin Juszkiewicz 2015-05-27 09:59:46 UTC
Description of problem:

As most of Fedora users I use root account only when needed. One of such situations is system update which in my case is "dnf clean metadata;dnf update -y;dnf update -y --best" (force update of repos, do update, show me which out-of-fedora packages needs rebuilding).

It works fine. But if I want to check something as normal user dnf starts to fetch repository metadata again. If I do "sudo samednfcommand" then it uses already downloaded one.

And now imagine system with 50 users logged in and each of them calls "dnf info tmux"... 

Version-Release number of selected component (if applicable):

1.0.0-1.fc23

How reproducible:

always

Steps to Reproduce:
1. sudo dnf clean metadata
2. sudo dnf info tmux
3. sudo dnf info tmux
4. dnf info tmux

Actual results:

11:53 hrw@puchatek:~$ time sudo dnf clean metadata
Cleaning repos: bluejeans dvratil-plasma-5 skype google-talkplugin fedora-rawhide-kernel-nodebug virtualbox fedora-rawhide-kernel-nodebug-source
              : google-chrome rpmfusion-free-rawhide rawhide
34 metadata files removed
21 dbcache files removed

real    0m0.508s
user    0m0.275s
sys     0m0.212s
11:53 hrw@puchatek:~$ time sudo dnf info tmux
Skype Repository                                                                                                   1.2 kB/s | 1.8 kB     00:01    
Fedora - Rawhide - Developmental packages for the next Fedora release                                              8.9 MB/s |  42 MB     00:04    
RPM Fusion for Fedora Rawhide - Free                                                                               364 kB/s | 551 kB     00:01    
Blue Jeans Network, Inc. - x86_64 software and updates                                                             8.9 kB/s |  18 kB     00:01    
Copr repo for plasma-5 owned by dvratil                                                                            157 kB/s | 229 kB     00:01    
google-talkplugin                                                                                                  1.7 kB/s | 2.7 kB     00:01    
Rawhide kernels built without debugging turned on                                                                  175 kB/s | 264 kB     00:01    
Fedora 23 - x86_64 - VirtualBox                                                                                     30 kB/s |  44 kB     00:01    
Rawhide kernels built without debugging turned on - Source                                                         1.8 kB/s | 2.6 kB     00:01    
google-chrome                                                                                                      2.2 kB/s | 3.6 kB     00:01    
Last metadata expiration check performed 0:00:00 ago on Wed May 27 11:54:23 2015.
Installed Packages
Name        : tmux
Arch        : x86_64
Epoch       : 0
Version     : 2.0
Release     : 1.fc23
Size        : 600 k
Repo        : @System
From repo   : fedora
Summary     : A terminal multiplexer
URL         : http://sourceforge.net/projects/tmux
License     : ISC and BSD
Description : tmux is a "terminal multiplexer."  It enables a number of terminals (or
            : windows) to be accessed and controlled from a single terminal.  tmux is
            : intended to be a simple, modern, BSD-licensed alternative to programs such
            : as GNU Screen.


real    1m4.035s
user    0m17.946s
sys     0m11.394s
11:54 hrw@puchatek:~$ time sudo dnf info tmux
Last metadata expiration check performed 0:01:05 ago on Wed May 27 11:54:23 2015.
Installed Packages
Name        : tmux
Arch        : x86_64
Epoch       : 0
Version     : 2.0
Release     : 1.fc23
Size        : 600 k
Repo        : @System
From repo   : fedora
Summary     : A terminal multiplexer
URL         : http://sourceforge.net/projects/tmux
License     : ISC and BSD
Description : tmux is a "terminal multiplexer."  It enables a number of terminals (or
            : windows) to be accessed and controlled from a single terminal.  tmux is
            : intended to be a simple, modern, BSD-licensed alternative to programs such
            : as GNU Screen.


real    0m0.581s
user    0m0.385s
sys     0m0.176s
11:55 hrw@puchatek:~$ time dnf info tmux
Fedora 23 - x86_64 - VirtualBox                                                                                     31 kB/s |  44 kB     00:01    
Rawhide kernels built without debugging turned on                                                                  184 kB/s | 264 kB     00:01    
Blue Jeans Network, Inc. - x86_64 software and updates                                                             8.9 kB/s |  18 kB     00:01    
Rawhide kernels built without debugging turned on - Source                                                         1.8 kB/s | 2.6 kB     00:01    
google-chrome                                                                                                      2.4 kB/s | 3.6 kB     00:01    
google-talkplugin                                                                                                  1.9 kB/s | 2.7 kB     00:01    
Copr repo for plasma-5 owned by dvratil                                                                            159 kB/s | 229 kB     00:01    
Fedora - Rawhide - Developmental packages for the next Fedora release                                              9.2 MB/s |  42 MB     00:04    
RPM Fusion for Fedora Rawhide - Free                                                                               376 kB/s | 551 kB     00:01    
Skype Repository                                                                                                   1.2 kB/s | 1.8 kB     00:01    
Last metadata expiration check performed 0:00:00 ago on Wed May 27 11:56:13 2015.
Installed Packages
Name        : tmux
Arch        : x86_64
Epoch       : 0
Version     : 2.0
Release     : 1.fc23
Size        : 600 k
Repo        : @System
From repo   : fedora
Summary     : A terminal multiplexer
URL         : http://sourceforge.net/projects/tmux
License     : ISC and BSD
Description : tmux is a "terminal multiplexer."  It enables a number of terminals (or
            : windows) to be accessed and controlled from a single terminal.  tmux is
            : intended to be a simple, modern, BSD-licensed alternative to programs such
            : as GNU Screen.


real    0m40.836s
user    0m4.319s
sys     0m2.342s
11:56 hrw@puchatek:~$ 

And that's with local w3cache...

Expected results:

"dnf info tmux" giving info in few seconds.

Additional info:

APT in Debian uses repository information from system.

Comment 1 Radek Holy 2015-06-30 14:51:17 UTC
Hello, this is a duplicate of the bug 1190548 which is going to share the resolution with the bug 1185741.


(In reply to Marcin Juszkiewicz from comment #0)
> "dnf clean metadata;dnf update -y;dnf update -y --best"

FYI, you can use "dnf --refresh -y update" instead of "dnf clean metadata;dnf -y update". And you may want to follow the bug 1210445 in order to get rid of the "dnf -y --best update".

*** This bug has been marked as a duplicate of bug 1185741 ***