On Monday 2014-09-15 12:38, Jan Engelhardt wrote:
On Monday 2014-09-15 11:04, 1xx wrote:
But these "rpm -qa" are slowly. (sometimes over 30 sec.)
I can understand that "rpm -qa"s are slow on VM. But I can not understand that "rpm -qa" is slow on some bare-metal machines.
rpmdb has terrible performance -- especially for dead-simple lists of installed packages (NEVR).
Perhaps someone should explore splitting data up into more tables, or adding indexes, or replacing the Berkeley DB backend by LMDB or SQLite.
The root of the problem is how it's stored. There is /var/lib/rpm/Packages, which in my case takes up some 142 MB for just 2270 packages. The utility "db48_dump" verifies this: there are 2270(+1) entries in that Berkeley file. On average, this means that each package has a value string that is almost 64K in size. That means you're either (a) reading the full ~64K for every package (b) reading some part of the string (to retrieve NEVR), and then seek the rest. and that would be my theory on why rpm spends so much time in reads. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org