Menu

1 / 5

Fitting Gentoo in redb

DEV Community: rust·Luca Barbato·8 days ago
#TnBM1mlv
#devtorust#devto#dev#redb#files
Reading 0:00
15s threshold

portage-cli is a Rust reimplementation of Gentoo's Portage tools; Like Portage, it reads the package repository from the file system: ~132k files plus some more if you are using git as backend:

What Files Share of files Size Avg per file

Ebuilds ( cat/pkg/*.ebuild ) 33,788 25.5% 56.5 MiB 1.7 KiB

md5-cache ( metadata/md5-cache/ ) 33,788 25.5% 64.7 MiB 2.0 KiB

Package metadata.xml 19,460 14.7% 9.5 MiB 0.5 KiB

files/ (patches, configs, init scripts) 18,375 13.9% 26.0 MiB 1.5 KiB

Manifest 18,220 13.8% 28.1 MiB 1.6 KiB

metadata/glsa/ (security advisories) 3,855 2.9% 9.6 MiB 2.6 KiB

profiles/ 3,414 2.6% 2.9 MiB 0.9 KiB

licenses/ 645 0.5% 4.9 MiB 7.7 KiB

metadata/ other (news, DTDs, QA checks, …) 279 0.2% 2.0 MiB 7.3 KiB

eclass/ 255 0.2% 2.3 MiB 9.4 KiB

Category metadata.xml 174 0.1% 0.2 MiB 1.2 KiB

Top-level files, .github/ , scripts/ 8 <0.1% <0.1 MiB —

Total 132,261 100% 207 MiB 1.6 KiB

That is a lot of small files to sync, store and stat.

Since on file systems like ext4 it does have a large…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.