Comments (6)
@Phantop, just to make sure I understand this correctly: you're trying to build DwarFS image from a tree where single files have a size of 3.1GB; this single file by itself doesn't compress well, but it appears to be the root cause of
mkdwarfs
using an excessive amount of memory?
Yeah. The issue boils down to memory usage increasing to ludicrous levels with larger single file sizes, regardless of the size of the entire folder being compressed. I've had it happen in an 11GB folder with the largest file being ~650MB (which I managed to compress using lower memory and job options) and in a 7GB folder with a 1.1GB file (which required me to recompress). It's entirely due to single files.
This mostly makes sense. You can't change the block size (-S) during recompression, so that explains why it compresses much better with -S24. Nothing is stopping you from using -l0 -S24 initially if that helps. At -l0, the block size is 1MiB, just as with mksquashfs -b 1M, so again, no real surprise.
Yeah I'm aware of all this. just trying to make it clear that I have been able to compress images with these files, just after some workarounds. Really glad you're working on this!
from dwarfs.
@Phantop, just to make sure I understand this correctly: you're trying to build DwarFS image from a tree where single files have a size of 3.1GB; this single file by itself doesn't compress well, but it appears to be the root cause of mkdwarfs
using an excessive amount of memory?
from dwarfs.
What I did find instead was that using the -l0 option and then recompressing the image works in these cases without issue. Creating the initial image with -S24 results in very well recompressed files in these instances, the 3.1 GB file compressing down to 2.3 GB whereas the default block size for -l0 resulted in a 2.6 GB file (which is approx what mksquashfs -comp zstd -b 1M -Xcompression-level 22 also gave me).
This mostly makes sense. You can't change the block size (-S
) during recompression, so that explains why it compresses much better with -S24
. Nothing is stopping you from using -l0 -S24
initially if that helps. At -l0
, the block size is 1MiB, just as with mksquashfs -b 1M
, so again, no real surprise.
from dwarfs.
@Phantop, I know exactly what the problem is. I just tried compressing my directory of virtualbox images and RSS memory consumption went through the roof (I stopped the process when RSS hit 50 GiB).
It's definitely fixable, but it's not a trivial fix, so it might take a bit of time. In the meantime, I've got a workaround: pass --blockhash-window-sizes=-
. This may impact compression ratio a bit, but likely not as much as changing the block size. It should definitely fix your problem, though.
from dwarfs.
FYI, I've got a fix. (In fact, it's much more than a fix, it's a massive improvement that fixes this issue as a side-effect.)
from dwarfs.
Fixed in v0.4.0.
from dwarfs.
Related Issues (20)
- Unable to detect duplicate data between game savefiles of 30Mb each HOT 2
- fails to build with google-glog 0.7.0 HOT 3
- Some operating systems require a new folder/directory, others don't mount unless a directory already exists (non-universal binary) HOT 1
- (addition) Linux arm64 dwarfs binary build HOT 4
- cannot enter subdirs of overlayed dwarfs HOT 10
- Error while building HOT 2
- Fuse Passthrough
- Are the prebuilt binaries affected by xz/liblzma backdoor? HOT 6
- [Feature request] Allow providing dwarfs with a dedup library HOT 4
- official debian package, allow building without git? HOT 4
- mkdwarfs always crashes with SIGABRT HOT 13
- [MacOS] DwarFS mount not seen through Finder HOT 5
- [Core Dump] Signal 7 (SIGBUS) (code: nonexistent physical address) on making archive of currently running OS (possibly bad use case) HOT 2
- Homebrew formula HOT 18
- some problem on the README.md files. Please Check up and Fix. HOT 1
- read scalability issues with large archives HOT 9
- Unexpected exception: `inode has no file (any)` HOT 8
- [Feature Request] Mounting multiple archives to the same path HOT 12
- Segfault when using the mold linker HOT 2
- Cannot build v0.9.9 on Ubuntu 22.04 HOT 5
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 dwarfs.