Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format zram as btrfs? #15

Open
steelcowboy opened this issue Aug 5, 2016 · 4 comments
Open

Format zram as btrfs? #15

steelcowboy opened this issue Aug 5, 2016 · 4 comments

Comments

@steelcowboy
Copy link

So I use btrfs and love the space savings. I want to run my desktop system live and noticed from testing that btrfs allows for immense savings in zram (I have 10 100MB files full of zeros in a 512MB zram partition, uses 40MB).

Would it be possible to have an oroot=live option but also have the ability to set the zram device to be formatted as btrfs instead of ext2? My main question, however, is would there be any issues to doing this?

Btw my mount command for the zram was:
mount -o noatime,autodefrag,compress=lzo,space_cache /dev/zram0 /mnt

@steelcowboy
Copy link
Author

http://devjimheald.com/ramresults.txt

Here are some benchmarks with this vs my SSD. I didn't care about ext4 because I was mainly interested in compression. I used random data for my files and zram still destroys my SSD! Really looking forward to keeping my root in a compressed btrfs partition in the RAM!

@bluerider
Copy link
Owner

bluerider commented Aug 7, 2016

That is rather peculiar. Are you using lzo compression for your btrfs formatted zram block device?
It is especially strange since you're using random data which shouldn't even be compressible.

@steelcowboy
Copy link
Author

Sorry for the confusion! The benchmarks were done on random data, my first post was regarding files of only zeros.

To be clear, what I'm saying is: with btrfs and compression you not only will save space (and therefore RAM) but -- even with compression -- you'll still get much better performance than having the root on the SSD.

@bluerider
Copy link
Owner

For the former: My comment was regarding the random data. It's peculiar that you had better performance with btrfs formatted zram block devices considering that zram is already lzo compressed. BTRFS compression is basically lzo on lzo on normally incompressible data.

For the latter:
It's expected that liveroot will have better performance due to writes occuring on ram. I'm a bit puzzled on the btrfs + compression statement as indicated in the previous point. Can you try using lz4 compression and seeing if there's any difference?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants