HelloZeroNet / HelloZeroNet/ZeroNet

Average file size in Zeronet directory (alot of 1 and 8 kilobyte files)

Ouverte
#2,729 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
18.8k
Forks
2.3k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Interesting Linux command can show the file size distribution in the ZN directories:

```
find /path/of/zeronet/ -type f -print0 2>/dev/null| xargs -0 ls -l 2>/dev/null| awk '{ n=int(log($5)/log(2)); if (n<10) { n=10; } size[n]++ } END { for (i in size) printf("%d %d\n", 2^i, size[i]) }' | sort -n | awk 'function human(x) { x[1]/=1024; if (x[1]>=1024) { x[2]++; human(x) } } { a[1]=$1; a[2]=0; human(a); printf("%3d%s: %6d\n", a[1],substr("kMGTEPYZ",a[2]+1,1),$2) }'
1k: 403007
2k: 33644
4k: 48356
8k: 155711
16k: 62305
32k: 52709
64k: 47308
128k: 44223
256k: 35698
512k: 32049
1M: 34376
2M: 22291
4M: 38327
8M: 8134
16M: 2448
32M: 1346
64M: 1948
128M: 1438
256M: 379
512M: 276
1G: 124
2G: 3
```

Which makes me think what should be the optimal block size of the HDD's filesystem.

Btw. the ZFS filesystem has option to automatically place files smaller than certain size to special, usually fast SSD drive and rest keep on slow large capacity HDD:
https://forum.level1techs.com/t/zfs-metadata-special-device-z/159954
zpool add zpoolname special mirror /dev/nvme0n1 /dev/nvme1n1 mirror /dev/nvme2n1 /dev/nvme3n1
zfs set special_small_blocks=64K zpoolname
(i am guessing that it works only on newly added files though)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

No project files, tests, or entry points are identified. First clarify whether this is a request for ZeroNet storage guidance or a code change, then define a measurable outcome for filesystem block-size or small-file handling before looking for an implementation location.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
linux
Domaine
operating-systems, performance
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
18/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.