scylladb / scylla-machine-image

Apache License 2.0
18 stars 25 forks source link

scylla_coredump_setup should be called with --compress to enable zstd compression of the core dumps #462

Open mykaul opened 1 year ago

mykaul commented 1 year ago

Need to verify, but if Ubuntu 22.2 LTS systemd is compiled with zstd as default compression, we must configure the coredump to be compressed. This will reduce significantly the time it takes to write the coredump, to transfer it, etc. Example:

ykaul@ykaul Downloads]$ file ip-172-18-2-215
ip-172-18-2-215: ELF 64-bit LSB core file, x86-64, version 1 (SYSV), SVR4-style, from '/usr/bin/scylla --log-to-syslog 1 --log-to-stdout 0 --default-log-level info --', real uid: 114, effective uid: 114, real gid: 120, effective gid: 120, execfn: '/opt/scylladb/libexec/scylla', platform: 'x86_64'
[ykaul@ykaul Downloads]$ du -ch ip-172-18-2-215
14G ip-172-18-2-215
14G total
[ykaul@ykaul Downloads]$ time zstd ip-172-18-2-215
ip-172-18-2-215      : 11.17%   (  13.8 GiB =>   1.55 GiB, ip-172-18-2-215.zst)
real    0m19.028s
user    0m20.921s
sys 0m3.490s
[ykaul@ykaul Downloads]$ du -ch ip-172-18-2-215.zst
1.6G    ip-172-18-2-215.zst
1.6G    total

I had an ever more drastic example of 111GB compressed by 90% reduction of size.

mykaul commented 2 months ago

Example for benefit (not only faster, but takes far less space) - see https://github.com/scylladb/scylla-cluster-tests/issues/7234#issuecomment-2094757695

syuu1228 commented 1 month ago

Sent patch to enable compress by default when ZSTD detected: https://github.com/scylladb/scylladb/pull/18854

Implemented it on scylla_coredump_setup not machine-image script, since this looks like generic issue not just machine-image.