HelloZeroNet / HelloZeroNet/ZeroNet

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

オープン
#2,729 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
18.8k
フォーク
2.3k
PR マージ指標
30日以内にマージされた PR はありません

説明

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)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
linux
領域
operating-systems, performance
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
18/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。