From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: ruby.io.splice@librelist.com
Subject: Re: Some benchmarks
Date: Mon, 27 Dec 2010 11:01:20 +0100 [thread overview]
Message-ID: <AANLkTinEMus6DJT9zDa03nm7KBpOZwg2RTo484fD54wa@mail.gmail.com> (raw)
In-Reply-To: 20101223180626.GA21044@dcvr.yhbt.net
2010/12/23 Eric Wong <normalperson@yhbt.net>:
> Just ensure you read everything from the pipe between each iteration
> (which you seem to be doing). A pipe is just a ring buffer inside the
> kernel. Traditionally write() puts data into the buffer, read() removes
> it, and nowadays splice() can do it without copying the data into
> userspace.
Ok, thanks a lot. I'm coding a server using EventMachine, and the
reactor process communicates with other processes by Posix_MQ. In case
the message body is too big then I plan the reactor to copy the body
data to a file (maybe ramfs) and pass the file path to the worker
processes who would read it.
So I'll come back with some questions soon :)
--
Iñaki Baz Castillo
<ibc@aliax.net>
next prev parent reply other threads:[~2010-12-27 10:01 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 [this message]
2010-12-27 17:33 ` Iñaki Baz Castillo
2010-12-27 21:38 ` Eric Wong
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=AANLkTinEMus6DJT9zDa03nm7KBpOZwg2RTo484fD54wa@mail.gmail.com \
--to=ibc@aliax.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).