From owner-freebsd-arch Tue Feb 13 5:44:37 2001 Delivered-To: freebsd-arch@freebsd.org Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by hub.freebsd.org (Postfix) with ESMTP id 6437137B491 for ; Tue, 13 Feb 2001 05:44:34 -0800 (PST) Received: from [62.49.251.130] (helo=herring.nlsystems.com) by anchor-post-31.mail.demon.net with esmtp (Exim 2.12 #1) id 14Sfkv-0004xw-0V; Tue, 13 Feb 2001 13:44:33 +0000 Received: from herring (herring [10.0.0.2]) by herring.nlsystems.com (8.11.1/8.8.8) with ESMTP id f1DDiWs62957; Tue, 13 Feb 2001 13:44:32 GMT (envelope-from dfr@nlsystems.com) Date: Tue, 13 Feb 2001 13:44:32 +0000 (GMT) From: Doug Rabson To: Dag-Erling Smorgrav Cc: Subject: Re: sparse core dumps In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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