All of lore.kernel.org
 help / color / mirror / Atom feed
* [REQUEST] makedumpfile: stream compress flat ELF format with libz
@ 2020-05-12 17:25 Daniel Walker (danielwa)
  2020-05-12 17:38 ` John Donnelly
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Daniel Walker (danielwa) @ 2020-05-12 17:25 UTC (permalink / raw)
  To: kexec; +Cc: xe-linux-external(mailer list)


Hi,

I created an enhancement request for makedumpfile here,

https://github.com/makedumpfile/makedumpfile/issues/1

I found that compressing a flat core with gzip significantly reduces the size of
the core. Here were my findings,

32G flat elf core -E -F -d 0
33G kdump core -d 0
16G kdump compressed -c -d 0
1.9G flat elf core stream compressed with gzip -E -F -d 0

My feature request was to implement an option inside makedumpfile to gzip
compress the core output. This can already be accomplished by piping the core
thru the gzip tool, however, because makedumpfile already links against libz
having the option for makedumpfile to do it allows the gzip tools to be removed
from the crash kernels initramfs there by reducing the size.

Kazuhito Hagio had suggest adding the -C option instead of repurposing -c to do
this.

So a resulting command line might looks like this,

makedumpfile -C -F -E -d 31 /proc/vmcore core.gz

Thanks,
Daniel
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [REQUEST] makedumpfile: stream compress flat ELF format with libz
  2020-05-12 17:25 [REQUEST] makedumpfile: stream compress flat ELF format with libz Daniel Walker (danielwa)
@ 2020-05-12 17:38 ` John Donnelly
  2020-05-12 17:45   ` Daniel Walker (danielwa)
  2020-05-12 18:14 ` Guilherme Piccoli
  2020-05-12 19:20 ` HAGIO KAZUHITO(萩尾 一仁)
  2 siblings, 1 reply; 8+ messages in thread
From: John Donnelly @ 2020-05-12 17:38 UTC (permalink / raw)
  To: Daniel Walker (danielwa); +Cc: kexec, xe-linux-external(mailer list)



> On May 12, 2020, at 12:25 PM, Daniel Walker (danielwa) <danielwa@cisco.com> wrote:
> 
> 
> Hi,
> 
> I created an enhancement request for makedumpfile here,
> 
> https://urldefense.com/v3/__https://github.com/makedumpfile/makedumpfile/issues/1__;!!GqivPVa7Brio!LJIWfQ8ged-9RjjV00zqmBGbL2-UU0baDJmxqVXo5AxYcofHzP8oxfWHZZ4ijk6O9N9I$ 
> 
> I found that compressing a flat core with gzip significantly reduces the size of
> the core. Here were my findings,
> 
> 32G flat elf core -E -F -d 0
> 33G kdump core -d 0
> 16G kdump compressed -c -d 0
> 1.9G flat elf core stream compressed with gzip -E -F -d 0
> 
> My feature request was to implement an option inside makedumpfile to gzip
> compress the core output. This can already be accomplished by piping the core
> thru the gzip tool, however, because makedumpfile already links against libz
> having the option for makedumpfile to do it allows the gzip tools to be removed
> from the crash kernels initramfs there by reducing the size.
> 
> Kazuhito Hagio had suggest adding the -C option instead of repurposing -c to do
> this.
> 


  Hi Daniel. 

   -z happens to be used by tar and rsync to indicate compression ;-) . 





> So a resulting command line might looks like this,
> 
> makedumpfile -C -F -E -d 31 /proc/vmcore core.gz
> 
> Thanks,
> Daniel
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> https://urldefense.com/v3/__http://lists.infradead.org/mailman/listinfo/kexec__;!!GqivPVa7Brio!LJIWfQ8ged-9RjjV00zqmBGbL2-UU0baDJmxqVXo5AxYcofHzP8oxfWHZZ4ijsPXKz5A$ 


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [REQUEST] makedumpfile: stream compress flat ELF format with libz
  2020-05-12 17:38 ` John Donnelly
@ 2020-05-12 17:45   ` Daniel Walker (danielwa)
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Walker (danielwa) @ 2020-05-12 17:45 UTC (permalink / raw)
  To: John Donnelly; +Cc: kexec, xe-linux-external(mailer list)

On Tue, May 12, 2020 at 12:38:42PM -0500, John Donnelly wrote:
 
> 
>   Hi Daniel. 
> 
>    -z happens to be used by tar and rsync to indicate compression ;-) . 
> 
> 

This would be fine with me,

makedumpfile -z -F -E -d 31 /proc/vmcore core.gz


Daniel
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [REQUEST] makedumpfile: stream compress flat ELF format with libz
  2020-05-12 17:25 [REQUEST] makedumpfile: stream compress flat ELF format with libz Daniel Walker (danielwa)
  2020-05-12 17:38 ` John Donnelly
@ 2020-05-12 18:14 ` Guilherme Piccoli
  2020-05-12 18:27   ` Daniel Walker (danielwa)
  2020-05-12 19:20 ` HAGIO KAZUHITO(萩尾 一仁)
  2 siblings, 1 reply; 8+ messages in thread
From: Guilherme Piccoli @ 2020-05-12 18:14 UTC (permalink / raw)
  To: Daniel Walker (danielwa); +Cc: kexec, xe-linux-external(mailer list)

It's a quite interesting feature Daniel, thanks for the effort!
I'm curious about memory usage - did you somehow measure the
consumption with your patches vs. the regular kdump compression?

Thanks,


Guilherme

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [REQUEST] makedumpfile: stream compress flat ELF format with libz
  2020-05-12 18:14 ` Guilherme Piccoli
@ 2020-05-12 18:27   ` Daniel Walker (danielwa)
  2020-05-12 18:32     ` Guilherme Piccoli
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Walker (danielwa) @ 2020-05-12 18:27 UTC (permalink / raw)
  To: Guilherme Piccoli; +Cc: kexec, xe-linux-external(mailer list)

On Tue, May 12, 2020 at 03:14:49PM -0300, Guilherme Piccoli wrote:
> It's a quite interesting feature Daniel, thanks for the effort!
> I'm curious about memory usage - did you somehow measure the
> consumption with your patches vs. the regular kdump compression?

It's not really a memory consumption issue, it's a core size issue. The core
size is much smaller when compressed with gzip. I measured the core size with
different formats and gzip compressed.

Daniel
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [REQUEST] makedumpfile: stream compress flat ELF format with libz
  2020-05-12 18:27   ` Daniel Walker (danielwa)
@ 2020-05-12 18:32     ` Guilherme Piccoli
  2020-05-12 18:56       ` Daniel Walker (danielwa)
  0 siblings, 1 reply; 8+ messages in thread
From: Guilherme Piccoli @ 2020-05-12 18:32 UTC (permalink / raw)
  To: Daniel Walker (danielwa); +Cc: kexec, xe-linux-external(mailer list)

Sure, I understood that. I'm curious though about the memory
consumption of the compression operation, or put in other words: do we
need to increase crashkernel reserved memory if we plan to use your
gzip approach?
It's good to be sure about this, to evaluate the trade-off of core
file size vs. necessary reserved memory.

Thanks!

On Tue, May 12, 2020 at 3:27 PM Daniel Walker (danielwa)
<danielwa@cisco.com> wrote:
>
> On Tue, May 12, 2020 at 03:14:49PM -0300, Guilherme Piccoli wrote:
> > It's a quite interesting feature Daniel, thanks for the effort!
> > I'm curious about memory usage - did you somehow measure the
> > consumption with your patches vs. the regular kdump compression?
>
> It's not really a memory consumption issue, it's a core size issue. The core
> size is much smaller when compressed with gzip. I measured the core size with
> different formats and gzip compressed.
>
> Daniel

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [REQUEST] makedumpfile: stream compress flat ELF format with libz
  2020-05-12 18:32     ` Guilherme Piccoli
@ 2020-05-12 18:56       ` Daniel Walker (danielwa)
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Walker (danielwa) @ 2020-05-12 18:56 UTC (permalink / raw)
  To: Guilherme Piccoli; +Cc: kexec, xe-linux-external(mailer list)

On Tue, May 12, 2020 at 03:32:25PM -0300, Guilherme Piccoli wrote:
> Sure, I understood that. I'm curious though about the memory
> consumption of the compression operation, or put in other words: do we
> need to increase crashkernel reserved memory if we plan to use your
> gzip approach?
> It's good to be sure about this, to evaluate the trade-off of core
> file size vs. necessary reserved memory.

I'm not sure. I didn't measure this, but from my experience makedumpfile uses
more memory during dumping than gzip uses for compression. If our dump kernels
run out of memory it's usually something inside makedumpfile when it's removing
pages or something along those lines.

Daniel
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [REQUEST] makedumpfile: stream compress flat ELF format with libz
  2020-05-12 17:25 [REQUEST] makedumpfile: stream compress flat ELF format with libz Daniel Walker (danielwa)
  2020-05-12 17:38 ` John Donnelly
  2020-05-12 18:14 ` Guilherme Piccoli
@ 2020-05-12 19:20 ` HAGIO KAZUHITO(萩尾 一仁)
  2 siblings, 0 replies; 8+ messages in thread
From: HAGIO KAZUHITO(萩尾 一仁) @ 2020-05-12 19:20 UTC (permalink / raw)
  To: Daniel Walker (danielwa), kexec; +Cc: xe-linux-external(mailer list)

> -----Original Message-----
>
> Hi,
>
> I created an enhancement request for makedumpfile here,
>
> https://github.com/makedumpfile/makedumpfile/issues/1
>
> I found that compressing a flat core with gzip significantly reduces the size of
> the core. Here were my findings,
>
> 32G flat elf core -E -F -d 0
> 33G kdump core -d 0
> 16G kdump compressed -c -d 0
> 1.9G flat elf core stream compressed with gzip -E -F -d 0

The kdump-compressed format does per-page compression with compression level 1,
so depending on data in vmcore, gzip (with -6 by default) can compress one much
smaller like this.  Although I don't have a vmcore that shows such a drop in size
with gzip as far as I tested.

>
> My feature request was to implement an option inside makedumpfile to gzip
> compress the core output. This can already be accomplished by piping the core
> thru the gzip tool, however, because makedumpfile already links against libz
> having the option for makedumpfile to do it allows the gzip tools to be removed
> from the crash kernels initramfs there by reducing the size.

(personally I prefer piping it through gzip, but apparently there are cases where
the initramfs size needs to be minimized..)

>
> Kazuhito Hagio had suggest adding the -C option instead of repurposing -c to do
> this.
>
> So a resulting command line might looks like this,
>
> makedumpfile -C -F -E -d 31 /proc/vmcore core.gz

Yes, the existing -c option is for per-page compression and creates a dumpfile that
can be opened directly with crash utility, but stream compression is different.
So I'd like to separate it from the -c.

(as John commented, -z also might be good, but I wonder if someone might start to
want the same function with lzo or snappy..)

Anyway, I'll wait for patches for this enhancement.

Thanks,
Kazu

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-05-12 19:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12 17:25 [REQUEST] makedumpfile: stream compress flat ELF format with libz Daniel Walker (danielwa)
2020-05-12 17:38 ` John Donnelly
2020-05-12 17:45   ` Daniel Walker (danielwa)
2020-05-12 18:14 ` Guilherme Piccoli
2020-05-12 18:27   ` Daniel Walker (danielwa)
2020-05-12 18:32     ` Guilherme Piccoli
2020-05-12 18:56       ` Daniel Walker (danielwa)
2020-05-12 19:20 ` HAGIO KAZUHITO(萩尾 一仁)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.