public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: "Dmitry V. Levin" <ldv@altlinux.org>
Cc: elfutils-devel@sourceware.org, fche@redhat.com,
	mcermak@redhat.com, 	dpranke@chromium.org, thestig@chromium.org,
	thomasanderson@chromium.org
Subject: Re: [PATCH] libelf: Fix some 32bit offset/size issues that break updating 4G+ files.
Date: Thu, 20 Jun 2019 07:29:00 -0000	[thread overview]
Message-ID: <fe82da9f6fe8eac6595e1924b64cb25cd12030aa.camel@klomp.org> (raw)
In-Reply-To: <20190620015419.GA31302@altlinux.org>

On Thu, 2019-06-20 at 04:54 +0300, Dmitry V. Levin wrote:
> On Thu, Jun 20, 2019 at 01:10:53AM +0200, Mark Wielaard wrote:
> > +# Make sure the disk is reasonably fast, should be able to write
> > 100MB/s
> > +fast_disk=1
> > +timeout -s9 10s dd conv=fsync if=/dev/urandom of=tempfile bs=1M
> > count=1K \
> > +  || fast_disk=0; rm tempfile
> 
> Why /dev/urandom?  I suggest to use /dev/zero instead.

Good question. In early testing I noticed some file systems seemed to
optimize away the whole writing of zeros and dd would finish almost
immediately. So I used /dev/urandom to get some "real bits" in the
file. But even that didn't always show the true write-through speed.
Then I added conv=fsync which makes sure to physically write output
file data before finishing. That seems to work to see the actual write
speed with either /dev/urandom or /dev/zero. So, I'll change it to
/dev/zero again. Thanks.

> Also, the check itself is quite expensive, it writes 1G into
> tempfile,
> I suggest to move it after mem_available check.

OK. Moved.

> > +if test $fast_disk -eq 0; then
> > +  echo "Disk not fast enough, need at least 100MB/s"
> 
> It isn't necessarily a disk, I'd say that file system is not fast
> enough.

Changed.

Thanks,

Mark

  reply	other threads:[~2019-06-20  7:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19  0:04 Mark Wielaard
2019-06-19 23:10 ` Mark Wielaard
2019-06-20  1:54   ` Dmitry V. Levin
2019-06-20  7:29     ` Mark Wielaard [this message]
2019-06-28 21:38       ` Mark Wielaard
2019-07-02 18:40 ` Lei Zhang
2019-07-02 23:15   ` Mark Wielaard
2019-07-02 23:21     ` Lei Zhang
2019-07-03 14:53       ` Mark Wielaard
2019-07-03 15:23         ` Lei Zhang
2019-07-03 15:34           ` Mark Wielaard
2019-07-03 16:00             ` Lei Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe82da9f6fe8eac6595e1924b64cb25cd12030aa.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=dpranke@chromium.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=fche@redhat.com \
    --cc=ldv@altlinux.org \
    --cc=mcermak@redhat.com \
    --cc=thestig@chromium.org \
    --cc=thomasanderson@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).