Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > blocking i/o vs. non blocking i/o (performance)

Reply
Thread Tools

blocking i/o vs. non blocking i/o (performance)

 
 
Andre Kelmanson
Guest
Posts: n/a
 
      10-10-2003
Hi,
I'm writing a proxy application for rfb protocol (vnc), but i'm not
satisfied with it's performance. I'm using blocking i/o and the app
just read(...) from source and the write(...) to destination. The
performance diference between the client directly connected to the
server and the client passing thru the proxy is very visible. Does
non-blocking i/o solves my problem? Maybe the problem here is the
unnecessary(?) wait in write(...) function.

thank you.
obs. sorry about my poor english.
 
Reply With Quote
 
 
 
 
Jack Klein
Guest
Posts: n/a
 
      10-10-2003
On 9 Oct 2003 21:03:12 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (Andre Kelmanson)
wrote in comp.lang.c:

> Hi,
> I'm writing a proxy application for rfb protocol (vnc), but i'm not
> satisfied with it's performance. I'm using blocking i/o and the app
> just read(...) from source and the write(...) to destination. The
> performance diference between the client directly connected to the
> server and the client passing thru the proxy is very visible. Does
> non-blocking i/o solves my problem? Maybe the problem here is the
> unnecessary(?) wait in write(...) function.
>
> thank you.
> obs. sorry about my poor english.


You need to ask in a newsgroup that supports your particular compiler
and operating system combination.

None of proxy, rfb, vnc, read(), write(), or non-blocking i/o are part
of the C language or its library, the topic here. C has no built-in
networking support at all. All such features are specific to the
implementation.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
 
Reply With Quote
 
 
 
 
Derk Gwen
Guest
Posts: n/a
 
      10-10-2003
(E-Mail Removed) (Andre Kelmanson) wrote:
# Hi,
# I'm writing a proxy application for rfb protocol (vnc), but i'm not
# satisfied with it's performance. I'm using blocking i/o and the app
# just read(...) from source and the write(...) to destination. The
# performance diference between the client directly connected to the
# server and the client passing thru the proxy is very visible. Does
# non-blocking i/o solves my problem? Maybe the problem here is the
# unnecessary(?) wait in write(...) function.

Non-blocking I/O can be useful if you are trying to do multiple simultaneous
reads and writes. If your process is doing a single read and write, that is
going to take the same amount of time whether your process suspends while
the kernel moves bytes or your process twiddles its thumb during that time.

--
Derk Gwen http://derkgwen.250free.com/html/index.html
No pleasure, no rapture, no exquiste sin greater than central air.
 
Reply With Quote
 
Valentin Tihomirov
Guest
Posts: n/a
 
      10-12-2003
You may perform a task in another thread in parallel to data transfer even
with blocking IO. You should detect the bottleneck youself to determine
whether you need a multitasking. May be it is your communication channel too
slow and non-blocking IO does not help.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Non blocking socket keep blocking on read ? Serge Savoie Ruby 4 10-01-2008 03:16 PM
Switching from Non-Blocking to Blocking IO Christian Java 5 12-02-2007 11:24 PM
Non-blocking and semi-blocking Sockets class. nukleus Java 14 01-22-2007 08:22 PM
Blocking and non blocking assignment in VHDL Hendra Gunawan VHDL 1 04-08-2004 06:03 AM



Advertisments