Thread (31 messages) 31 messages, 8 authors, 2020-09-05

Re: new database files not compressed

From: Nikolay Borisov <hidden>
Date: 2020-08-31 12:57:51


On 31.08.20 г. 15:54 ч., Hamish Moffatt wrote:
On 31/8/20 9:15 pm, Roman Mamedov wrote:
quoted
On Mon, 31 Aug 2020 18:53:54 +1000
Hamish Moffatt [off-list ref] wrote:
quoted
$ sudo mount -O compress-force=zstd /dev/sdb /mnt/test
Specifying the filesystem mount options is done with -o, not -O.
See "man mount".
Argh, I messed up the dd test. It does work for dd from /dev/zeroes when
mounted properly. It still doesn't compress my Firebird files though.


$ mount | grep btrfs
/dev/sdb on /mnt/test type btrfs
(rw,relatime,compress-force=zstd:3,space_cache,subvolid=5,subvol=/)
$ dd if=/dev/zero of=zeroes bs=32k count=1024
1024+0 records in
1024+0 records out
33554432 bytes (34 MB, 32 MiB) copied, 0.0244041 s, 1.4 GB/s
$ sudo compsize zeroes
Type       Perc     Disk Usage   Uncompressed Referenced
TOTAL        3%      1.0M          32M          32M
zstd         3%      1.0M          32M          32M
$ zcat ~/*.zip | gbak -REP -page 16384 stdin test2.fdb
$ sudo compsize test2.fdb
Type       Perc     Disk Usage   Uncompressed Referenced
TOTAL      100%      194M         194M         191M
none       100%      194M         194M         191M
$ isql-fb
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'test3.fdb' page_size 16384;
SQL> ^D
$ sudo compsize test3.fdb
Type       Perc     Disk Usage   Uncompressed Referenced
TOTAL      100%      2.2M         2.2M         2.2M
none       100%      2.2M         2.2M         2.2M
This means the data being passed to btrfs is not compressible. I.e after
coompression the data is not smaller than the original, input data.
Hamish
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help