On Wed, Jun 11, 2014 at 08:39:05PM +0800, Baoquan He wrote: > User want to get a rough estimate of vmcore size, then they can decide > how much storage space is reserved for vmcore dumping. This can help them > to deploy their machines better, possibly hundreds of machines. > > In this draft patch, a new configuration option is added, > "--vmcore-estimate" > User can execute below command to get a dumped kcore. Since kcore is a > elf file to map the whole memory of current kernel, it's equal to the > memory of crash kernel though it's not exact. Content of kcore is dynamic > though /proc/vmcore is fixed once crash happened. But for vmcore size > estimate, it is better enough. > > sudo makedumpfile -E -d 31 --vmcore-estimate /proc/kcore /var/crash/kcore-dump > > Questions: > 1. Or we can get the dumpable page numbers only, then calculate the estimated > vmcore size by a predifined factor if it's kdump compressed dumping. E.g if > lzo dump, we assume the compression ratio is 45%, then the estimate size is > equal to: (dumpable page numbers) * 4096* 45%. I think that we can probably not guess the saving from compression. Compression ratio varies based on content of page. So if we keep it simple and just calculate the number of pages which will be dumped and multiply it by page size, that number will be much more accurate (for current system). Thanks Vivek