LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-19-2019, 04:56 AM   #1
qrange
Senior Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,061

Rep: Reputation: 47
.vdi transparent compression btrfs/zfs


is there any point in using transparent compression on very large files that are frequently modified such as .vdi images?
I've read that btrfs compresses file-by-file not by blocks, so vbox would become very slow if vdi is compressed?

I'd like to create compressed writable filesystem partition just for .vdi

thanks.
 
Old 11-19-2019, 10:52 PM   #2
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
with zfs, lz4 compression

a 21G .qcow2 reported by ( du -h ) as 6.7G
in the VM, df -h / reports 8.6G ( and ncdu / as 8.5G )

I've not benchmarked performance, but I wouldn't describe it as slow

vdi is also sparse?
so I would expect similar compression
which is of course dependent on the actual data

it has been a while since I use btrfs, I think I did turn off compression for images, not sure it made much difference

I do remember you had to make a copy after changing per file attr
or some such similar juggling.
I think I had to set attr of the dir, move file out and then copy back in and delete the "original" file
 
1 members found this post helpful.
Old 11-21-2019, 02:11 AM   #3
qrange
Senior Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,061

Original Poster
Rep: Reputation: 47
thanks.
vdi is dynamic.
I've used btrfs with zstd and it seems to work fine, 50% is compressible with force option:
Code:
compsize win7-64.vdi 
Type       Perc     Disk Usage   Uncompressed Referenced  
TOTAL       59%       13G          23G          23G       
none       100%       11G          11G          11G       
zstd        20%      2.4G          11G          11G
btrfs wiki says:
"Compression does not work with direct IO (DIO), does work with COW (the default) and does not work for NOCOW files. If a file is opened in DIO mode, it will fall back to buffered IO."

I think vbox uses DIO. I've enabled 'host-caching', it might matter.
 
Old 11-22-2019, 01:40 AM   #4
qrange
Senior Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,061

Original Poster
Rep: Reputation: 47
haven't noticed any slowdown, defragmenting the vdi might help.

deduplication should also help if we have several .vdi with same OS. have you tried it?

Last edited by qrange; 11-22-2019 at 01:49 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
btrfs compression increases data size?? linuxlicious Linux - General 3 09-17-2014 12:30 AM
ext4 vs btrfs, and with btrfs do I still need to use LVM? blue_k Linux - Software 4 08-17-2012 11:31 PM
[SOLVED] Question about BtrFS filesystem compression. silvyus_06 Linux - Newbie 2 02-09-2011 12:03 AM
LXer: Using Disk Compression With Btrfs To Enhance Performance LXer Syndicated Linux News 0 08-29-2010 05:20 AM
Slax with SquashFS-4 new compression algorithm and layered compression ratios? lincaptainhenryjbrown Linux - Software 2 06-19-2009 05:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration