Comments (8)
The first part, reducing buffer size, works even far more impressively on my test filesystem. That's pure awesomesity!
On the other hand, using max_object beyond the st_ino, makes it slower by ~11%, on the same filesystem.
from compsize.
Branch with both changes applied: https://github.com/kilobyte/compsize/tree/loop_retry
from compsize.
On the other hand, using max_object beyond the st_ino, makes it slower by ~11%, on the same filesystem.
That's interesting. Any idea why?
Hmmm...maybe the other max_ fields should be set differently. It will be fetching two inodes' complete extent maps. Maybe set max_type to BTRFS_INODE_ITEM, so it stops when it reaches the next inode, but doesn't dump out its extent list?
from compsize.
That would be:
min = (st_ino, BTRFS_EXTENT_DATA_KEY, 0),
max = (st_ino + 1, BTRFS_INODE_ITEM_KEY, 0)
That should make the search stop as soon as it finds the next inode, without including the inode's extents (or directory entries, if the next inode is a directory). At the end of the subvol it will have to do another 0-item loop, but usually there are a lot more inodes than subvols.
from compsize.
This helped, but is still slower than continuing if previous run had >512.
from compsize.
Guys this is super cool! compsize
run on one sample directory on my system is just 0.15s with loop_retry branch while it takes 5.5s with version from package manager. loop_retry branch allowed me to calculate which directories are actually take space!
Why is this not merged already? I suspect you'd like to get it perfect before merging. Is it possible to make release with main improvement and ponder about fine tuning afterwards?
from compsize.
@Self-Perfection: what version are you comparing with? 1,5 should have the buffer size speedup.
If the alternate retry condition makes such a large difference that's good to hear — but, I suspect your distro release has a version older than 1.5. Care to check?
from compsize.
@kilobyte you are right. My distro has older compsize version. Thank you for pointing this out.
from compsize.
Related Issues (20)
- compsize shows 1,6gb uncompressed despite compress-force=lzo is set on the btrfs fs HOT 9
- Exclusive / shared usage HOT 3
- wrong size: 1036 bytes file reported as 140M HOT 10
- Show sparse usage. HOT 1
- Change the name to btrfs-compsize HOT 4
- Error messages with Kernel 5.8.8 HOT 13
- compsize should also show dedupe% and total% not only comp% HOT 6
- Regular extent's header not 53 bytes (0) long?!? HOT 1
- compsize could be more user-friendly (from an enduser perspective) HOT 2
- Support DESTDIR in Makefile
- Issues reported by static analysis HOT 1
- Option to always shows count of extents
- Makefile: Ensure that MAN_I directory exists
- Setuid root? HOT 3
- Add option to set fixed output format for size or at least raw bytes HOT 1
- Option to print each file HOT 4
- Feature request: compsize --find HOT 3
- Is the extent number accurate for telling file's fragmentation for compressed files? HOT 17
- Crazy values HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compsize.