From: "saeed bishara" <saeed.bishara@gmail.com>
To: linux-kernel@vger.kernel.org, "Jens Axboe" <jens.axboe@oracle.com>
Subject: Re: using splice/vmsplice to improve file receive performance
Date: Sun, 7 Jan 2007 20:16:11 +0200 [thread overview]
Message-ID: <c70ff3ad0701071016q274a0dfdt4d2cfd05b410c3db@mail.gmail.com> (raw)
In-Reply-To: <c70ff3ad0612211121g3c5aaa28s9b738e9c79f9c2be@mail.gmail.com>
On 12/21/06, saeed bishara <saeed.bishara@gmail.com> wrote:
> Hi,
> I'm trying to use the splice/vmsplice system calls to improve the
> samba server write throughput, but before touching the smbd, I started
> to improve the ttcp tool since it simple and has the same flow. I'm
> expecting to avoid the "copy_from_user" path when using those
> syscalls.
> so far, I couldn't make any improvement, actually the throughput get
> worst. the new receive flow looks like this (code also attached):
> 1. read tcp packet (64 pages) to page aligned buffer.
> 2. vmsplice the buffer to pipe with SPLICE_F_MOVE.
> 3. splice the pipe to the file, also with SPLICE_F_MOVE.
>
> the strace shows that the splice takes a lot of time. also when
> profiling the kernel, I found that the memcpy() called to often !!
I found that when doing free to the buffer after the vmsplice and
befaore the splice syscall, the page is really moved without any
memcpy, this means the flow of my application should be:
- malloc aligned buffer
- fill the buffer with the desired data
- vmsplice
- free the buffer
- call splice.
but I still don't get I improvements, and when profing the kernel I
see _clear_user_page() too often, I guess this function called to
clean the new buffers allocated by the user, for securty and privacy
reasons, but the overhead of this operation is expensive.
is there any way to prevent the kernel from cleaning new allocated buffers?
saeed
prev parent reply other threads:[~2007-01-07 18:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-21 19:21 saeed bishara
2006-12-22 9:48 ` Jens Axboe
2006-12-22 11:18 ` saeed bishara
2006-12-22 11:39 ` Jens Axboe
2006-12-22 11:59 ` saeed bishara
2006-12-22 12:47 ` Jens Axboe
2007-01-03 20:09 ` saeed bishara
2007-01-04 14:08 ` Jens Axboe
2007-01-04 14:16 ` Jens Axboe
2007-01-04 16:27 ` saeed bishara
2007-01-04 17:38 ` saeed bishara
2007-01-07 18:16 ` saeed bishara [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c70ff3ad0701071016q274a0dfdt4d2cfd05b410c3db@mail.gmail.com \
--to=saeed.bishara@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®