Networking Forums

Networking Forums > Computer Networking > Linux Networking > CPU usage with UDP sockets

Reply
Thread Tools Display Modes

CPU usage with UDP sockets

 
 
yoddeb@gmail.com
Guest
Posts: n/a

 
      06-01-2007, 01:13 PM
I have written an application that streams UDP video data to multiple
clients. Compared to other comparable aystems, my CPU usage is pretty
high...sending data to around 60 clients consumes around 18-20 % of
the cpu in the (very powerful) machine. I have two (boost library) UDP
sockets that sends audio and video to the clients. My question is
this: Which is generally best when sending UDP data to multiple/many
clients? One or many sockets??
TIA

 
Reply With Quote
 
 
 
 
Rick Jones
Guest
Posts: n/a

 
      06-01-2007, 05:33 PM
(E-Mail Removed) wrote:
> I have written an application that streams UDP video data to
> multiple clients. Compared to other comparable aystems, my CPU usage
> is pretty high...sending data to around 60 clients consumes around
> 18-20 % of the cpu in the (very powerful) machine. I have two (boost
> library) UDP sockets that sends audio and video to the clients. My
> question is this: Which is generally best when sending UDP data to
> multiple/many clients? One or many sockets??


Probably one of those "it depends" answers... do you have multiple
processors in the server? If so, you might want multiple sockets, one
per processor. Either with multiple threads, or multiple processes,
so you can take advantage of the available CPU resources.

Similarly, even if you have only one processor/core/whatever in the
box, if you have a socket per destination, you can connect() that
socket to the destination and IIRC avoid things like route lookups on
each send.

rick jones
--
a wide gulf separates "what if" from "if only"
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
 
Reply With Quote
Reply

Thread Tools
Display Modes

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
Max TCP sockets CJS Windows Networking 1 02-28-2007 06:20 PM
RAW TCP/IP sockets George Valkov Windows Networking 1 09-22-2006 02:49 AM
UDP sockets Sven Jacobs Linux Networking 0 05-10-2004 06:06 AM
sockets =?ISO-8859-1?Q?Andreas_R=F8sdal?= Linux Networking 5 02-03-2004 02:48 PM
raw sockets Linux Networking 1 12-22-2003 02:28 PM



1 2 3 4 5 6 7 8 9 10 11