HelloZeroNet / HelloZeroNet/ZeroNet
Average file size in Zeronet directory (alot of 1 and 8 kilobyte files)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.8k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
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.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100