From owner-freebsd-arch Tue Feb 13 4:54: 7 2001 Delivered-To: freebsd-arch@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 48BC337B503 for ; Tue, 13 Feb 2001 04:54:04 -0800 (PST) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id NAA95025; Tue, 13 Feb 2001 13:54:03 +0100 (CET) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: arch@freebsd.org Subject: sparse core dumps From: Dag-Erling Smorgrav Date: 13 Feb 2001 13:54:02 +0100 Message-ID: Lines: 40 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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! 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. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message