Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.unix.programmer > #948 > unrolled thread

Non blocking socket operations and async io on liunx

Started byitt ium <ittium@gmail.com>
First post2011-07-15 03:25 -0700
Last post2011-07-18 03:14 -0700
Articles 5 — 4 participants

Back to article view | Back to comp.unix.programmer


Contents

  Non blocking socket operations and async io on liunx itt ium <ittium@gmail.com> - 2011-07-15 03:25 -0700
    Re: Non blocking socket operations and async io on liunx Nobody <nobody@nowhere.com> - 2011-07-16 14:50 +0100
      Re: Non blocking socket operations and async io on liunx ittium <ittium@gmail.com> - 2011-07-17 13:18 +0530
        Re: Non blocking socket operations and async io on liunx Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-07-17 19:43 +0100
          Re: Non blocking socket operations and async io on liunx itt ium <ittium@gmail.com> - 2011-07-18 03:14 -0700

#948 — Non blocking socket operations and async io on liunx

Fromitt ium <ittium@gmail.com>
Date2011-07-15 03:25 -0700
SubjectNon blocking socket operations and async io on liunx
Message-ID<d76c5b24-8511-4d93-8cbb-1e180d24b49e@p12g2000pre.googlegroups.com>
Group,
I have a multithreaded solutions where I am using non-blocking socket
send/receive with send/recv buffers to make sure my threads are not
blocked during socket send/recv operation. I was thinking of changing
non-blocking routines by posix async io routines. I have following
doubts

1. I have read at multiple places that asyc io support in linux is not
good and is not ready for carrier grade systems. Is this correct ?

2. Is it possible to get rid of send buffer in case of async i/o or If
I keep sending the data to kernel, whether at any point of time it
will not take the buffer and I will have to buffer it.
thanks
Ittium

[toc] | [next] | [standalone]


#951

FromNobody <nobody@nowhere.com>
Date2011-07-16 14:50 +0100
Message-ID<pan.2011.07.16.13.50.01.146000@nowhere.com>
In reply to#948
On Fri, 15 Jul 2011 03:25:51 -0700, itt ium wrote:

> 2. Is it possible to get rid of send buffer in case of async i/o or If I
> keep sending the data to kernel, whether at any point of time it will not
> take the buffer and I will have to buffer it. thanks

If you're producing data faster than you can get it out of the system, the
remainder either has to be buffered somewhere or discarded.

The kernel has fixed-size socket buffers (fixed in the sense that you have
to explicitly set the size via SO_SNDBUF); if you want auto-grow buffers,
you have to implement them in user space.

[toc] | [prev] | [next] | [standalone]


#961

Fromittium <ittium@gmail.com>
Date2011-07-17 13:18 +0530
Message-ID<ivu44h$rcg$2@dont-email.me>
In reply to#951
On 16-07-2011 PM 07:20, Nobody wrote:
> On Fri, 15 Jul 2011 03:25:51 -0700, itt ium wrote:
>
>> 2. Is it possible to get rid of send buffer in case of async i/o or If I
>> keep sending the data to kernel, whether at any point of time it will not
>> take the buffer and I will have to buffer it. thanks
>
> If you're producing data faster than you can get it out of the system, the
> remainder either has to be buffered somewhere or discarded.
>
> The kernel has fixed-size socket buffers (fixed in the sense that you have
> to explicitly set the size via SO_SNDBUF); if you want auto-grow buffers,
> you have to implement them in user space.
>
thanks, It make sense. I would really appreciate comment from someone in 
the group, who has actually worked on posix io routine for some complex 
systems.

[toc] | [prev] | [next] | [standalone]


#965

FromRainer Weikusat <rweikusat@mssgmbh.com>
Date2011-07-17 19:43 +0100
Message-ID<87tyakvjc5.fsf@sapphire.mobileactivedefense.com>
In reply to#961
ittium <ittium@gmail.com> writes:
> On 16-07-2011 PM 07:20, Nobody wrote:
>> On Fri, 15 Jul 2011 03:25:51 -0700, itt ium wrote:
>>
>>> 2. Is it possible to get rid of send buffer in case of async i/o or If I
>>> keep sending the data to kernel, whether at any point of time it will not
>>> take the buffer and I will have to buffer it. thanks
>>
>> If you're producing data faster than you can get it out of the system, the
>> remainder either has to be buffered somewhere or discarded.
>>
>> The kernel has fixed-size socket buffers (fixed in the sense that you have
>> to explicitly set the size via SO_SNDBUF); if you want auto-grow buffers,
>> you have to implement them in user space.
>>
> thanks, It make sense. I would really appreciate comment from someone
> in the group, who has actually worked on posix io routine for some
> complex systems.

Your assumption that this hasn't happened is wrong.

[toc] | [prev] | [next] | [standalone]


#967

Fromitt ium <ittium@gmail.com>
Date2011-07-18 03:14 -0700
Message-ID<4f225d9c-99ce-426f-9510-dfc9808e7ef3@r28g2000prb.googlegroups.com>
In reply to#965
> Your assumption that this hasn't happened is wrong.

I could not follow it, details please.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.unix.programmer


csiph-web