Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Feb 2001 13:44:32 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        <arch@freebsd.org>
Subject:   Re: sparse core dumps
Message-ID:  <Pine.BSF.4.31.0102131343270.62815-100000@herring.nlsystems.com>
In-Reply-To: <xzpsnlizqtx.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On 13 Feb 2001, Dag-Erling Smorgrav wrote:

> I finally found the time to finish hacking savecore(8) to generate
> sparse dumps. The good news is it's even noticeably faster than the
> old version :) There's a patch up on freefall:
>
>     http://people.freebsd.org/~des/software/savecore-20010213.diff
>
> Here's a side-by-side comparison (using a version of savecore(8) that
> doesn't clear the dump after saving it):
>
> root@rsa /var/crash2# time savecore $(pwd)
> savecore: reboot after panic: from debugger
> savecore: system went down at Tue Feb 13 11:33:22 2001
> savecore: /var/crash2/bounds: No such file or directory
> savecore: writing core to /var/crash2/vmcore.0
> savecore: writing kernel to /var/crash2/kernel.0
> savecore /var/crash2  0.17s user 32.25s system 19% cpu 2:48.72 total
> root@rsa /var/crash2# time /tmp/savecore $(pwd)
> savecore: reboot after panic: from debugger
> savecore: system went down at Tue Feb 13 11:33:22 2001
> savecore: writing core to /var/crash2/vmcore.1
> savecore: writing kernel to /var/crash2/kernel.1
> /tmp/savecore /var/crash2  18.29s user 5.62s system 19% cpu 1:59.96 total
> root@rsa /var/crash2# du -k vmcore.0 vmcore.1
> 524352  vmcore.0
> 35712   vmcore.1
> root@rsa /var/crash2# cmp vmcore.0 vmcore.1 && echo 'Mrreaow!'
> Mrreaow!

Cool!

>
> This is with a 4096-byte block size (equal to PAGE_SIZE), which was
> noticeably better than my original choice of 512 bytes. I think the
> best overall block size is the crashed kernel's page size, as most of
> the holes will originate from (series of) zeroed pages; I tried
> 8192-byte blocks (my /var/crash and /var/crash2 file systems have 64k
> blocks and 8k fragments) but noticed no improvement. Writing to a file
> system with smaller (1024-byte) fragments gave a smaller actual disk
> usage but a 50% increase in system time.

Probably it should just use getpagesize() to decide what block size to
use.

-- 
Doug Rabson				Mail:  dfr@nlsystems.com
					Phone: +44 20 8348 6160




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.31.0102131343270.62815-100000>