Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Oct 2013 22:57:40 -0500 (CDT)
From:      Bryan Venteicher <bryanv@daemoninthecloset.org>
To:        FreeBSD current mailing list <current@freebsd.org>
Subject:   amd64 minidump slowness
Message-ID:  <73612885.53105.1381895860349.JavaMail.root@daemoninthecloset.org>
In-Reply-To: <56667278.53010.1381894780662.JavaMail.root@daemoninthecloset.org>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_53103_1768140454.1381895860347
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Hi,

At $JOB, we have machines with 400GB RAM that even the smallest
15GB amd64 minidump takes well over an hour. The major cause of
the slowness is that in minidumpsys(), blk_write() is called
PAGE_SIZE at a time. This causes blk_write() to poll the console
for the Ctrl-C abort once per page.

The attached patch changes blk_write() to be called with a run of
physically contiguous pages. This reduced the dump time by over a
magnitude. Of course, blk_write() could also be changed to poll
the console less frequently (like only on every IO).

If anybody else dumps on machines with lots of RAM, it would be
nice to know the difference this patch makes. I've got a second
set of patches that further reduces the dump time by over half that
I'll try to clean up soon.

http://people.freebsd.org/~bryanv/patches/minidump.patch
------=_Part_53103_1768140454.1381895860347
Content-Type: text/x-patch; name=minidump.patch
Content-Disposition: attachment; filename=minidump.patch
Content-Transfer-Encoding: base64

Y29tbWl0IDI1ZjllODJlNGFjOTNlNzFjNmNmMDZmZTJmYWExODk5OTY3ZGI3MjUKQXV0aG9yOiBC
cnlhbiBWZW50ZWljaGVyIDxicnlhbnZlbnRlaWNoZXJAZ21haWwuY29tPgpEYXRlOiAgIFN1biBT
ZXAgMjkgMTM6NTY6NDIgMjAxMyAtMDUwMAoKICAgIENhbGwgYmxrX3dyaXRlKCkgd2l0aCBhIHJ1
biBvZiBwaHlzaWNhbGx5IGNvbnRpZ3VvdXMgcGFnZXMKICAgIAogICAgUHJldmlvdXNseSwgYmxr
X3dyaXRlKCkgd2FzIGJlaW5nIGNhbGxlZCBvbmUgcGFnZSBhdCBhIHRpbWU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A9IDA7IGkgPCB2bV9wYWdlX2R1bXBfc2l6
ZSAvIHNpemVvZigqdm1fcGFnZV9kdW1wKTsgaSsrKSB7CisJZm9yIChpID0gMCwgc3RhcnRfcGEg
PSAwLCBzeiA9IDA7CisJICAgICBpIDwgdm1fcGFnZV9kdW1wX3NpemUgLyBzaXplb2YoKnZtX3Bh
Z2VfZHVtcCk7IGkrKykgewogCQliaXRzID0gdm1fcGFnZV9kdW1wW2ldOwogCQl3aGlsZSAoYml0
cykgewogCQkJYml0ID0gYnNmcShiaXRzKTsKIAkJCXBhID0gKCgodWludDY0X3QpaSAqIHNpemVv
Zigqdm1fcGFnZV9kdW1wKSAqIE5CQlkpICsgYml0KSAqIFBBR0VfU0laRTsKLQkJCWVycm9yID0g
YmxrX3dyaXRlKGRpLCAwLCBwYSwgUEFHRV9TSVpFKTsKLQkJCWlmIChlcnJvcikKLQkJCQlnb3Rv
IGZhaWw7CisJCQlpZiAoc3ogPT0gMCB8fCBzdGFydF9wYSArIHN6ID09IHBhKSB7CisJCQkJaWYg
KHN6ID09IDApCisJCQkJCXN0YXJ0X3BhID0gcGE7CisJCQkJc3ogKz0gUEFHRV9TSVpFOworCQkJ
fSBlbHNlIHsKKwkJCQllcnJvciA9IGJsa193cml0ZShkaSwgMCwgc3RhcnRfcGEsIHN6KTsKKwkJ
CQlpZiAoZXJyb3IpCisJCQkJCWdvdG8gZmFpbDsKKwkJCQlzdGFydF9wYSA9IHBhOworCQkJCXN6
ID0gUEFHRV9TSVpFOworCQkJfQogCQkJYml0cyAmPSB+KDF1bCA8PCBiaXQpOwogCQl9CiAJfQor
CWVycm9yID0gYmxrX3dyaXRlKGRpLCAwLCBzdGFydF9wYSwgc3opOworCWlmIChlcnJvcikKKwkJ
Z290byBmYWlsOwogCiAJZXJyb3IgPSBibGtfZmx1c2goZGkpOwogCWlmIChlcnJvcikK
------=_Part_53103_1768140454.1381895860347--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?73612885.53105.1381895860349.JavaMail.root>