On Sunday, 14 March 2021 08:46, Otto Moerbeek <o...@drijf.net> wrote: > On Sun, Mar 14, 2021 at 01:17:05AM +0000, Joseph Mayer wrote: > > > Hi, > > Apologies if I missed any earlier clarification on the mailing list of > > this question: > > What should the size of my swap partition be exactly, at least, for it > > to guaranteedly be big enough to contain a whole kernel crash dump, if > > the kernel crashes? > > I would presume the exact size of the RAM, or are there headings that add > > some bytes or kilobytes, or some further annotations that may take how > > much, a gigabyte extra? > > Thanks, > > Joseph > > A crash dump needs a bit more than physical RAM. If you use the > autoallocater when creating a disklabel, it uses max 2 * physmem + 256M, > to have room for two crash dumps. See > src/sbin/disklable/editor.c:editor_allocspace(). > > -Otto
Hi Otto, Thank you very much for your response. Just curious, when would a dump partition ever contain two crash dumps, would this be in case the subsequent reboot would crash before reaching savecore(8)? (Then followup on an old feature request: If crash dumping could be done to swap files would be great. To my best awareness this is not supported today. Actually for machines that ordinarily don't actually use swap memory anyhow as in all memory used always fits in RAM, crash dumping is the only reason to have a swap partition today.) Joseph