io_splice RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: ruby.io.splice@librelist.com
Subject: Re: Some benchmarks
Date: Mon, 27 Dec 2010 13:38:52 -0800	[thread overview]
Message-ID: <20101227213852.GA4825@dcvr.yhbt.net> (raw)
In-Reply-To: AANLkTimBrXN-6BXK-ifaCLFrznQhQqXqW1dhJq0CtHFO@mail.gmail.com

Iñaki Baz Castillo <ibc@aliax.net> wrote:
> 2010/12/23 Iñaki Baz Castillo <ibc@aliax.net>:
> >> Try it on a tmpfs mount.
> >
> > Yes, that would be my next test.
> 
> Hummm, I get "non expected" results when using a tmpfs as destination
> for the copy. I attach a new test file which makes usage of IO splice
> in different ways ("manual", using IO objects and using file names).

The setup of the splice methods is rather expensive (both the pure Ruby
portion and also the kernel pipe()).

I don't think a 1M file is really enough to test with (consider the size
of L2 caches these days), try playing around with bigger files, maybe
tens or even hundreds of megs (if it can fit in tmpfs).

You should also get Benchmark to report system and user time,
realtime can be misleading

-- 
Eric Wong

      reply	other threads:[~2010-12-27 21:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTi=M+qGa7G1PvYyB+fbJUzrersJQwtDkct3hZEiy@mail.gmail.com>
2010-12-22 14:01 ` Some benchmarks Iñaki Baz Castillo
2010-12-22 19:56   ` Eric Wong
2010-12-23 15:41     ` Iñaki Baz Castillo
2010-12-23 18:06       ` Eric Wong
2010-12-27 10:01         ` Iñaki Baz Castillo
2010-12-27 17:33       ` Iñaki Baz Castillo
2010-12-27 21:38         ` Eric Wong [this message]

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

  List information: https://yhbt.net/ruby_io_splice/

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

  git send-email \
    --in-reply-to=20101227213852.GA4825@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=ruby.io.splice@librelist.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/ruby_io_splice.git/

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).