Re: [Nbd] strange delay of 5ms
- To: Goswin von Brederlow <goswin-v-b@...186...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] strange delay of 5ms
- From: Wouter Verhelst <w@...112...>
- Date: Wed, 4 May 2011 14:22:47 +0200
- Message-id: <20110504122247.GC11294@...510...>
- In-reply-to: <87wri6aer9.fsf@...860...>
- References: <20110422123123.GR23409@...855...> <20110501141117.GD13498@...510...> <87wri6aer9.fsf@...860...>
On Wed, May 04, 2011 at 01:26:02PM +0200, Goswin von Brederlow wrote:
> Wouter Verhelst <w@...112...> writes:
>
> > On Fri, Apr 22, 2011 at 02:31:23PM +0200, folkert wrote:
> >> Hi,
> >>
> >> I noticed something odd:
> >>
> >> for(;;) {
> >>
> >> // get timestamp in ms start
> >>
> >> read(fd, size_of_nbd_request)
> >>
> >> // get timestamp in ms end
> >>
> >> printf("delay: %f\n", end - start);
> >>
> >> // process request
> >> }
> >>
> >> Then, on a localhost-connection with:
> >> dd if=/dev/zero of=/dev/nbd0
> >>
> >> in this setup I noticed that it takes 5ms for the request header to come
> >> in, but only when the processing takes a while.
> >> What can be the cause of this?
> >
> > I'm not sure. I'm aware that nbd-server performance isn't exactly
> > perfect, and I plan on working on that, but it would involve some
> > significant work.
>
> Could this be due to tcp corking? I.e. the kernel waiting for more data
> to send in a single frame?
Not likely, since nbd-server doesn't set TCP_CORK. But of course it's not
impossible either
--
The volume of a pizza of thickness a and radius z can be described by
the following formula:
pi zz a
Reply to: